Skip to content

Commit 05ee4c6

Browse files
committed
doc (book)[10/14]: "Cargo Guide"/"Cargo.toml vs...": link terms to glossary
The following term(s) are linked to their Glossary entries: - manifest - package
1 parent 1fbc992 commit 05ee4c6

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

src/doc/src/guide/cargo-toml-vs-cargo-lock.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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
1618
FAQ](../faq.md#why-do-binaries-have-cargolock-in-version-control-but-not-libraries).
1719

1820
Let’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
101103
that the argument to `cargo update` is actually a
102104
[Package ID Specification](../reference/pkgid-spec.md) and `rand` is just a short
103105
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

Comments
 (0)