Installation#
cargo-feature-combinations installs a cargo subcommand. Once it’s on your PATH, cargo fc works from any crate or workspace.
From crates.io#
cargo install --locked cargo-feature-combinations--locked builds against the versions in the published Cargo.lock, which is the most reproducible option.
Homebrew#
A prebuilt binary is available through the author’s tap, which avoids compiling from source:
brew install --cask romnn/tap/cargo-fcNix#
There is an unofficial, community-maintained package (not maintained by the author of the tool):
nix-shell --packages cargo-feature-combinationsVerify the installation#
cargo fc version
# or
cargo fc --helpIf cargo fc is not found, confirm that Cargo’s binary directory (~/.cargo/bin by default) is on your PATH.
Requirements#
- Rust and Cargo.
cargo fcdrives your normal toolchain; use+toolchainjust as you would with cargo (for examplecargo fc +nightly check). cargo-zigbuildandzig— only if you cross-compile. When a non-host target is planned,cargo fcdefaults to thecargo-zigbuilddriver so native-C dependencies cross-compile cleanly. Host-only runs use plaincargoand need nothing extra. See Build drivers.
Use in GitHub Actions#
In CI you usually don’t cargo install; use the setup action instead, which downloads a released binary:
- uses: romnn/cargo-feature-combinations@main
- run: cargo fc checkSee Continuous integration for complete workflows.