1CARGO-FETCH(1)                                                  CARGO-FETCH(1)
2
3
4

NAME

6       cargo-fetch - Fetch dependencies of a package from the network
7

SYNOPSIS

9       cargo fetch [OPTIONS]
10

DESCRIPTION

12       If a Cargo.lock file is available, this command will ensure that all of
13       the git dependencies and/or registry dependencies are downloaded and
14       locally available. Subsequent Cargo commands never touch the network
15       after a cargo fetch unless the lock file changes.
16
17       If the lock file is not available, then this command will generate the
18       lock file before fetching the dependencies.
19
20       If --target is not specified, then all target dependencies are fetched.
21

OPTIONS

23   Fetch options
24       --target TRIPLE
25           Fetch for the given architecture. The default is the host
26           architecture. The general format of the triple is
27           <arch><sub>-<vendor>-<sys>-<abi>. Run rustc --print target-list for
28           a list of supported targets.
29
30           This may also be specified with the build.target config value
31           <https://doc.rust-lang.org/cargo/reference/config.html>.
32
33   Display Options
34       -v, --verbose
35           Use verbose output. May be specified twice for "very verbose"
36           output which includes extra output such as dependency warnings and
37           build script output. May also be specified with the term.verbose
38           config value
39           <https://doc.rust-lang.org/cargo/reference/config.html>.
40
41       -q, --quiet
42           No output printed to stdout.
43
44       --color WHEN
45           Control when colored output is used. Valid values:
46
47           ·   auto (default): Automatically detect if color support is
48               available on the terminal.
49
50           ·   always: Always display colors.
51
52           ·   never: Never display colors.
53
54           May also be specified with the term.color config value
55           <https://doc.rust-lang.org/cargo/reference/config.html>.
56
57   Manifest Options
58       --manifest-path PATH
59           Path to the Cargo.toml file. By default, Cargo searches in the
60           current directory or any parent directory for the Cargo.toml file.
61
62       --frozen, --locked
63           Either of these flags requires that the Cargo.lock file is
64           up-to-date. If the lock file is missing, or it needs to be updated,
65           Cargo will exit with an error. The --frozen flag also prevents
66           Cargo from attempting to access the network to determine if it is
67           out-of-date.
68
69           These may be used in environments where you want to assert that the
70           Cargo.lock file is up-to-date (such as a CI build) or want to avoid
71           network access.
72
73   Common Options
74       -h, --help
75           Prints help information.
76
77       -Z FLAG...
78           Unstable (nightly-only) flags to Cargo. Run cargo -Z help for
79           details.
80

ENVIRONMENT

82       See the reference
83       <https://doc.rust-lang.org/cargo/reference/environment-variables.html>
84       for details on environment variables that Cargo reads.
85

EXIT STATUS

87       0
88           Cargo succeeded.
89
90       101
91           Cargo failed to complete.
92

EXAMPLES

94        1. Fetch all dependencies:
95
96               cargo fetch
97

SEE ALSO

99       cargo(1), cargo-update(1), cargo-generate-lockfile(1)
100
101
102
103                                  2018-12-20                    CARGO-FETCH(1)
Impressum