Skip to content

Commit 7fb608b

Browse files
committed
bootsrapping stages overview list
1 parent 0dc2b03 commit 7fb608b

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

Diff for: src/building/bootstrapping.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ rustc, then uses it to compile the new compiler.
1818

1919
## Stages of bootstrapping
2020

21+
### Overview
22+
23+
- Stage 0: the pre-compiled compiler
24+
- Stage 1: from current code, by an earlier compiler
25+
- Stage 2: the truly current compiler
26+
- Stage 3: the same-result test
27+
2128
Compiling `rustc` is done in stages. Here's a diagram, adapted from Joshua Nelson's
2229
[talk on bootstrapping][rustconf22-talk] at RustConf 2022, with detailed explanations below.
2330

@@ -47,7 +54,7 @@ graph TD
4754
classDef with-s1c fill: lightgreen;
4855
```
4956

50-
### Stage 0
57+
### Stage 0: the pre-compiled compiler
5158

5259
The stage0 compiler is usually the current _beta_ `rustc` compiler
5360
and its associated dynamic libraries,
@@ -61,11 +68,11 @@ a compiler (with its set of dependencies)
6168
and its 'target' or 'object' libraries (`std` and `rustc`).
6269
Both are staged, but in a staggered manner.
6370

64-
### Stage 1
71+
### Stage 1: from current code, by an earlier compiler
6572

6673
The rustc source code is then compiled with the stage0 compiler to produce the stage1 compiler.
6774

68-
### Stage 2
75+
### Stage 2: the truly current compiler
6976

7077
We then rebuild our stage1 compiler with itself to produce the stage2 compiler.
7178

@@ -88,7 +95,7 @@ For development, you usually only want the `stage1` compiler,
8895
which you can build with `./x.py build library`.
8996
See [Building the Compiler](./how-to-build-and-run.html#building-the-compiler).
9097

91-
### Stage 3
98+
### Stage 3: the same-result test
9299

93100
Stage 3 is optional. To sanity check our new compiler, we
94101
can build the libraries with the stage2 compiler. The result ought

0 commit comments

Comments
 (0)