@@ -8,18 +8,20 @@ about them, here’s a summary:
8
8
* ` Cargo.lock ` contains exact information about your dependencies. It is
9
9
maintained by Cargo and should not be manually edited.
10
10
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
15
17
[ "Why do binaries have ` Cargo.lock ` in version control, but not libraries?" in the
16
18
FAQ] ( ../faq.md#why-do-binaries-have-cargolock-in-version-control-but-not-libraries ) .
17
19
18
20
Let’s dig in a little bit more.
19
21
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:
23
25
24
26
``` toml
25
27
[package ]
@@ -101,3 +103,6 @@ This will write out a new `Cargo.lock` with the new version information. Note
101
103
that the argument to ` cargo update ` is actually a
102
104
[ Package ID Specification] ( ../reference/pkgid-spec.md ) and ` rand ` is just a short
103
105
specification.
106
+
107
+ [ def-manifest ] : ../appendix/glossary.md#manifest ' "manifest" (glossary entry) '
108
+ [ def-package ] : ../appendix/glossary.md#package ' "package" (glossary entry) '
0 commit comments