fork/cargo
git clone https://git.julia.blue/fork/cargo
88957a1b7
0.93.0
1CARGO-VENDOR(1) 2 3NAME 4 cargo-vendor — Vendor all dependencies locally 5 6SYNOPSIS 7 cargo vendor [options] [path] 8 9DESCRIPTION 10 This cargo subcommand will vendor all crates.io and git dependencies for 11 a project into the specified directory at <path>. After this command 12 completes the vendor directory specified by <path> will contain all 13 remote sources from dependencies specified. Additional manifests beyond 14 the default one can be specified with the -s option. 15 16 The configuration necessary to use the vendored sources would be printed 17 to stdout after cargo vendor completes the vendoring process. You will 18 need to add or redirect it to your Cargo configuration file, which is 19 usually .cargo/config.toml locally for the current package. 20 21 Cargo treats vendored sources as read-only as it does to registry and 22 git sources. If you intend to modify a crate from a remote source, use 23 [patch] or a path dependency pointing to a local copy of that crate. 24 Cargo will then correctly handle the crate on incremental rebuilds, as 25 it knows that it is no longer a read-only dependency. 26 27OPTIONS 28 Vendor Options 29 -s manifest, --sync manifest 30 Specify an extra Cargo.toml manifest to workspaces which should also 31 be vendored and synced to the output. May be specified multiple 32 times. 33 34 --no-delete 35 Don’t delete the “vendor” directory when vendoring, but rather 36 keep all existing contents of the vendor directory 37 38 --respect-source-config 39 Instead of ignoring [source] configuration by default in 40 .cargo/config.toml read it and use it when downloading crates from 41 crates.io, for example 42 43 --versioned-dirs 44 Normally versions are only added to disambiguate multiple versions 45 of the same package. This option causes all directories in the 46 “vendor” directory to be versioned, which makes it easier to 47 track the history of vendored packages over time, and can help with 48 the performance of re-vendoring when only a subset of the packages 49 have changed. 50 51 Manifest Options 52 --manifest-path path 53 Path to the Cargo.toml file. By default, Cargo searches for the 54 Cargo.toml file in the current directory or any parent directory. 55 56 --locked 57 Asserts that the exact same dependencies and versions are used as 58 when the existing Cargo.lock file was originally generated. Cargo 59 will exit with an error when either of the following scenarios 60 arises: 61 62 o The lock file is missing. 63 64 o Cargo attempted to change the lock file due to a different 65 dependency resolution. 66 67 It may be used in environments where deterministic builds are 68 desired, such as in CI pipelines. 69 70 --offline 71 Prevents Cargo from accessing the network for any reason. Without 72 this flag, Cargo will stop with an error if it needs to access the 73 network and the network is not available. With this flag, Cargo will 74 attempt to proceed without the network if possible. 75 76 Beware that this may result in different dependency resolution than 77 online mode. Cargo will restrict itself to crates that are 78 downloaded locally, even if there might be a newer version as 79 indicated in the local copy of the index. See the cargo-fetch(1) 80 command to download dependencies before going offline. 81 82 May also be specified with the net.offline config value 83 <https://doc.rust-lang.org/cargo/reference/config.html>. 84 85 --frozen 86 Equivalent to specifying both --locked and --offline. 87 88 --lockfile-path PATH 89 Changes the path of the lockfile from the default 90 (<workspace_root>/Cargo.lock) to PATH. PATH must end with Cargo.lock 91 (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that 92 providing --lockfile-path will ignore existing lockfile at the 93 default path, and instead will either use the lockfile from PATH, or 94 write a new lockfile into the provided PATH if it doesn’t exist. 95 This flag can be used to run most commands in read-only directories, 96 writing lockfile into the provided PATH. 97 98 This option is only available on the nightly channel 99 <https://doc.rust-lang.org/book/appendix-07-nightly-rust.html> and 100 requires the -Z unstable-options flag to enable (see #14421 101 <https://github.com/rust-lang/cargo/issues/14421>). 102 103 Display Options 104 -v, --verbose 105 Use verbose output. May be specified twice for “very verbose” 106 output which includes extra output such as dependency warnings and 107 build script output. May also be specified with the term.verbose 108 config value 109 <https://doc.rust-lang.org/cargo/reference/config.html>. 110 111 -q, --quiet 112 Do not print cargo log messages. May also be specified with the 113 term.quiet config value 114 <https://doc.rust-lang.org/cargo/reference/config.html>. 115 116 --color when 117 Control when colored output is used. Valid values: 118 119 o auto (default): Automatically detect if color support is 120 available on the terminal. 121 122 o always: Always display colors. 123 124 o never: Never display colors. 125 126 May also be specified with the term.color config value 127 <https://doc.rust-lang.org/cargo/reference/config.html>. 128 129 Common Options 130 +toolchain 131 If Cargo has been installed with rustup, and the first argument to 132 cargo begins with +, it will be interpreted as a rustup toolchain 133 name (such as +stable or +nightly). See the rustup documentation 134 <https://rust-lang.github.io/rustup/overrides.html> for more 135 information about how toolchain overrides work. 136 137 --config KEY=VALUE or PATH 138 Overrides a Cargo configuration value. The argument should be in 139 TOML syntax of KEY=VALUE, or provided as a path to an extra 140 configuration file. This flag may be specified multiple times. See 141 the command-line overrides section 142 <https://doc.rust-lang.org/cargo/reference/config.html#command-line-overrides> 143 for more information. 144 145 -C PATH 146 Changes the current working directory before executing any specified 147 operations. This affects things like where cargo looks by default 148 for the project manifest (Cargo.toml), as well as the directories 149 searched for discovering .cargo/config.toml, for example. This 150 option must appear before the command name, for example cargo -C 151 path/to/my-project build. 152 153 This option is only available on the nightly channel 154 <https://doc.rust-lang.org/book/appendix-07-nightly-rust.html> and 155 requires the -Z unstable-options flag to enable (see #10098 156 <https://github.com/rust-lang/cargo/issues/10098>). 157 158 -h, --help 159 Prints help information. 160 161 -Z flag 162 Unstable (nightly-only) flags to Cargo. Run cargo -Z help for 163 details. 164 165ENVIRONMENT 166 See the reference 167 <https://doc.rust-lang.org/cargo/reference/environment-variables.html> 168 for details on environment variables that Cargo reads. 169 170EXIT STATUS 171 o 0: Cargo succeeded. 172 173 o 101: Cargo failed to complete. 174 175EXAMPLES 176 1. Vendor all dependencies into a local “vendor” folder 177 178 cargo vendor 179 180 2. Vendor all dependencies into a local “third-party/vendor” folder 181 182 cargo vendor third-party/vendor 183 184 3. Vendor the current workspace as well as another to “vendor” 185 186 cargo vendor -s ../path/to/Cargo.toml 187 188 4. Vendor and redirect the necessary vendor configs to a config file. 189 190 cargo vendor > path/to/my/cargo/config.toml 191 192SEE ALSO 193 cargo(1) 194