Skip to content

Commit 902cef0

Browse files
committed
Add "crate" to glossary.
1 parent 5aa457b commit 902cef0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Diff for: src/glossary.md

+13
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@ Combinators are higher-order functions that apply only functions and
5050
earlier defined combinators to provide a result from its arguments.
5151
They can be used to manage control flow in a modular fashion.
5252

53+
### Crate
54+
55+
A crate is the unit of compilation and linking. There are different [types of
56+
crates], such as libraries or executables. Crates may link and refer to other
57+
library crates, called external crates. A crate has a self-contained tree of
58+
[modules], starting from an unnamed root module called the crate root. [Items]
59+
may be made visible to other crates by marking them as public in the crate
60+
root, including through [paths] of public modules.
61+
[More][crate].
62+
5363
### Dispatch
5464

5565
Dispatch is the mechanism to determine which specific version of code is actually
@@ -274,6 +284,7 @@ example of an uninhabited type is the [never type] `!`, or an enum with no varia
274284
[associated item]: #associated-item
275285
[attributes]: attributes.md
276286
[*entity*]: names.md
287+
[crate]: crates-and-source-files.md
277288
[enums]: items/enumerations.md
278289
[fields]: expressions/field-expr.md
279290
[free item]: #free-item
@@ -291,6 +302,7 @@ example of an uninhabited type is the [never type] `!`, or an enum with no varia
291302
[lints]: attributes/diagnostics.md#lint-check-attributes
292303
[loop labels]: tokens.md#lifetimes-and-loop-labels
293304
[method]: items/associated-items.md#methods
305+
[modules]: items/modules.md
294306
[*Name resolution*]: names/name-resolution.md
295307
[*name*]: names.md
296308
[*namespace*]: names/namespaces.md
@@ -303,6 +315,7 @@ example of an uninhabited type is the [never type] `!`, or an enum with no varia
303315
[trait objects]: types/trait-object.md
304316
[traits]: items/traits.md
305317
[turbofish test]: https://github.com/rust-lang/rust/blob/master/src/test/ui/bastion-of-the-turbofish.rs
318+
[types of crates]: linkage.md
306319
[types]: types.md
307320
[undefined-behavior]: behavior-considered-undefined.md
308321
[unions]: items/unions.md

0 commit comments

Comments
 (0)