blob: 107b8c45e76214531ddbd047d549dd1ec0d81adb [file] [log] [blame]
Matthew Maurerbd398542019-09-05 16:25:08 -07001'\" t
2.\" Title: cargo-generate-lockfile
3.\" Author: [see the "AUTHOR(S)" section]
4.\" Generator: Asciidoctor 1.5.8
5.\" Date: 2019-04-16
6.\" Manual: \ \&
7.\" Source: \ \&
8.\" Language: English
9.\"
10.TH "CARGO\-GENERATE\-LOCKFILE" "1" "2019-04-16" "\ \&" "\ \&"
11.ie \n(.g .ds Aq \(aq
12.el .ds Aq '
13.ss \n[.ss] 0
14.nh
15.ad l
16.de URL
17\fI\\$2\fP <\\$1>\\$3
18..
19.als MTO URL
20.if \n[.g] \{\
21. mso www.tmac
22. am URL
23. ad l
24. .
25. am MTO
26. ad l
27. .
28. LINKSTYLE blue R < >
29.\}
30.SH "NAME"
31cargo\-generate\-lockfile \- Generate the lockfile for a package
32.SH "SYNOPSIS"
33.sp
34\fBcargo generate\-lockfile [\fIOPTIONS\fP]\fP
35.SH "DESCRIPTION"
36.sp
37This command will create the \fBCargo.lock\fP lockfile for the current package or
38workspace. If the lockfile already exists, it will be rebuilt if there are any
39manifest changes or dependency updates.
40.sp
41See also \fBcargo\-update\fP(1) which is also capable of creating a \fBCargo.lock\fP
42lockfile and has more options for controlling update behavior.
43.SH "OPTIONS"
44.SS "Display Options"
45.sp
46\fB\-v\fP, \fB\-\-verbose\fP
47.RS 4
48Use verbose output. May be specified twice for "very verbose" output which
49includes extra output such as dependency warnings and build script output.
50May also be specified with the \fBterm.verbose\fP
51.URL "https://doc.rust\-lang.org/cargo/reference/config.html" "config value" "."
52.RE
53.sp
54\fB\-q\fP, \fB\-\-quiet\fP
55.RS 4
56No output printed to stdout.
57.RE
58.sp
59\fB\-\-color\fP \fIWHEN\fP
60.RS 4
61Control when colored output is used. Valid values:
62.sp
63.RS 4
64.ie n \{\
65\h'-04'\(bu\h'+03'\c
66.\}
67.el \{\
68. sp -1
69. IP \(bu 2.3
70.\}
71\fBauto\fP (default): Automatically detect if color support is available on the
72terminal.
73.RE
74.sp
75.RS 4
76.ie n \{\
77\h'-04'\(bu\h'+03'\c
78.\}
79.el \{\
80. sp -1
81. IP \(bu 2.3
82.\}
83\fBalways\fP: Always display colors.
84.RE
85.sp
86.RS 4
87.ie n \{\
88\h'-04'\(bu\h'+03'\c
89.\}
90.el \{\
91. sp -1
92. IP \(bu 2.3
93.\}
94\fBnever\fP: Never display colors.
95.RE
96.sp
97May also be specified with the \fBterm.color\fP
98.URL "https://doc.rust\-lang.org/cargo/reference/config.html" "config value" "."
99.RE
100.SS "Manifest Options"
101.sp
102\fB\-\-manifest\-path\fP \fIPATH\fP
103.RS 4
104Path to the \fBCargo.toml\fP file. By default, Cargo searches in the current
105directory or any parent directory for the \fBCargo.toml\fP file.
106.RE
107.sp
108\fB\-\-frozen\fP, \fB\-\-locked\fP
109.RS 4
110Either of these flags requires that the \fBCargo.lock\fP file is
111up\-to\-date. If the lock file is missing, or it needs to be updated, Cargo will
112exit with an error. The \fB\-\-frozen\fP flag also prevents Cargo from
113attempting to access the network to determine if it is out\-of\-date.
114.sp
115These may be used in environments where you want to assert that the
116\fBCargo.lock\fP file is up\-to\-date (such as a CI build) or want to avoid network
117access.
118.RE
119.sp
120\fB\-\-offline\fP
121.RS 4
122Prevents Cargo from accessing the network for any reason. Without this
123flag, Cargo will stop with an error if it needs to access the network and
124the network is not available. With this flag, Cargo will attempt to
125proceed without the network if possible.
126.sp
127Beware that this may result in different dependency resolution than online
128mode. Cargo will restrict itself to crates that are downloaded locally, even
129if there might be a newer version as indicated in the local copy of the index.
130See the \fBcargo\-fetch\fP(1) command to download dependencies before going
131offline.
132.sp
133May also be specified with the \fBnet.offline\fP \c
134.URL "https://doc.rust\-lang.org/cargo/reference/config.html" "config value" "."
135.RE
136.SS "Common Options"
137.sp
138\fB\-h\fP, \fB\-\-help\fP
139.RS 4
140Prints help information.
141.RE
142.sp
143\fB\-Z\fP \fIFLAG\fP...
144.RS 4
145Unstable (nightly\-only) flags to Cargo. Run \fBcargo \-Z help\fP for
146details.
147.RE
148.SH "ENVIRONMENT"
149.sp
150See \c
151.URL "https://doc.rust\-lang.org/cargo/reference/environment\-variables.html" "the reference" " "
152for
153details on environment variables that Cargo reads.
154.SH "EXIT STATUS"
155.sp
1560
157.RS 4
158Cargo succeeded.
159.RE
160.sp
161101
162.RS 4
163Cargo failed to complete.
164.RE
165.SH "EXAMPLES"
166.sp
167.RS 4
168.ie n \{\
169\h'-04' 1.\h'+01'\c
170.\}
171.el \{\
172. sp -1
173. IP " 1." 4.2
174.\}
175Create or update the lockfile for the current package or workspace:
176.sp
177.if n .RS 4
178.nf
179cargo generate\-lockfile
180.fi
181.if n .RE
182.RE
183.SH "SEE ALSO"
184.sp
185\fBcargo\fP(1), \fBcargo\-update\fP(1)