fork/cargo
git clone https://git.julia.blue/fork/cargo
f2932725b
0.93.0
1CARGO-FETCH(1) 2 3NAME 4 cargo-fetch — Fetch dependencies of a package from the network 5 6SYNOPSIS 7 cargo fetch [options] 8 9DESCRIPTION 10 If a Cargo.lock file is available, this command will ensure that all of 11 the git dependencies and/or registry dependencies are downloaded and 12 locally available. Subsequent Cargo commands will be able to run offline 13 after a cargo fetch unless the lock file changes. 14 15 If the lock file is not available, then this command will generate the 16 lock file before fetching the dependencies. 17 18 If --target is not specified, then all target dependencies are fetched. 19 20 See also the cargo-prefetch <https://crates.io/crates/cargo-prefetch> 21 plugin which adds a command to download popular crates. This may be 22 useful if you plan to use Cargo without a network with the --offline 23 flag. 24 25OPTIONS 26 Fetch options 27 --target triple 28 Fetch for the specified target architecture. Flag may be specified 29 multiple times. The default is all architectures. The general format 30 of the triple is <arch><sub>-<vendor>-<sys>-<abi>. 31 32 Possible values: 33 34 o Any supported target in rustc --print target-list. 35 36 o "host-tuple", which will internally be substituted by the 37 host’s target. This can be particularly useful if you’re 38 cross-compiling some crates, and don’t want to specify your 39 host’s machine as a target (for instance, an xtask in a shared 40 project that may be worked on by many hosts). 41 42 o A path to a custom target specification. See Custom Target Lookup 43 Path 44 <https://doc.rust-lang.org/rustc/targets/custom.html#custom-target-lookup-path> 45 for more information. 46 47 This may also be specified with the build.target config value 48 <https://doc.rust-lang.org/cargo/reference/config.html>. 49 50 Note that specifying this flag makes Cargo run in a different mode 51 where the target artifacts are placed in a separate directory. See 52 the build cache 53 <https://doc.rust-lang.org/cargo/reference/build-cache.html> 54 documentation for more details. 55 56 Display Options 57 -v, --verbose 58 Use verbose output. May be specified twice for “very verbose” 59 output which includes extra output such as dependency warnings and 60 build script output. May also be specified with the term.verbose 61 config value 62 <https://doc.rust-lang.org/cargo/reference/config.html>. 63 64 -q, --quiet 65 Do not print cargo log messages. May also be specified with the 66 term.quiet config value 67 <https://doc.rust-lang.org/cargo/reference/config.html>. 68 69 --color when 70 Control when colored output is used. Valid values: 71 72 o auto (default): Automatically detect if color support is 73 available on the terminal. 74 75 o always: Always display colors. 76 77 o never: Never display colors. 78 79 May also be specified with the term.color config value 80 <https://doc.rust-lang.org/cargo/reference/config.html>. 81 82 Manifest Options 83 --manifest-path path 84 Path to the Cargo.toml file. By default, Cargo searches for the 85 Cargo.toml file in the current directory or any parent directory. 86 87 --locked 88 Asserts that the exact same dependencies and versions are used as 89 when the existing Cargo.lock file was originally generated. Cargo 90 will exit with an error when either of the following scenarios 91 arises: 92 93 o The lock file is missing. 94 95 o Cargo attempted to change the lock file due to a different 96 dependency resolution. 97 98 It may be used in environments where deterministic builds are 99 desired, such as in CI pipelines. 100 101 --offline 102 Prevents Cargo from accessing the network for any reason. Without 103 this flag, Cargo will stop with an error if it needs to access the 104 network and the network is not available. With this flag, Cargo will 105 attempt to proceed without the network if possible. 106 107 Beware that this may result in different dependency resolution than 108 online mode. Cargo will restrict itself to crates that are 109 downloaded locally, even if there might be a newer version as 110 indicated in the local copy of the index. 111 112 May also be specified with the net.offline config value 113 <https://doc.rust-lang.org/cargo/reference/config.html>. 114 115 --frozen 116 Equivalent to specifying both --locked and --offline. 117 118 --lockfile-path PATH 119 Changes the path of the lockfile from the default 120 (<workspace_root>/Cargo.lock) to PATH. PATH must end with Cargo.lock 121 (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that 122 providing --lockfile-path will ignore existing lockfile at the 123 default path, and instead will either use the lockfile from PATH, or 124 write a new lockfile into the provided PATH if it doesn’t exist. 125 This flag can be used to run most commands in read-only directories, 126 writing lockfile into the provided PATH. 127 128 This option is only available on the nightly channel 129 <https://doc.rust-lang.org/book/appendix-07-nightly-rust.html> and 130 requires the -Z unstable-options flag to enable (see #14421 131 <https://github.com/rust-lang/cargo/issues/14421>). 132 133 Common Options 134 +toolchain 135 If Cargo has been installed with rustup, and the first argument to 136 cargo begins with +, it will be interpreted as a rustup toolchain 137 name (such as +stable or +nightly). See the rustup documentation 138 <https://rust-lang.github.io/rustup/overrides.html> for more 139 information about how toolchain overrides work. 140 141 --config KEY=VALUE or PATH 142 Overrides a Cargo configuration value. The argument should be in 143 TOML syntax of KEY=VALUE, or provided as a path to an extra 144 configuration file. This flag may be specified multiple times. See 145 the command-line overrides section 146 <https://doc.rust-lang.org/cargo/reference/config.html#command-line-overrides> 147 for more information. 148 149 -C PATH 150 Changes the current working directory before executing any specified 151 operations. This affects things like where cargo looks by default 152 for the project manifest (Cargo.toml), as well as the directories 153 searched for discovering .cargo/config.toml, for example. This 154 option must appear before the command name, for example cargo -C 155 path/to/my-project build. 156 157 This option is only available on the nightly channel 158 <https://doc.rust-lang.org/book/appendix-07-nightly-rust.html> and 159 requires the -Z unstable-options flag to enable (see #10098 160 <https://github.com/rust-lang/cargo/issues/10098>). 161 162 -h, --help 163 Prints help information. 164 165 -Z flag 166 Unstable (nightly-only) flags to Cargo. Run cargo -Z help for 167 details. 168 169ENVIRONMENT 170 See the reference 171 <https://doc.rust-lang.org/cargo/reference/environment-variables.html> 172 for details on environment variables that Cargo reads. 173 174EXIT STATUS 175 o 0: Cargo succeeded. 176 177 o 101: Cargo failed to complete. 178 179EXAMPLES 180 1. Fetch all dependencies: 181 182 cargo fetch 183 184SEE ALSO 185 cargo(1), cargo-update(1), cargo-generate-lockfile(1) 186