Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,30 @@ NodeDB Studio is a **desktop GUI client for NodeDB**, built in Rust with

This is a Cargo workspace; the app is the `nodedb-studio` member crate.

## Setup — local NodeDB dependency (do this first)
## Setup — NodeDB dependency

`Cargo.toml` pins `nodedb-client` / `nodedb-types` to a published version, but
those crates are not on crates.io yet. Point them at a local NodeDB checkout with
a **gitignored** Cargo patch — never hardcode machine paths in `Cargo.toml`.
`Cargo.toml` pins `nodedb-client` / `nodedb-types` to the `NodeDB-Lab/nodedb` git
repo by commit `rev`, not to crates.io (the published crates lag the repo by
hundreds of commits). Cargo fetches it on first build; no local NodeDB checkout is
needed. Both crates must pin the **same** rev, and always a commit, never a branch:
a branch would make every CI run build different upstream code.

Create `.cargo/config.toml` at the workspace root (already gitignored):
Bump the rev deliberately. The native wire is not frozen pre-1.0, and the seam
decoders are written against the pinned rev, so re-run fmt, clippy and nextest
after any bump.

To develop against a local NodeDB checkout instead, override with a **gitignored**
Cargo patch. Never hardcode machine paths in `Cargo.toml`. Create
`.cargo/config.toml` at the workspace root (already gitignored):

```toml
[patch.crates-io]
[patch."https://github.com/NodeDB-Lab/nodedb.git"]
nodedb-client = { path = "../nodedb/nodedb-client" }
nodedb-types = { path = "../nodedb/nodedb-types" }
```

Adjust the paths to your checkout. The version pinned in `Cargo.toml` must match
your local NodeDB workspace version (see its root `Cargo.toml`). If Cargo says
your toolchain is too old, run `rustup update stable`.
Adjust the paths to your checkout. If Cargo says your toolchain is too old, run
`rustup update stable`.

## Commands

Expand Down
142 changes: 101 additions & 41 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ homepage = "https://nodedb.dev"
# enabled in the phase that first constructs a NativeClient — it drags in a
# TLS + C-toolchain build tree (tokio-rustls, aws-lc-rs, cmake), so it is not
# carried while the seam impl is an inert stub.
nodedb-client = "0.4.0"
nodedb-types = "0.4.0"
nodedb-client = { git = "https://github.com/NodeDB-Lab/nodedb.git", rev = "fda34193afd77894b87170a59df224d4791e6495" }
nodedb-types = { git = "https://github.com/NodeDB-Lab/nodedb.git", rev = "fda34193afd77894b87170a59df224d4791e6495" }
# Async
async-trait = "0.1"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "time"] }
Expand Down
Loading