Getting Started
About this guide
Building and debugging rustc
1.
How to build and run the compiler
❱
1.1.
Prerequisites
1.2.
Suggested Workflows
1.3.
Distribution artifacts
1.4.
Building Documentation
1.5.
Rustdoc overview
1.6.
Adding a new target
1.7.
Optimized build
2.
Testing the compiler
❱
2.1.
Running tests
❱
2.1.1.
Testing with Docker
2.1.2.
Testing with CI
2.2.
Adding new tests
2.3.
Compiletest
❱
2.3.1.
UI tests
2.3.2.
Test headers
2.4.
Performance testing
2.5.
Crater
2.6.
Suggest tests tool
3.
Debugging the compiler
❱
3.1.
Using the tracing/logging instrumentation
4.
Profiling the compiler
❱
4.1.
with the linux perf tool
4.2.
with Windows Performance Analyzer
5.
crates.io Dependencies
Contributing to Rust
6.
Contribution Procedures
7.
About the compiler team
8.
Using Git
9.
Mastering @rustbot
10.
Walkthrough: a typical contribution
11.
Implementing new language features
12.
Stability attributes
13.
Stabilizing Features
14.
Feature Gates
15.
Coding conventions
16.
Procedures for Breaking Changes
17.
Using external repositories
18.
Fuzzing
19.
Notification groups
❱
19.1.
ARM
19.2.
Cleanup Crew
19.3.
LLVM
19.4.
RISC-V
19.5.
Windows
20.
Licenses
21.
Editions
Bootstrapping
22.
Prologue
23.
What Bootstrapping does
24.
How Bootstrap does it
High-level Compiler Architecture
25.
Prologue
26.
Overview of the compiler
27.
The compiler source code
28.
Queries: demand-driven compilation
❱
28.1.
The Query Evaluation Model in Detail
28.2.
Incremental compilation
28.3.
Incremental compilation In Detail
28.4.
Debugging and Testing
28.5.
Salsa
29.
Memory Management in Rustc
30.
Serialization in Rustc
31.
Parallel Compilation
32.
Rustdoc internals
❱
32.1.
Search
Source Code Representation
33.
Prologue
34.
Command-line arguments
35.
rustc_driver and rustc_interface
❱
35.1.
Example: Type checking
35.2.
Example: Getting diagnostics
36.
Syntax and the AST
❱
36.1.
Lexing and Parsing
36.2.
Macro expansion
36.3.
Name resolution
36.4.
#[test] Implementation
36.5.
Panic Implementation
36.6.
AST Validation
36.7.
Feature Gate Checking
36.8.
Lang Items
37.
The HIR (High-level IR)
❱
37.1.
Lowering AST to HIR
37.2.
Debugging
38.
The THIR (Typed High-level IR)
39.
The MIR (Mid-level IR)
❱
39.1.
MIR construction
39.2.
MIR visitor and traversal
39.3.
MIR passes: getting the MIR for a function
40.
Identifiers in the compiler
41.
Closure expansion
42.
Inline assembly
Analysis
43.
Prologue
44.
The ty module: representing types
❱
44.1.
Generics and substitutions
44.2.
TypeFolder and TypeFoldable
44.3.
Generic arguments
44.4.
Constants in the type system
44.5.
Bound vars and Parameters
45.
Type inference
46.
Trait solving
❱
46.1.
Early and Late Bound Parameter Definitions
❱
46.1.1.
What are early and late bound parameters
46.1.2.
Interactions with turbofishing
46.2.
Higher-ranked trait bounds
46.3.
Caching subtleties
46.4.
Implied bounds
46.5.
Specialization
46.6.
Chalk-based trait solving
❱
46.6.1.
Lowering to logic
46.6.2.
Goals and clauses
46.6.3.
Canonical queries
46.6.4.
Canonicalization
46.7.
Next-gen trait solving
❱
46.7.1.
Invariants of the type system
46.7.2.
The solver
46.7.3.
Canonicalization
46.7.4.
Coinduction
46.7.5.
Caching
46.7.6.
Proof trees
46.7.7.
Normalization
46.7.8.
Opaque types
46.7.9.
Significant changes and quirks
46.8.
Unsize and CoerceUnsized traits
47.
Type checking
❱
47.1.
Method Lookup
47.2.
Variance
47.3.
Opaque Types
❱
47.3.1.
Inference details
47.3.2.
Return Position Impl Trait In Trait
47.3.3.
Region inference restrictions
48.
Effect checking
49.
Pattern and Exhaustiveness Checking
50.
Unsafety Checking
51.
MIR dataflow
52.
Drop elaboration
53.
The borrow checker
❱
53.1.
Tracking moves and initialization
❱
53.1.1.
Move paths
53.2.
MIR type checker
53.3.
Drop check
53.4.
Region inference
❱
53.4.1.
Constraint propagation
53.4.2.
Lifetime parameters
53.4.3.
Member constraints
53.4.4.
Placeholders and universes
53.4.5.
Closure constraints
53.4.6.
Error reporting
53.5.
Two-phase-borrows
54.
Parameter Environments
55.
Errors and Lints
❱
55.1.
Diagnostic and subdiagnostic structs
55.2.
Translation
55.3.
LintStore
55.4.
Error codes
55.5.
Diagnostic items
55.6.
ErrorGuaranteed
MIR to Binaries
56.
Prologue
57.
MIR optimizations
58.
Debugging
59.
Constant evaluation
❱
59.1.
Interpreter
60.
Monomorphization
61.
Lowering MIR
62.
Code Generation
❱
62.1.
Updating LLVM
62.2.
Debugging LLVM
62.3.
Backend Agnostic Codegen
62.4.
Implicit Caller Location
63.
Libraries and Metadata
64.
Profile-guided Optimization
65.
LLVM Source-Based Code Coverage
66.
Sanitizers Support
67.
Debugging support in the Rust compiler
Appendix A: Background topics
Appendix B: Glossary
Appendix C: Code Index
Appendix D: Compiler Lecture Series
Appendix E: Bibliography
Appendix Z: HumorRust
Light (default)
Rust
Coal
Navy
Ayu
Rust Compiler Development Guide
Document not found (404)
This URL is invalid, sorry. Please use the navigation bar or search to continue.