CARGO-VENDOR-FILTERER(1)

πŸ“¦ version 0.5.18, in ubuntu stonking

πŸ‘‘ 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 to vendor.

✨ 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 your Cargo.toml.
  • --all-features β€” turns on every single available feature. all of them. the whole menu πŸ“
  • --no-default-features β€” do not activate the default feature. respectfully declining.
  • -F, --features <FEATURES> β€” a space- or comma-separated list of features to activate. features of workspace members can be turned on with the package-name/feature-name syntax. 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 are all (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]
  • --format <FORMAT> β€” pick your output format, bestie.
    • [default: dir] [possible values: dir, tar, tar.gz, tar.zstd]
  • --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 like cargo metadata --offline.
  • --respect-source-config β€” by default [source] configuration in .cargo/config.toml gets ignored, but with this flag it's read and used when downloading crates from crates.io, for example ; this gets passed down to stuff like cargo 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 like cargo vendor --versioned-dirs.
  • -s, --sync <TOML> β€” an additional Cargo.toml to 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