cargo-ensure-no-default-features

Crates.iocargo-ensure-no-default-features
lib.rscargo-ensure-no-default-features
version1.0.0
created_at2025-11-27 23:05:54.871822+00
updated_at2025-11-28 16:06:02.173384+00
descriptionEnsures a workspace's Cargo.toml file always uses default-features = false for all dependencies
homepagehttps://github.com/geeknoid/cargo-ensure-no-default-features
repositoryhttps://github.com/geeknoid/cargo-ensure-no-default-features
max_upload_size
id1954581
size216,365
Martin Taillefer (geeknoid)

documentation

README

cargo-ensure-no-default-features

crate.io CI Coverage Minimum Supported Rust Version 1.88 License

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.

Commit count: 0

cargo fmt