Skip to content

Commit 65e4c22

Browse files
committed
part 2, 3, 4 intros
1 parent cc01a5c commit 65e4c22

File tree

3 files changed

+30
-9
lines changed

3 files changed

+30
-9
lines changed

src/part-2-intro.md

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
# Part 2: How rustc works
22

3-
This part of the guide describes how the compiler works. It goes through
4-
everything from high-level structure of the compiler to how each stage of
5-
compilation works.
3+
The remaining parts of this guide discuss how the compiler works. They go
4+
through everything from high-level structure of the compiler to how each stage
5+
of compilation works. They should be friendly to both readers interested in the
6+
end-to-end process of compilation _and_ readers interested in learning about a
7+
specific system they wish to contribute to. If anything is unclear, feel free
8+
to file an issue on the [rustc-dev-guide
9+
repo](https://github.com/rust-lang/rustc-dev-guide) or contact the compiler
10+
team, as detailed in [this chapter from Part 1](./compiler-team.md).
611

7-
This section should be friendly to both readers interested in the end-to-end
8-
process of compilation _and_ readers interested in learning about a specific
9-
system they wish to contribute to. If anything is unclear, feel free to file
10-
an issue on the [rustc-dev-guide repo](https://github.com/rust-lang/rustc-dev-guide)
11-
or contact the compiler team, as detailed in [this chapter from Part
12-
1](./compiler-team.md).
12+
In this part, we will specifically look at the high-level architecture of the
13+
compiler. Specifically, will look at the query system, incremental compilation,
14+
and interning. These are three overarching design choices that impact the whole
15+
compiler.

src/part-3-intro.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Part 3: The Compiler Frontend
2+
3+
This part of the guide looks at the compiler frontend (with the major exception
4+
of the type system, which is in the next part). This part describes the process
5+
of taking raw source code from the user and transforming it into various forms
6+
that the compiler can work with easily. These are called intermediate
7+
representations.

src/part-4-intro.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Part 4: The Type System
2+
3+
This part discusses the many analyses that the compiler uses to check various
4+
properties of the code and to inform later stages. This includes the
5+
representation, inference, and checking of types, the trait system, and the
6+
borrow checker. These analyses do not happen as one big pass or set of
7+
contiguous passes. Rather, they are spread out throughout various parts of the
8+
compilation process and use different intermediate representations. For example,
9+
type checking happens on the HIR, while borrow checking happens on the MIR.
10+
Nonetheless, for the sake of presentation, we will discuss all of these
11+
analyses in this part of the guide.

0 commit comments

Comments
 (0)