@@ -28,8 +28,8 @@ format is specific to `rustc`, and may change over time. This file contains:
28
28
[ ` -C embed-bitcode=no ` ] [ embed-bitcode ] CLI option to improve compile times
29
29
and reduce disk space if LTO is not needed.
30
30
* ` rustc ` [ metadata] , in a file named ` lib.rmeta ` .
31
- * A symbol table, which is generally a list of symbols with offsets to the
32
- object file that contain that symbol. This is pretty standard for archive
31
+ * A symbol table, which is essentially a list of symbols with offsets to the
32
+ object files that contain that symbol. This is pretty standard for archive
33
33
files.
34
34
35
35
[ archive file ] : https://en.wikipedia.org/wiki/Ar_(Unix)
@@ -46,12 +46,11 @@ A `dylib` is a platform-specific shared library. It includes the `rustc`
46
46
47
47
### rmeta
48
48
49
- An ` rmeta ` file is custom binary format that contains the [ metadata] for the
50
- crate. This file can be used for fast "checks" of a project by skipping all
51
- code generation (as is done with ` cargo check ` ), collecting enough information
52
- for documentation (as is done with ` cargo doc ` ), or for
53
- [ pipelining] ( #pipelining ) . This file is created if the
54
- [ ` --emit=metadata ` ] [ emit ] CLI option is used.
49
+ An ` rmeta ` file is a custom binary format that contains the [ metadata] for the
50
+ crate. This file can be used for fast "checks" of a project by skipping all code
51
+ generation (as is done with ` cargo check ` ), collecting enough information for
52
+ documentation (as is done with ` cargo doc ` ), or for [ pipelining] ( #pipelining ) .
53
+ This file is created if the [ ` --emit=metadata ` ] [ emit ] CLI option is used.
55
54
56
55
` rmeta ` files do not support linking, since they do not contain compiled
57
56
object files.
@@ -60,8 +59,8 @@ object files.
60
59
61
60
## Metadata
62
61
63
- The metadata contains a wide swath of different elements. This guide will not
64
- go into detail of every field it contains. You are encouraged to browse the
62
+ The metadata contains a wide swath of different elements. This guide will not go
63
+ into detail about every field it contains. You are encouraged to browse the
65
64
[ ` CrateRoot ` ] definition to get a sense of the different elements it contains.
66
65
Everything about metadata encoding and decoding is in the [ ` rustc_metadata ` ]
67
66
package.
@@ -122,9 +121,9 @@ much more.
122
121
123
122
By default, all Rust symbols are mangled and incorporate the stable crate id.
124
123
This allows multiple versions of the same crate to be included together. Cargo
125
- automatically generates ` -C metadata ` hashes based on a variety of factors,
126
- like the package version, source, and the target kind (a lib and test can have
127
- the same crate name, so they need to be disambiguated).
124
+ automatically generates ` -C metadata ` hashes based on a variety of factors, like
125
+ the package version, source, and target kind (a lib and test can have the same
126
+ crate name, so they need to be disambiguated).
128
127
129
128
[ `StableCrateId` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_span/def_id/struct.StableCrateId.html
130
129
[ `StableCrateId::new` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_span/def_id/struct.StableCrateId.html#method.new
@@ -154,7 +153,7 @@ will also look at the [sysroot] to find dependencies.
154
153
155
154
As crates are loaded, they are kept in the [ ` CStore ` ] with the crate metadata
156
155
wrapped in the [ ` CrateMetadata ` ] struct. After resolution and expansion, the
157
- ` CStore ` will make its way into the [ ` GlobalCtxt ` ] for the rest of
156
+ ` CStore ` will make its way into the [ ` GlobalCtxt ` ] for the rest of the
158
157
compilation.
159
158
160
159
[ name resolution ] : ../name-resolution.md
0 commit comments