Skip to content

Commit 623dcc6

Browse files
authored
docs: example requires example feature to run (#2451)
## Description You will get this error without passing `--features=examples`. ```bash 🐡 ❯ cargo run --example client error: target `client` in package `iroh` requires the features: `examples` Consider enabling them by passing, e.g., `--features="examples" ``` ## Breaking Changes No. ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [ ] Self-review. - [ ] Documentation updates if relevant. - [ ] Tests if relevant. - [ ] All breaking changes documented. Closes #2431
1 parent 5ba6855 commit 623dcc6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

iroh/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ iroh = { version = "...", default-features = false }
1919

2020
## Running Examples
2121

22-
Examples are located in `iroh/examples`. Run them with `cargo run --example`. eg: `cargo run --example hello-world`. At the top of each example file is a comment describing how to run the example.
22+
Examples are located in `iroh/examples`. Run them with `cargo run --features=examples --example`. eg: `cargo run --features=examples --example hello-world`. At the top of each example file is a comment describing how to run the example.
2323

2424
# License
2525

iroh/examples/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//! The iroh node that creates the document is backed by an in-memory database and a random node ID
55
//!
66
//! run this example from the project root:
7-
//! $ cargo run --example client
7+
//! $ cargo run --features=examples --example client
88
use indicatif::HumanBytes;
99
use iroh::{base::base32, client::docs::Entry, docs::store::Query, node::Node};
1010
use tokio_stream::StreamExt;

iroh/examples/rpc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! An example that runs an iroh node that can be controlled via RPC.
22
//!
33
//! Run this example with
4-
//! $ cargo run --example rpc
4+
//! $ cargo run --features=examples --example rpc
55
//! Then in another terminal, run any of the normal iroh CLI commands, which you can run from
66
//! cargo as well:
77
//! $ cargo run node stats

0 commit comments

Comments
 (0)