cargo-hack
Cargo subcommand to provide various options useful for testing and continuous integration.
USAGE:
cargo hack [OPTIONS] [SUBCOMMAND]
Use -h for short descriptions and --help for more details.
OPTIONS:
-p, --package <SPEC>... Package(s) to check
--all Alias for --workspace
--workspace Perform command for all packages in the workspace
--exclude <SPEC>... Exclude packages from the check
--manifest-path <PATH> Path to Cargo.toml
-F, --features <FEATURES>... Space-separated list of features to activate
--each-feature Perform for each feature of the package
--feature-powerset Perform for the feature powerset of the package
--optional-deps [DEPS]... Use optional dependencies as features
--skip <FEATURES>... Alias for --exclude-features
--exclude-features <FEATURES>... Space-separated list of features to exclude
--exclude-no-default-features Exclude run of just --no-default-features flag
--exclude-all-features Exclude run of just --all-features flag
--depth <NUM> Specify a max number of simultaneous feature flags of
--feature-powerset
--group-features <FEATURES>... Space-separated list of features to group
--include-features <FEATURES>... Include only the specified features in the feature
combinations instead of package features
--no-dev-deps Perform without dev-dependencies
--remove-dev-deps Equivalent to --no-dev-deps flag except for does not
restore the original `Cargo.toml` after performed
--ignore-private Skip to perform on `publish = false` packages
--ignore-unknown-features Skip passing --features flag to `cargo` if that feature
does not exist in the package
--version-range <START>..[END] Perform commands on a specified (inclusive) range of Rust
versions
--version-step <NUM> Specify the version interval of --version-range (default
to `1`)
--clean-per-run Remove artifacts for that package before running the
command
--clean-per-version Remove artifacts per Rust version
--keep-going Keep going on failure
-v, --verbose Use verbose output
--color <WHEN> Coloring: auto, always, never
-h, --help Prints help information
-V, --version Prints version information
Some common cargo commands are (see all commands with --list):
build Compile the current package
check Analyze the current package and report errors, but don't build object files
run Run a binary or example of the local package
test Run the tests