Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

cargo-all-features

> 测试质量
Open source

A Cargo subcommand to build and test all feature flag combinations.

190 stars0 likes1 views
WebsiteGitHub

About

A Cargo subcommand to build and test all feature flag combinations.

cargo-all-features

Cargo subcommands that build and test all feature flag combinations for a crate.

Install

cargo install cargo-all-features

Usage

Run cargo subcommands on a Cargo package or at the root of a Cargo workspace with all feature flag combinations:

cargo all-features  

Example

Build crate with all feature flag combinations:

cargo all-features build 

Check crate with all feature flag combinations:

cargo all-features check 

Test crate with all feature flag combinations:

cargo all-features test 

Why?

If you have a crate that utilizes Rust feature flags, it’s common to set up a test matrix in your continuous integration tooling to individually test all feature flags. This setup can be difficult to maintain and easy to forget to update as feature flags come and go. It’s also not exhaustive, as it’s possible enabling combinations of feature flags could result in a compilation error that should be fixed. This utility was built to address these concerns.

Options

You can add the following options to your Cargo.toml file to configure the behavior of cargo-all-features under the heading [package.metadata.cargo-all-features]:

…

The project also supports chunking: --n-chunks 3 --chunks 1 will split the crates being tested into three sets (alphabetically, currently), and run the requested command for the first set of crates only. This is useful for splitting up CI jobs or performing disk cleanups since for large workspaces check-all-features and friends can take a very long time and produce a ton of artifacts.

License

Licensed under either of

  • Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

Contribution

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.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustcargofeature-flagsrusttesting

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category测试质量
PricingOpen source

> Related tools

J
Jest
JavaScript 测试框架
P
Playwright
现代端到端测试框架
E
eslint-plugin-test-selectors
Enforces that data-test-id attributes are added to interactive DOM elements (JSX) to help with UI testing. JSX only.