cargo-udeps
cargo-udeps copied to clipboard
Show unused dependencies that gets used transitively by other dependecies
Currently, cargo +nightly udeps shows All deps seem to have been used. for below:
[dependencies]
chrono = "0.4"
time = "0.1"
fn main() {
println!("{:?}", chrono::Local::now());
}
I expect it to show time dependency as unused since we can remove it from Cargo.toml. I am not sure whether this should be a bug issue or a feature request though.
Very useful tool by the way!
Same thing here: in this repo (already merged) the foreign-types crate is directly unused, but openssl depends on that and the tool does not show that the dependency could be removed from Cargo.toml.
I write a small tool for this. https://github.com/light4/cargo-inner