1CARGO-VENDOR(1)             General Commands Manual            CARGO-VENDOR(1)
2
3
4

NAME

6       cargo-vendor - Vendor all dependencies locally
7

SYNOPSIS

9       cargo vendor [options] [path]
10

DESCRIPTION

12       This cargo subcommand will vendor all crates.io and git dependencies
13       for a project into the specified directory at <path>. After this
14       command completes the vendor directory specified by <path> will contain
15       all remote sources from dependencies specified. Additional manifests
16       beyond the default one can be specified with the -s option.
17
18       The cargo vendor command will also print out the configuration
19       necessary to use the vendored sources, which you will need to add to
20       .cargo/config.toml.
21

OPTIONS

23   Vendor Options
24       -s manifest, --sync manifest
25           Specify an extra Cargo.toml manifest to workspaces which should
26           also be vendored and synced to the output. May be specified
27           multiple times.
28
29       --no-delete
30           Don't delete the "vendor" directory when vendoring, but rather keep
31           all existing contents of the vendor directory
32
33       --respect-source-config
34           Instead of ignoring [source] configuration by default in
35           .cargo/config.toml read it and use it when downloading crates from
36           crates.io, for example
37
38       --versioned-dirs
39           Normally versions are only added to disambiguate multiple versions
40           of the same package. This option causes all directories in the
41           "vendor" directory to be versioned, which makes it easier to track
42           the history of vendored packages over time, and can help with the
43           performance of re-vendoring when only a subset of the packages have
44           changed.
45
46   Manifest Options
47       --manifest-path path
48           Path to the Cargo.toml file. By default, Cargo searches for the
49           Cargo.toml file in the current directory or any parent directory.
50
51       --frozen, --locked
52           Either of these flags requires that the Cargo.lock file is
53           up-to-date. If the lock file is missing, or it needs to be updated,
54           Cargo will exit with an error. The --frozen flag also prevents
55           Cargo from attempting to access the network to determine if it is
56           out-of-date.
57
58           These may be used in environments where you want to assert that the
59           Cargo.lock file is up-to-date (such as a CI build) or want to avoid
60           network access.
61
62       --offline
63           Prevents Cargo from accessing the network for any reason. Without
64           this flag, Cargo will stop with an error if it needs to access the
65           network and the network is not available. With this flag, Cargo
66           will attempt to proceed without the network if possible.
67
68           Beware that this may result in different dependency resolution than
69           online mode. Cargo will restrict itself to crates that are
70           downloaded locally, even if there might be a newer version as
71           indicated in the local copy of the index. See the cargo-fetch(1)
72           command to download dependencies before going offline.
73
74           May also be specified with the net.offline config value
75           <https://doc.rust-lang.org/cargo/reference/config.html>.
76
77   Display Options
78       -v, --verbose
79           Use verbose output. May be specified twice for "very verbose"
80           output which includes extra output such as dependency warnings and
81           build script output. May also be specified with the term.verbose
82           config value
83           <https://doc.rust-lang.org/cargo/reference/config.html>.
84
85       -q, --quiet
86           Do not print cargo log messages. May also be specified with the
87           term.quiet config value
88           <https://doc.rust-lang.org/cargo/reference/config.html>.
89
90       --color when
91           Control when colored output is used. Valid values:
92
93auto (default): Automatically detect if color support is
94               available on the terminal.
95
96always: Always display colors.
97
98never: Never display colors.
99
100           May also be specified with the term.color config value
101           <https://doc.rust-lang.org/cargo/reference/config.html>.
102
103   Common Options
104       +toolchain
105           If Cargo has been installed with rustup, and the first argument to
106           cargo begins with +, it will be interpreted as a rustup toolchain
107           name (such as +stable or +nightly). See the rustup documentation
108           <https://rust-lang.github.io/rustup/overrides.html> for more
109           information about how toolchain overrides work.
110
111       --config KEY=VALUE or PATH
112           Overrides a Cargo configuration value. The argument should be in
113           TOML syntax of KEY=VALUE, or provided as a path to an extra
114           configuration file. This flag may be specified multiple times. See
115           the command-line overrides section
116           <https://doc.rust-lang.org/cargo/reference/config.html#command-line-overrides>
117           for more information.
118
119       -h, --help
120           Prints help information.
121
122       -Z flag
123           Unstable (nightly-only) flags to Cargo. Run cargo -Z help for
124           details.
125

ENVIRONMENT

127       See the reference
128       <https://doc.rust-lang.org/cargo/reference/environment-variables.html>
129       for details on environment variables that Cargo reads.
130

EXIT STATUS

1320: Cargo succeeded.
133
134101: Cargo failed to complete.
135

EXAMPLES

137        1. Vendor all dependencies into a local "vendor" folder
138
139               cargo vendor
140
141        2. Vendor all dependencies into a local "third-party/vendor" folder
142
143               cargo vendor third-party/vendor
144
145        3. Vendor the current workspace as well as another to "vendor"
146
147               cargo vendor -s ../path/to/Cargo.toml
148

SEE ALSO

150       cargo(1)
151
152
153
154                                                               CARGO-VENDOR(1)
Impressum