@@ -97,6 +97,10 @@ which is defined by the <code>registry.default</code> config key which defaults
97
97
98
98
<dl >
99
99
100
+ <dt class =" option-term " id =" option-cargo-add---dry-run " ><a class =" option-anchor " href =" #option-cargo-add---dry-run " ></a ><code >--dry-run</code ></dt >
101
+ <dd class =" option-desc " >Don't actually write the manifest</dd >
102
+
103
+
100
104
<dt class =" option-term " id =" option-cargo-add---rename " ><a class =" option-anchor " href =" #option-cargo-add---rename " ></a ><code >--rename</code > <em >name</em ></dt >
101
105
<dd class =" option-desc " ><a href =" ../reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml " >Rename</a > the dependency.</dd >
102
106
@@ -168,6 +172,36 @@ terminal.</li>
168
172
<code >Cargo.toml</code > file in the current directory or any parent directory.</dd >
169
173
170
174
175
+
176
+ <dt class =" option-term " id =" option-cargo-add--p " ><a class =" option-anchor " href =" #option-cargo-add--p " ></a ><code >-p</code > <em >spec</em ></dt >
177
+ <dt class =" option-term " id =" option-cargo-add---package " ><a class =" option-anchor " href =" #option-cargo-add---package " ></a ><code >--package</code > <em >spec</em ></dt >
178
+ <dd class =" option-desc " >Add dependencies to only the specified package.</dd >
179
+
180
+
181
+ <dt class =" option-term " id =" option-cargo-add---frozen " ><a class =" option-anchor " href =" #option-cargo-add---frozen " ></a ><code >--frozen</code ></dt >
182
+ <dt class =" option-term " id =" option-cargo-add---locked " ><a class =" option-anchor " href =" #option-cargo-add---locked " ></a ><code >--locked</code ></dt >
183
+ <dd class =" option-desc " >Either of these flags requires that the <code >Cargo.lock</code > file is
184
+ up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
185
+ exit with an error. The <code >--frozen</code > flag also prevents Cargo from
186
+ attempting to access the network to determine if it is out-of-date.</p >
187
+ <p >These may be used in environments where you want to assert that the
188
+ <code >Cargo.lock</code > file is up-to-date (such as a CI build) or want to avoid network
189
+ access.</dd >
190
+
191
+
192
+ <dt class =" option-term " id =" option-cargo-add---offline " ><a class =" option-anchor " href =" #option-cargo-add---offline " ></a ><code >--offline</code ></dt >
193
+ <dd class =" option-desc " >Prevents Cargo from accessing the network for any reason. Without this
194
+ flag, Cargo will stop with an error if it needs to access the network and
195
+ the network is not available. With this flag, Cargo will attempt to
196
+ proceed without the network if possible.</p >
197
+ <p >Beware that this may result in different dependency resolution than online
198
+ mode. Cargo will restrict itself to crates that are downloaded locally, even
199
+ if there might be a newer version as indicated in the local copy of the index.
200
+ See the <a href =" cargo-fetch.html " >cargo-fetch(1)</a > command to download dependencies before going
201
+ offline.</p >
202
+ <p >May also be specified with the <code >net.offline</code > <a href =" ../reference/config.html " >config value</a >.</dd >
203
+
204
+
171
205
</dl >
172
206
173
207
### Common Options
0 commit comments