Awesome Reviewers

Verification · Testing · Version and platform matrix

Feature powerset

Build and test each combination of optional features or extras.

How to build it

  1. Run cargo hack with --feature-powerset in CI, bounding cost with --depth if needed.
  2. Exclude feature combinations that cannot build, with a reason in the config.
  3. Run the test suite for each combination that builds.

Signals in a repository

  • cargo hack --feature-powerset steps in a workflow file.
  • Feature lists in Cargo.toml with exclude or depth settings in the CI command.
  • CI logs that show one run per feature combination.

In practice

4 repositories run a tool for this check in the scanned set.

  • cargo-hack · 4 repos

Examples

  • pola-rs/polars · cargo-hack

    cargo hack check -p polars --each-feature --no-dev-deps
  • juspay/hyperswitch · cargo-hack

    cargo hack check --workspace --each-feature --all-targets --exclude-features v2 payment_v2
  • tokio-rs/tokio · cargo-hack

    cargo hack test --each-feature
  • tokio-rs/axum · cargo-hack

    cargo hack check --each-feature --no-dev-deps --all