Announcing cargo-shed 0.1.0, a Cargo subcommand for finding dependency bloat, risky feature selections, duplicate crate versions, and safe cleanup opportunities in Rust projects
โ Rust ๐ 2026-06-18 ๐ค surdeus ๐๏ธ 2Hi Rustaceans,
I just published cargo-shed 0.1.0, a Cargo subcommand and Rust library for static dependency health checks.
It analyzes Cargo.toml, Cargo.lock, and Rust source files under src/ and tests/, but it does not compile the target project, execute build scripts, or run any project code.
The goal is to make dependency cleanup safer and more explainable:
problem -> reason -> evidence -> suggested action
Install
cargo install cargo-shed
Use
cargo shed
cargo shed --format json
cargo shed --check
cargo shed --fix tokio-full
Included rules in 0.1.0
tokio-fullreqwest-default-featuresunused-dependencyduplicate-versionsheavy-crate
Example output
cargo-shed report
Score: 78/100
Problems found:
[HIGH] tokio-full
Reason: tokio uses the full feature set
Run: cargo shed --fix tokio-full
[MEDIUM] unused-dependency:chrono
Reason: chrono appears to be unused in scanned Rust sources
Run: cargo shed --fix unused-dependency:chrono
Links
- crates.io: crates.io: Rust Package Registry
- docs.rs: cargo_shed - Rust
- GitHub: GitHub - moooossee/cargo-shed ยท GitHub
- Release notes: Release cargo-shed ยท moooossee/cargo-shed ยท GitHub
This is intentionally conservative for 0.1.0: fixes are limited, backups are created before writing, and ambiguous cases are reported without changing the manifest.
I'd love feedback on:
- False positives
- Workspace support
- Additional dependency health rules
- General usability and output quality
Thanks for taking a look!
2 posts - 2 participants
๐ท๏ธ Rust_feed