#cargo #cargo-build #cargo-subcommand #list #dependencies #give #simpler

app cargo-deps-list

Cargo subcommand to get a list of dependencies in a typical build

4 stable releases

2.1.0 Sep 2, 2024
2.0.0 Sep 24, 2023
1.0.1 Jan 19, 2022
1.0.0 Jan 18, 2022

#122 in Cargo plugins

GPL-3.0-only

16KB
59 lines

cargo-deps-list

Codeberg CI Crates.io

The quick-and-dirty successor to cargo-real-deps

Same features, but way simpler, and compiles fast

Born out of my annoyance that cargo doesn't have a way to give you a straight answer about the number of dependencies your project has. Now, it does

What it does

It processes the output of cargo tree to get a list of all the unique dependencies, and gives you a count of them. It is not a sophisticated program lol

Installation

Install using Cargo:

cargo install cargo-deps-list

Usage

Refer to cargo tree --help, as all cargo-deps-list does is pass your arguments to cargo tree. Don't provide --prefix or --format though, as that's managed by cargo-deps-list

Recommended use cases:

  • cargo deps-list - all the dependencies used for everything
  • cargo deps-list --edges normal - dependencies used in your final binary
  • cargo deps-list --manifest-path=PATH - for checking the dependencies of a project not in your current working directory. PATH must point to a Cargo.toml file

No runtime deps