cargo-arc
Generates a collapsible arc diagram of your Cargo workspace as SVG.
You get a tree of your crates and their modules, connected by arcs
that trace use dependencies between them.
Installation
Requires a stable Rust toolchain.
Quick Start
# In any Cargo workspace:
Open the generated SVG in a browser.
What You See
Your workspace shows up as a tree — crates with their modules nested inside. Arcs between nodes show where dependencies exist.
- Boxes — crates and modules, nested by hierarchy
- Arcs — dependencies between any two nodes
- Collapse a node to fold its children — individual dependencies merge into summary arcs
- Select a node or arc to highlight its relationships
- Cycles — circular dependencies are detected and highlighted
Features
- Cross-crate module dependencies — traces
usedependencies across the whole workspace at module level - Feature filtering — show only crates involved in a specific Cargo feature
- Interactive SVG — collapse, expand, and select directly in the browser
- Volatility report — identifies frequently-changed modules based on git history
Feature Filtering
Show only the dependency subgraph for a specific Cargo feature:
# Show crates involved in the "web" feature (includes default deps)
# Exclude default deps — show ONLY the "web" feature graph
Volatility Report
Analyze which modules changed most frequently over the last months:
Useful for identifying hotspots before refactoring. The analysis period
and thresholds are configurable (--volatility-months, --volatility-low,
--volatility-high).
Development
See docs/ARCHITECTURE.md for project structure and architecture decision records.
Requires Just as task runner.
License
MIT OR Apache-2.0