cargo
Rust cargo tree
Inspect the dependency graph when you need to understand where a library comes from. Direct dependencies are declared by your package; transitive ones are reached through other packages. Example format: shell; run from a disposable copy of v15/fixtures/projects/local-app. Expected result (not executed): A tree showing local-app and its child price; absolute paths vary. Why: Cargo has resolved the local path dependency. Common mistake: Treating the human-readable tree as a stable machine interface.
Formal Syntax & Structure
rust syntaxrust
cargo tree [OPTIONS]Working Example
Example Snippetrust
cargo tree --offline