cargo-shed 0.1.0
First public release of cargo-shed, a Cargo subcommand and Rust library that helps identify dependency bloat, risky feature selections, duplicate crate versions, and safe cleanup opportunities in Rust projects.
cargo-shed is intentionally conservative. It analyzes Cargo.toml, Cargo.lock, and Rust source files under src/ and tests/, but it does not compile the project, execute build scripts, or run any project code.
Features
- Detects overly broad dependency feature selections (such as
tokio = { features = ["full"] }) - Identifies dependencies with unnecessary default features enabled
- Finds duplicate crate versions in the dependency graph
- Reports potentially unused dependencies
- Generates actionable recommendations with supporting evidence
- Provides optional automatic fixes for selected issues
Installation
cargo install cargo-shedUsage
cargo shedExample:
cargo-shed report
Score: 78/100
Problems found:
[HIGH] tokio uses "full"
[MEDIUM] duplicate crate versions
syn: 1.x and 2.x
[LOW] reqwest uses default-features
Links
- crates.io: https://crates.io/crates/cargo-shed
- docs.rs: https://docs.rs/cargo-shed
Notes
cargo-shed focuses on low-risk analysis and recommendations. Reports are designed to be understandable, actionable, and safe to review before making dependency changes.