@@ -8,18 +8,20 @@ about them, here’s a summary:
88* ` Cargo.lock ` contains exact information about your dependencies. It is
99 maintained by Cargo and should not be manually edited.
1010
11- If you’re building a non-end product, such as a rust library that other rust packages will depend on, put
12- ` Cargo.lock ` in your ` .gitignore ` . If you’re building an end product, which are executable
13- like command-line tool or an application, or a system library with crate-type of ` staticlib ` or ` cdylib ` ,
14- check ` Cargo.lock ` into ` git ` . If you're curious about why that is, see
11+ If you’re building a non-end product, such as a rust library that other rust
12+ [ packages] [ def-package ] will depend on, put ` Cargo.lock ` in your
13+ ` .gitignore ` . If you’re building an end product, which are executable like
14+ command-line tool or an application, or a system library with crate-type of
15+ ` staticlib ` or ` cdylib ` , check ` Cargo.lock ` into ` git ` . If you're curious
16+ about why that is, see
1517[ "Why do binaries have ` Cargo.lock ` in version control, but not libraries?" in the
1618FAQ] ( ../faq.md#why-do-binaries-have-cargolock-in-version-control-but-not-libraries ) .
1719
1820Let’s dig in a little bit more.
1921
20- ` Cargo.toml ` is a ** manifest** file in which we can specify a bunch of
21- different metadata about our package. For example, we can say that we depend
22- on another package:
22+ ` Cargo.toml ` is a [ ** manifest** ] [ def-manifest ] file in which we can specify a
23+ bunch of different metadata about our package. For example, we can say that we
24+ depend on another package:
2325
2426``` toml
2527[package ]
@@ -101,3 +103,6 @@ This will write out a new `Cargo.lock` with the new version information. Note
101103that the argument to ` cargo update ` is actually a
102104[ Package ID Specification] ( ../reference/pkgid-spec.md ) and ` rand ` is just a short
103105specification.
106+
107+ [ def-manifest ] : ../appendix/glossary.md#manifest ' "manifest" (glossary entry) '
108+ [ def-package ] : ../appendix/glossary.md#package ' "package" (glossary entry) '
0 commit comments