From a5290a3644325d484571730fd56b56fde9152d18 Mon Sep 17 00:00:00 2001 From: markojovanovic_elite Date: Wed, 22 Apr 2026 12:41:29 -0500 Subject: [PATCH] docs(readme): use node-subtensor bin name and -p flag for cargo run Fixes #1807. - The workspace root Cargo.toml has no [[bin]] target and the workspace contains multiple bin crates, so `cargo run --release -- --dev` fails with `error: a bin target must be available for cargo run`. Change the example to `cargo run --release -p node-subtensor -- --dev` and add a one-sentence explainer. - The "Other ways to launch the node" section referenced the binary as `./target/release/subtensor` (x3); the produced binary is `node-subtensor` per node/Cargo.toml. - One of those lines read `./target/release/subtensor-ldebug --dev` where the `-ldebug` log-filter flag had fused into the binary name. Restore the space. --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b3e902c0bf..544c184bf7 100644 --- a/README.md +++ b/README.md @@ -75,9 +75,13 @@ First, complete the [basic Rust setup instructions](./docs/rust-setup.md). Use Rust's native `cargo` command to build and launch the template node: ```sh -cargo run --release -- --dev +cargo run --release -p node-subtensor -- --dev ``` +The workspace root is not itself a binary, so `cargo run` must target +`node-subtensor` explicitly (otherwise cargo errors with +`a bin target must be available for cargo run`). + **Build only** The above `cargo run` command will perform an initial build and launch the node. Use the following command to build the node @@ -113,19 +117,19 @@ node. This command will start the single-node development chain with non-persistent state: ```bash -./target/release/subtensor --dev +./target/release/node-subtensor --dev ``` Purge the development chain's state: ```bash -./target/release/subtensor purge-chain --dev +./target/release/node-subtensor purge-chain --dev ``` Start the development chain with detailed logging: ```bash -RUST_BACKTRACE=1 ./target/release/subtensor-ldebug --dev +RUST_BACKTRACE=1 ./target/release/node-subtensor -ldebug --dev ``` Running debug with logs.