Skip to content

Commit 4b2f038

Browse files
camelidjyn514RalfJung
committed
Add bootstrapping diagram
This diagram is based on the diagram in Joshua Nelson's talk on bootstrapping at RustConf 2022 [1]. I converted it to Mermaid and made some tweaks to simplify it and bring it closer to bootstrap's terminology, and then Ralf Jung added nodes for copying artifacts. [1]: https://rustconf.com/schedule#bootstrapping-the-once-and-future-compiler Co-authored-by: Joshua Nelson <[email protected]> Co-authored-by: Ralf Jung <[email protected]>
1 parent 6964f75 commit 4b2f038

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

Diff for: src/building/bootstrapping.md

+19-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,25 @@ rustc, then uses it to compile the new compiler.
1818

1919
## Stages of bootstrapping
2020

21-
Compiling `rustc` is done in stages.
21+
Compiling `rustc` is done in stages. Here's a diagram, adapted from Joshua Nelson's
22+
[talk on bootstrapping][rustconf22-talk] at RustConf 2022, with detailed explanations below.
23+
The `A`, `B`, `C`, and `D` show the ordering of the stages of bootstrapping.
24+
25+
[rustconf22-talk]: https://rustconf.com/schedule#bootstrapping-the-once-and-future-compiler
26+
27+
```mermaid
28+
graph TD
29+
s0c["stage0 compiler (1.63)"] -->|A| s0l("stage0 std (1.64)");
30+
s0c & s0l --- stepb[ ]:::empty;
31+
stepb -->|B| s0ca["stage0 compiler artifacts (1.64)"];
32+
s0ca -->|copy| s1c["stage1 compiler (1.64)"];
33+
s1c -->|C| s1l("stage1 std (1.64)");
34+
s1c & s1l --- stepd[ ]:::empty;
35+
stepd -->|D| s1ca["stage1 compiler artifacts (1.64)"];
36+
s1ca -->|copy| s2c["stage2 compiler"];
37+
38+
classDef empty width:0px,height:0px;
39+
```
2240

2341
### Stage 0
2442

0 commit comments

Comments
 (0)