Expand description
ct-deps’s crate-graph queries.
The resolved dependency graph comes from cargo metadata --format-version 1 --locked --offline (hermetic by construction); this module parses that
JSON into a Graph and answers the crate-level invariant questions:
is crate X anywhere in the tree (deny_paths), does workspace member
A reach crate B (forbid_path), and do any crates resolve at more
than one version ([duplicates]). Every violation carries its evidence —
a dependency path or the duplicated version list — so a red answer is
never just a name.
Structs§
- Graph
- The resolved crate graph.
- Package
- One resolved package.
- Violation
- Evidence for one violated assertion.
Enums§
- Edge
Kind - A dependency edge kind, as cargo models it.
Functions§
- deny_
paths - Evaluate
--deny NAME: a violation whennameresolves anywhere reachable from the workspace members overallowededges. - forbid_
path - Evaluate
--forbid 'A=>B': a violation when any package namedfromreaches a package namedtooverallowededges.Errwhenfromis not in the graph at all (a defective assertion, not a clean pass). - parse_
metadata - Parse
cargo metadata --format-version 1JSON into aGraph.