| Crates.io | cargo-easy-dep |
| lib.rs | cargo-easy-dep |
| version | 0.1.1 |
| created_at | 2025-04-14 14:30:42.352383+00 |
| updated_at | 2025-04-19 09:43:11.065714+00 |
| description | Simplifies dependency management in Rust workspaces by unifying common workspace members' dependencies in workspace |
| homepage | |
| repository | https://github.com/sabify/cargo-easy-dep |
| max_upload_size | |
| id | 1632900 |
| size | 45,231 |
A cargo subcommand that simplifies dependency management in Rust workspaces by automatically unifying common dependencies at the workspace level.
In large Rust workspaces, managing dependencies across multiple crates can become cumbersome. cargo-easy-dep analyzes your workspace and:
Cargo.tomlCargo.toml to use the workspace dependencyThis approach reduces duplication, simplifies updates, and ensures version consistency across your workspace.
cargo install cargo-easy-dep
From your workspace root directory, run:
cargo easy-dep
Options:
-m, --min-occurrences <MIN_OCCURRENCES>
Minimum number of occurrences to consider a dependency common [env: CARGO_EASY_DEP_MIN_OCCURRENCES=] [default: 2]
-w, --workspace-root <WORKSPACE_ROOT>
Path to workspace root (defaults to current directory) [env: CARGO_EASY_DEP_WORKSPACE_ROOT=]
-q, --quiet
Suppress all output [env: CARGO_EASY_DEP_QUIET=]
-h, --help
Print help
-V, --version
Print version
# Run from your workspace root
cargo easy-dep
Consider all dependencies used by workspace members:
cargo easy-dep --min-occurrences 1
cargo easy-dep --workspace-root /path/to/my/workspace
cargo easy-dep --quiet
cargo_metadata--min-occurrences)Cargo.toml to add these dependencies to the [workspace.dependencies] sectionCargo.toml to use workspace = true for these dependenciescargo-easy-dep will disable default-features for all dependencies in the workspace and enable them based on each member's preferences. This disabling has been done without diffing and it gives maintainers better visibility by explicitly indicating the features without falling into the mentioned issue.Cargo.toml.cargo-easy-dep uses semver::VersionReq as versioning strategy like what cargo does, you will see '^1.0' in your root workspace Cargo.toml for dependencies versions. (1.0 version used as an example)Licensed under either of:
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.