2026-05-08 22:07 UTC
Cargo now has unstable support for detecting unused dependencies. For its most basic form, you can run:
```
cargo +nightly check -Zcargo-lints --workspace --all-targets
```
See https://doc.rust-lang.org/nightly/cargo/guide/build-performance.html#removing-unused-dependencies for more details
#rustlang
Replies (1)
-
@argv_minus_one@mastodon.sdf.org 2026-05-08 23:56
@epage@hachyderm.io I wonder if it's possible to also detect unused features. Some features don't add any items, only change existing items' behavior, so this may be impossible. Sure would be neat, though.