@@ -17,9 +17,10 @@ <h2 id="cargo_install_synopsis">SYNOPSIS</h2>
17
17
< h2 id ="cargo_install_description "> DESCRIPTION</ h2 >
18
18
< div class ="sectionbody ">
19
19
< div class ="paragraph ">
20
- < p > This command manages Cargo’s local set of installed binary crates. Only packages
21
- which have < code > [[bin]]</ code > targets can be installed, and all binaries are installed into
22
- the installation root’s < code > bin</ code > folder.</ p >
20
+ < p > This command manages Cargo’s local set of installed binary crates. Only
21
+ packages which have executable < code > [[bin]]</ code > or < code > [[example]]</ code > targets can be
22
+ installed, and all executables are installed into the installation root’s
23
+ < code > bin</ code > folder.</ p >
23
24
</ div >
24
25
< div class ="paragraph ">
25
26
< p > The installation root is determined, in order of precedence:</ p >
@@ -45,7 +46,7 @@ <h2 id="cargo_install_description">DESCRIPTION</h2>
45
46
</ div >
46
47
< div class ="paragraph ">
47
48
< p > There are multiple sources from which a crate can be installed. The default
48
- location is crates.io but the < code > --git</ code > , < code > --path</ code > , and < code > registry</ code > flags can
49
+ location is crates.io but the < code > --git</ code > , < code > --path</ code > , and < code > -- registry</ code > flags can
49
50
change this source. If the source contains more than one package (such as
50
51
crates.io or a git repository with multiple crates) the < em > CRATE</ em > argument is
51
52
required to indicate which crate should be installed.</ p >
@@ -65,6 +66,21 @@ <h2 id="cargo_install_description">DESCRIPTION</h2>
65
66
path. In particular, this can be useful for caching build artifacts on
66
67
continuous integration systems.</ p >
67
68
</ div >
69
+ < div class ="paragraph ">
70
+ < p > By default, the < code > Cargo.lock</ code > file that is included with the package will be
71
+ ignored. This means that Cargo will recompute which versions of dependencies
72
+ to use, possibly using newer versions that have been released since the
73
+ package was published. The < code > --locked</ code > flag can be used to force Cargo to use
74
+ the packaged < code > Cargo.lock</ code > file if it is available. This may be useful for
75
+ ensuring reproducible builds, to use the exact same set of dependencies that
76
+ were available when the package was published. It may also be useful if a
77
+ newer version of a dependency is published that no longer builds on your
78
+ system, or has other problems. The downside to using < code > --locked</ code > is that you
79
+ will not receive any fixes or updates to any dependency. Note that Cargo did
80
+ not start publishing < code > Cargo.lock</ code > files until version 1.37, which means
81
+ packages published with prior versions will not have a < code > Cargo.lock</ code > file
82
+ available.</ p >
83
+ </ div >
68
84
</ div >
69
85
</ div >
70
86
< div class ="sect1 ">
0 commit comments