Use examples-index.json as the first lookup surface. It lists every Cargo example target with its
source path, summary, exact run command, and structured runtime requirements. Filter the runtime
object before selecting an example; do not assume network access, credentials, node binaries, or
hardware are available.
Source-of-truth order:
Cargo.tomland the package manifests define dependency and feature behavior.examples-index.jsonmaps tasks to runnable targets and prerequisites.- The referenced Rust source is authoritative for the API usage.
README.mdis the human-oriented overview.
When adding or renaming an example:
- Start the source file with a concise
//!summary. - Add it to
README.md. - Add only deterministic, offline examples to
scripts/runtime-examples.txt. - Run
python3 scripts/generate-example-index.pyand commit the updated index. - Run
cargo check --workspace --examples --all-features --locked.
Do not add shared public RPC endpoints or placeholder credentials. Use the helpers in
example-support so missing configuration produces an actionable error. Keep helper modules under
a named example directory so Cargo does not expose them as accidental example targets.