about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
diff options
context:
space:
mode:
authorNoah Lev <camelidcamel@gmail.com>2022-08-09 14:19:33 -0700
committerJoshua Nelson <github@jyn.dev>2022-08-09 16:44:20 -0500
commit84c740f436cddfc20debffaa61287f11cd922e1f (patch)
tree0a3d2b52f05b70d8b45b4ddafbb7e08319da0010 /src/doc/rustc-dev-guide
parent4d474f36c74a2bb903611b2abda98067ab5eaaac (diff)
downloadrust-84c740f436cddfc20debffaa61287f11cd922e1f.tar.gz
rust-84c740f436cddfc20debffaa61287f11cd922e1f.zip
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 <github@jyn.dev>
Co-authored-by: Ralf Jung <post@ralfj.de>
Diffstat (limited to 'src/doc/rustc-dev-guide')
-rw-r--r--src/doc/rustc-dev-guide/src/building/bootstrapping.md20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/doc/rustc-dev-guide/src/building/bootstrapping.md b/src/doc/rustc-dev-guide/src/building/bootstrapping.md
index fd54de20ce3..878a09e7a8f 100644
--- a/src/doc/rustc-dev-guide/src/building/bootstrapping.md
+++ b/src/doc/rustc-dev-guide/src/building/bootstrapping.md
@@ -18,7 +18,25 @@ rustc, then uses it to compile the new compiler.
 
 ## Stages of bootstrapping
 
-Compiling `rustc` is done in stages.
+Compiling `rustc` is done in stages. Here's a diagram, adapted from Joshua Nelson's
+[talk on bootstrapping][rustconf22-talk] at RustConf 2022, with detailed explanations below.
+The `A`, `B`, `C`, and `D` show the ordering of the stages of bootstrapping.
+
+[rustconf22-talk]: https://rustconf.com/schedule#bootstrapping-the-once-and-future-compiler
+
+```mermaid
+graph TD
+    s0c["stage0 compiler (1.63)"] -->|A| s0l("stage0 std (1.64)");
+    s0c & s0l --- stepb[ ]:::empty;
+    stepb -->|B| s0ca["stage0 compiler artifacts (1.64)"];
+    s0ca -->|copy| s1c["stage1 compiler (1.64)"];
+    s1c -->|C| s1l("stage1 std (1.64)");
+    s1c & s1l --- stepd[ ]:::empty;
+    stepd -->|D| s1ca["stage1 compiler artifacts (1.64)"];
+    s1ca -->|copy| s2c["stage2 compiler"];
+
+    classDef empty width:0px,height:0px;
+```
 
 ### Stage 0