File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 1
1
## Dependencies
2
2
3
- [ crates.io] is the Rust community's central package registry that serves as a
4
- location to discover and download packages. ` cargo ` is configured to use it by
5
- default to find requested packages.
3
+ [ crates.io] is the Rust community's central [ * package registry* ] [ def-package-registry ]
4
+ that serves as a location to discover and download
5
+ [ packages] [ def-package ] . ` cargo ` is configured to use it by default to find
6
+ requested packages.
6
7
7
8
To depend on a library hosted on [ crates.io] , add it to your ` Cargo.toml ` .
8
9
9
10
[ crates.io ] : https://crates.io/
10
11
11
12
### Adding a dependency
12
13
13
- If your ` Cargo.toml ` doesn't already have a ` [dependencies] ` section, add that,
14
- then list the crate name and version that you would like to use. This example
15
- adds a dependency of the ` time ` crate:
14
+ If your ` Cargo.toml ` doesn't already have a ` [dependencies] ` section, add
15
+ that, then list the [ crate] [ def-crate ] name and version that you would like to
16
+ use. This example adds a dependency of the ` time ` crate:
16
17
17
18
``` toml
18
19
[dependencies ]
@@ -87,3 +88,7 @@ $ cargo run
87
88
Running `target/hello_world`
88
89
Did our date match? true
89
90
```
91
+
92
+ [ def-crate ] : ../appendix/glossary.md#crate ' "crate" (glossary entry) '
93
+ [ def-package ] : ../appendix/glossary.md#package ' "package" (glossary entry) '
94
+ [ def-package-registry ] : ../appendix/glossary.md#package-registry ' "package-registry" (glossary entry) '
You can’t perform that action at this time.
0 commit comments