1CARGO-GENERATE-LOCKFILE(1)  General Commands Manual CARGO-GENERATE-LOCKFILE(1)
2
3
4

NAME

6       cargo-generate-lockfile - Generate the lockfile for a package
7

SYNOPSIS

9       cargo generate-lockfile [options]
10

DESCRIPTION

12       This command will create the Cargo.lock lockfile for the current
13       package or workspace. If the lockfile already exists, it will be
14       rebuilt with the latest available version of every package.
15
16       See also cargo-update(1) which is also capable of creating a Cargo.lock
17       lockfile and has more options for controlling update behavior.
18

OPTIONS

20   Display Options
21       -v, --verbose
22           Use verbose output. May be specified twice for "very verbose"
23           output which includes extra output such as dependency warnings and
24           build script output. May also be specified with the term.verbose
25           config value
26           <https://doc.rust-lang.org/cargo/reference/config.html>.
27
28       -q, --quiet
29           Do not print cargo log messages. May also be specified with the
30           term.quiet config value
31           <https://doc.rust-lang.org/cargo/reference/config.html>.
32
33       --color when
34           Control when colored output is used. Valid values:
35
36auto (default): Automatically detect if color support is
37               available on the terminal.
38
39always: Always display colors.
40
41never: Never display colors.
42
43           May also be specified with the term.color config value
44           <https://doc.rust-lang.org/cargo/reference/config.html>.
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   Common Options
78       +toolchain
79           If Cargo has been installed with rustup, and the first argument to
80           cargo begins with +, it will be interpreted as a rustup toolchain
81           name (such as +stable or +nightly). See the rustup documentation
82           <https://rust-lang.github.io/rustup/overrides.html> for more
83           information about how toolchain overrides work.
84
85       --config KEY=VALUE or PATH
86           Overrides a Cargo configuration value. The argument should be in
87           TOML syntax of KEY=VALUE, or provided as a path to an extra
88           configuration file. This flag may be specified multiple times. See
89           the command-line overrides section
90           <https://doc.rust-lang.org/cargo/reference/config.html#command-line-overrides>
91           for more information.
92
93       -h, --help
94           Prints help information.
95
96       -Z flag
97           Unstable (nightly-only) flags to Cargo. Run cargo -Z help for
98           details.
99

ENVIRONMENT

101       See the reference
102       <https://doc.rust-lang.org/cargo/reference/environment-variables.html>
103       for details on environment variables that Cargo reads.
104

EXIT STATUS

1060: Cargo succeeded.
107
108101: Cargo failed to complete.
109

EXAMPLES

111        1. Create or update the lockfile for the current package or workspace:
112
113               cargo generate-lockfile
114

SEE ALSO

116       cargo(1), cargo-update(1)
117
118
119
120                                                    CARGO-GENERATE-LOCKFILE(1)
Impressum