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    ๐Ÿ‘๏ธ 2      

surdeus

Hi 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-full
  • reqwest-default-features
  • unused-dependency
  • duplicate-versions
  • heavy-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

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

Read full topic

๐Ÿท๏ธ Rust_feed