Expand description
Workspace member discovery via cargo metadata.
Single-crate projects just produce one entry with the crate root at the
project root. Virtual workspaces ([workspace] at the root, sources in
crates/*) produce one entry per member. Anything that cargo metadata
can’t answer (no Cargo.toml, cargo missing) yields an empty list and the
caller falls back to “treat the whole tree as one unit”.
Structs§
- Package
- One member of a cargo workspace (or the single package in a non-workspace project).
Functions§
- find
- Find a package by name. Returns
Errwith a helpful message listing the known members when the name doesn’t match. - load
- Load workspace members from
cargo metadata. Returns an empty vec when cargo is unavailable, not a Rust project, or the metadata JSON is malformed — callers treat that as “unknown, don’t filter.” - narrow_
paths - Retain only the files under
pkg.root.