cargo-vendor(1)
NAME
cargo-vendor --- Vendor all dependencies locally
SYNOPSIS
cargo vendor [options] [path]
DESCRIPTION
This cargo subcommand will vendor all crates.io and git dependencies for a
project into the specified directory at <path>. After this command completes
the vendor directory specified by <path> will contain all remote sources from
dependencies specified. Additional manifests beyond the default one can be
specified with the -s option.
The configuration necessary to use the vendored sources would be printed to
stdout after cargo vendor completes the vendoring process.
You will need to add or redirect it to your Cargo configuration file,
which is usually .cargo/config.toml locally for the current package.
Cargo treats vendored sources as read-only as it does to registry and git sources.
If you intend to modify a crate from a remote source,
use [patch] or a path dependency pointing to a local copy of that crate.
Cargo will then correctly handle the crate on incremental rebuilds,
as it knows that it is no longer a read-only dependency.
OPTIONS
Vendor Options
Manifest Options
Display Options
Common Options
ENVIRONMENT
See the reference for details on environment variables that Cargo reads.
EXIT STATUS
0: Cargo succeeded.101: Cargo failed to complete.
EXAMPLES
-
Vendor all dependencies into a local "vendor" folder
cargo vendor -
Vendor all dependencies into a local "third-party/vendor" folder
cargo vendor third-party/vendor -
Vendor the current workspace as well as another to "vendor"
cargo vendor -s ../path/to/Cargo.toml -
Vendor and redirect the necessary vendor configs to a config file.
cargo vendor > path/to/my/cargo/config.toml