@@ -17,9 +17,10 @@ <h2 id="cargo_install_synopsis">SYNOPSIS</h2>
1717< h2 id ="cargo_install_description "> DESCRIPTION</ h2 >
1818< div class ="sectionbody ">
1919< 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 >
2324</ div >
2425< div class ="paragraph ">
2526< p > The installation root is determined, in order of precedence:</ p >
@@ -45,7 +46,7 @@ <h2 id="cargo_install_description">DESCRIPTION</h2>
4546</ div >
4647< div class ="paragraph ">
4748< 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
4950change this source. If the source contains more than one package (such as
5051crates.io or a git repository with multiple crates) the < em > CRATE</ em > argument is
5152required to indicate which crate should be installed.</ p >
@@ -65,6 +66,21 @@ <h2 id="cargo_install_description">DESCRIPTION</h2>
6566path. In particular, this can be useful for caching build artifacts on
6667continuous integration systems.</ p >
6768</ 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 >
6884</ div >
6985</ div >
7086< div class ="sect1 ">
0 commit comments