Scroll to navigation

CARGO-VENDOR-FILTERER(1) General Commands Manual CARGO-VENDOR-FILTERER(1)

NAME

cargo-vendor-filterer - `cargo vendor`, but with filtering for platforms and more

SYNOPSIS

cargo-vendor-filterer [OPTIONS] [PATH]

DESCRIPTION

Generate a vendor directory of dependent crates, filtering based on specified conditions.

Arguments:

[PATH]
The output path. Defaults to "vendor".

OPTIONS

--platform <PLATFORM>

Only include crates for these targets ('*' wildcards are supported).
For example, `x86_64-unknown-linux-gnu`.

--tier <TIER>

Limit platforms to the provided tier ("1" or "2")

--exclude-crate-path <EXCLUDE_CRATE_PATH>

Remove files/subdirectories in crates that match an exact path. The format is "CRATENAME#PATH". CRATENAME is the name of a crate (without a version included) or "*" as a wildcard for all crates. PATH must be a relative path, and can name a regular file, symbolic link or a directory.
If the filename matches a directory, it and all its contents will be removed. For example, `curl-sys#curl` will remove the vendored libcurl C sources from the `curl-sys` crate. For example, `*#tests` will remove tests folder from all crates.
Nonexistent paths will emit a warning, but are not currently an error.

--manifest-path <MANIFEST_PATH>

Path to Cargo.toml

--all-features

Activate all available features

--no-default-features

Do not activate the `default` feature

-F, --features <FEATURES>

Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may be specified multiple times, which enables all specified features

--keep-dep-kinds <KEEP_DEP_KINDS>

Dependencies kinds you want to keep: normal, build and/or development (dev). Possible values: all (default), normal, build, dev, no-normal, no-build, no-dev Ref: <https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html>
[possible values: all, normal, build, dev, no-normal, no-build, no-dev]

--format <FORMAT>

Pick the output format
[default: dir] [possible values: dir, tar, tar.gz, tar.zstd]

--prefix <PREFIX>

It's suggested to use `--prefix=vendor`; this is not the default only for
backwards compatibilty

--offline

Run without accessing the network; this is passed down to e.g. `cargo metadata --offline`

--respect-source-config

Instead of ignoring [source] configuration by default in `.cargo/config.toml` read it and use it when downloading crates from crates.io, for example ; this is passed down to e.g. `cargo vendor --respect-source-config`

--versioned-dirs

Always include version in subdir names, even if we have only one version vendored ; this is passed down to e.g. `cargo vendor --versioned-dirs`

-s, --sync <TOML>

Additional `Cargo.toml` to sync and vendor

-h, --help

Print help (see a summary with '-h')

-V, --version

Print version

EXAMPLES

$ cargo vendor-filterer
$ cargo vendor-filterer --platform x86_64-unknown-linux-gnu
$ cargo vendor-filterer --keep-dep-kinds no-dev