write a bit about bootstrapping

This commit is contained in:
mark 2020-04-04 13:17:04 -05:00 committed by Who? Me?!
parent e154e2684d
commit 31ae8b8b07
1 changed files with 17 additions and 1 deletions

View File

@ -270,7 +270,23 @@ but there are already some promising performance improvements.
### Bootstrapping
**TODO (or do we want such a section)?**
`rustc` itself is written in Rust. So how do we compile the compiler? We use an
older compiler to compile the newer compiler. This is called _bootstrapping_.
Bootstrapping has a lot of interesting implications. For example, it means that one
of the major users of Rust is Rust, so we are constantly testing our own
software ("eating our own dogfood"). Also, it means building the compiler can
take a long time because one must first build the compiler and then use that to
build the new compiler (sometimes you can get away without the full 2-stage
build, but for release artifacts you need the 2-stage build).
Bootstrapping also has implications for when features are usable in the
compiler itself. The build system uses the current beta compiler to build the
stage-1 bootstrapping compiler. This means that the compiler source code can't
use some features until they reach beta (because otherwise the beta compiler
doesn't support them). On the other hand, for compiler intrinsics and internal
features, we may be able to use them immediately because the stage-1
bootstrapping compiler will support them.
# Unresolved Questions