| Crates.io | cargo-ensure-no-default-features |
| lib.rs | cargo-ensure-no-default-features |
| version | 1.0.0 |
| created_at | 2025-11-27 23:05:54.871822+00 |
| updated_at | 2025-11-28 16:06:02.173384+00 |
| description | Ensures a workspace's Cargo.toml file always uses default-features = false for all dependencies |
| homepage | https://github.com/geeknoid/cargo-ensure-no-default-features |
| repository | https://github.com/geeknoid/cargo-ensure-no-default-features |
| max_upload_size | |
| id | 1954581 |
| size | 216,365 |
Eliminate superfluous features in a Rust workspace.
This tool checks that all workspace dependencies in Cargo.toml have
default-features = false. This is a best practice in repos that publish multiple independent
crates, to ensure that each individual crate has the minimal set of features they need.
This can improve build times for any consumers of these crates by avoiding
unnecessary features being enabled by default.
Install with:
cargo install cargo-ensure-no-default-features
And use with:
cargo ensure-no-default-features
The --manifest-path option lets you specify an explicit Cargo.toml file to check. Without this option, it defaults to the Cargo.toml in the current directory.
The --exceptions option lets you specify a comma-separated list of dependencies to exclude from the default-features check. This is useful for dependencies that you explicitly want to have default features enabled.