@@ -22,6 +22,13 @@ Note that this documentation mostly covers user-facing information. See
2222
2323## Stages of bootstrapping
2424
25+ ### Overview
26+
27+ - Stage 0: the pre-compiled compiler
28+ - Stage 1: from current code, by an earlier compiler
29+ - Stage 2: the truly current compiler
30+ - Stage 3: the same-result test
31+
2532Compiling ` rustc ` is done in stages. Here's a diagram, adapted from Joshua Nelson's
2633[ talk on bootstrapping] [ rustconf22-talk ] at RustConf 2022, with detailed explanations below.
2734
@@ -51,7 +58,7 @@ graph TD
5158 classDef with-s1c fill: lightgreen;
5259```
5360
54- ### Stage 0
61+ ### Stage 0: the pre-compiled compiler
5562
5663The stage0 compiler is usually the current _ beta_ ` rustc ` compiler
5764and its associated dynamic libraries,
@@ -65,11 +72,11 @@ a compiler (with its set of dependencies)
6572and its 'target' or 'object' libraries (` std ` and ` rustc ` ).
6673Both are staged, but in a staggered manner.
6774
68- ### Stage 1
75+ ### Stage 1: from current code, by an earlier compiler
6976
7077The rustc source code is then compiled with the stage0 compiler to produce the stage1 compiler.
7178
72- ### Stage 2
79+ ### Stage 2: the truly current compiler
7380
7481We then rebuild our stage1 compiler with itself to produce the stage2 compiler.
7582
@@ -92,7 +99,7 @@ For development, you usually only want the `stage1` compiler,
9299which you can build with ` ./x.py build library ` .
93100See [ Building the compiler] ( ./how-to-build-and-run.html#building-the-compiler ) .
94101
95- ### Stage 3
102+ ### Stage 3: the same-result test
96103
97104Stage 3 is optional. To sanity check our new compiler, we
98105can build the libraries with the stage2 compiler. The result ought
0 commit comments