CARGO-VENDOR-FILTERER(1)
π CARGO-VENDOR-FILTERER π
okay bestie, so this is cargo-vendor-filterer β it's literally cargo vendor, but with filtering for platforms and more π it lives in the General Commands Manual section of your friendly neighborhood man pages, and it's about to be your new fave.
β¨ SYNOPSIS β¨
cargo-vendor-filterer [OPTIONS] [PATH]
π DESCRIPTION π
so what it does is: it generates a vendor directory full of your dependent crates, but it filters which ones get in based on whatever conditions you picked. no cap. it's giving selective, it's giving curated, it's giving main character energy for your dependency tree π¦
πΈ Arguments πΈ
[PATH]β the output path, babe. if you don't say anything, it just defaults tovendor.
β¨ OPTIONS β¨
--platform <PLATFORM>β only pull in crates for these targets. yes,'*'wildcards work here, go wild π example:x86_64-unknown-linux-gnu.--tier <TIER>β clamps your platforms down to the tier you hand it. only"1"or"2", pick one.--exclude-crate-path <EXCLUDE_CRATE_PATH>β nukes files/subdirs inside crates that match an exact path. the format is"CRATENAME#PATH"where CRATENAME is a crate name (no version, bestie) or"*"as a wildcard meaning "all the crates". PATH has to be a relative path, and it can point at a regular file, a symbolic link, or a directory.
if the thing you named is a directory, it and everything inside it gets removed. so like, curl-sys#curl will rip the vendored libcurl C sources out of the curl-sys crate. and *#tests will remove the tests folder from literally every crate. iconic.
paths that don't exist will throw a warning at you, but as of right now that's not an error. so it'll yell, not crash π
--manifest-path <MANIFEST_PATH>β path to yourCargo.toml.--all-featuresβ turns on every single available feature. all of them. the whole menu π--no-default-featuresβ do not activate thedefaultfeature. respectfully declining.-F,--features <FEATURES>β a space- or comma-separated list of features to activate. features of workspace members can be turned on with thepackage-name/feature-namesyntax. you can pass this flag multiple times and it'll enable allll the features you listed π«Ά--keep-dep-kinds <KEEP_DEP_KINDS>β which dependency kinds you wanna keep: normal, build and/or development (dev). possible values areall(that's the 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]
- [possible values:
--format <FORMAT>β pick your output format, bestie.- [default:
dir] [possible values:dir,tar,tar.gz,tar.zstd]
- [default:
--prefix <PREFIX>β the file path name to use when you're generating a tar stream. it's suggested that you use--prefix=vendor. why isn't that just the default?? only for backwards compatibility. that's it. that's the reason π--offlineβ run it without touching the network. this gets passed down to stuff likecargo metadata --offline.--respect-source-configβ by default[source]configuration in.cargo/config.tomlgets ignored, but with this flag it's read and used when downloading crates from crates.io, for example ; this gets passed down to stuff likecargo vendor --respect-source-config.--versioned-dirsβ always shove the version into subdir names, even when there's only one version vendored ; this gets passed down to stuff likecargo vendor --versioned-dirs.-s,--sync <TOML>β an additionalCargo.tomlto sync and vendor π¦-h,--helpβ print the help (or peep a summary with'-h').-V,--versionβ print the version.
π EXAMPLES π
vendor dependencies for all platforms with default features (this is the same as plain cargo vendor):
$ cargo vendor-filterer
vendor only the dependencies needed for x86_64-unknown-linux-gnu:
$ cargo vendor-filterer --platform x86_64-unknown-linux-gnu
vendor dependencies but skip the dev-dependencies:
$ cargo vendor-filterer --keep-dep-kinds no-dev
lowkey a whole vibe. go filter something, bestie π
and that's the whole page!! this one's from the CARGO-VENDOR-FILTERER(1) manual, filed under General Commands Manual β so if you ever forget where you read it, it's right there in section 1, bestie. mwah ππβ¨
π¦ where this page comes from
- ubuntu stonking: cargo-vendor-filterer 0.5.18-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms