nornir-feature-graph
The feature→dependency activation graph, parsed straight out of Cargo manifests.
This is the one edge cargo metadata cannot supply. cargo metadata has no -p, it always resolves the whole workspace including dev-dependencies, and it collapses weak-dependency AND-groups — so it cannot answer "which dependencies does feature F actually turn on for crate C". This crate parses the manifests directly and builds the bipartite feature↔crate graph, plus the two adjoints of the Galois connection over it:
- activation — given a feature set, the dependencies it switches on;
- requirement — given a dependency, the minimal feature sets that reach it.
Shape
toml + serde are the whole input path; the library never shells out to cargo. The graph itself is the shared nornir-graph MemGraph over opaque string ids with an EdgeLabel codec — no second graph abstraction is invented here. nornir-graph's default build is a true leaf (std only), which keeps this crate a leaf too.
The accuracy tests use cargo tree -p <pkg> -e no-dev as an external oracle; that call lives in the tests, never in the library.
License
MIT OR Apache-2.0