cargo-no-dev-deps

crates.io license rustc build status

Cargo subcommand for running cargo without dev-dependencies.

This is an extraction of the --no-dev-deps flag of cargo-hack to be used as a stand-alone cargo subcommand.

Usage

```console $ cargo no-dev-deps --help cargo-no-dev-deps

Cargo subcommand for running cargo without dev-dependencies.

USAGE: cargo no-dev-deps [CARGO_OPTIONS] ```

To run cargo check without dev-deps:

sh cargo no-dev-deps check

Installation

From source

sh cargo +stable install cargo-no-dev-deps --locked

Compiler support: requires rustc 1.60+

cargo-no-dev-deps is usually runnable with Cargo versions older than the Rust version required for installation (e.g., cargo +1.59 no-dev-deps check).

From prebuilt binaries

You can download prebuilt binaries from the Release page. Prebuilt binaries are available for macOS, Linux (gnu and musl), Windows (static executable), and FreeBSD.

Example of script to download cargo-no-dev-deps

```sh

Get host target

host=$(rustc -Vv | grep host | sed 's/host: //')

Download binary and install to $HOME/.cargo/bin

curl -LsSf https://github.com/taiki-e/cargo-no-dev-deps/releases/latest/download/cargo-no-dev-deps-$host.tar.gz | tar xzf - -C $HOME/.cargo/bin ```

On GitHub Actions

You can use taiki-e/install-action to install prebuilt binaries on Linux, macOS, and Windows. This makes the installation faster and may avoid the impact of problems caused by upstream changes.

yaml - uses: taiki-e/install-action@cargo-no-dev-deps

Via Homebrew

You can install cargo-no-dev-deps using Homebrew tap on macOS and Linux:

sh brew install taiki-e/tap/cargo-no-dev-deps

Via Scoop (Windows)

You can install cargo-no-dev-deps using Scoop:

sh scoop bucket add taiki-e https://github.com/taiki-e/scoop-bucket scoop install cargo-no-dev-deps

Via cargo-binstall

You can install cargo-no-dev-deps using cargo-binstall:

sh cargo binstall cargo-no-dev-deps

Related Projects

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

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.