- Getting Started
- About this guide
- Building and debugging rustc
- 1. How to build and run the compiler
❱
- 1.1. Quickstart
- 1.2. Prerequisites
- 1.3. Suggested workflows
- 1.4. Distribution artifacts
- 1.5. Building documentation
- 1.6. Rustdoc overview
- 1.7. Adding a new target
- 1.8. 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. Best practices
- 2.4. Compiletest
❱
- 2.4.1. UI tests
- 2.4.2. Test directives
- 2.4.3. Minicore
- 2.5. Ecosystem testing
❱
- 2.5.1. Crater
- 2.5.2. Fuchsia
- 2.5.3. Rust for Linux
- 2.6. Codegen backend testing
❱
- 2.6.1. Cranelift codegen backend
- 2.6.2. GCC codegen backend
- 2.7. Performance testing
- 2.8. Suggest tests tool
- 2.9. Misc info
- 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
- 4.3. with the Rust benchmark suite
- 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. Apple
- 19.2. ARM
- 19.3. Cleanup Crew
- 19.4. Emscripten
- 19.5. Fuchsia
- 19.6. LLVM
- 19.7. RISC-V
- 19.8. Rust for Linux
- 19.9. WASI
- 19.10. WebAssembly
- 19.11. Windows
- 20. Licenses
- 21. Editions
- Bootstrapping
- 22. Prologue
- 23. What Bootstrapping does
- 24. How Bootstrap does it
- 25. Writing tools in Bootstrap
- 26. Debugging bootstrap
- 27. cfg(bootstrap) in dependencies
- High-level Compiler Architecture
- 28. Prologue
- 29. Overview of the compiler
- 30. The compiler source code
- 31. Queries: demand-driven compilation
❱
- 31.1. The Query Evaluation Model in detail
- 31.2. Incremental compilation
- 31.3. Incremental compilation in detail
- 31.4. Debugging and testing
- 31.5. Salsa
- 32. Memory management in rustc
- 33. Serialization in rustc
- 34. Parallel compilation
- 35. Rustdoc internals
❱
- 35.1. Search
- 35.2. The rustdoc test suite
- 36. Autodiff internals
❱
- 36.1. Installation
- 36.2. How to debug
- 36.3. Autodiff flags
- 36.4. Current limitations
- Source Code Representation
- 37. Prologue
- 38. Syntax and the AST
❱
- 38.1. Lexing and parsing
- 38.2. Macro expansion
- 38.3. Name resolution
- 38.4. Attributes
- 38.5. #[test] implementation
- 38.6. Panic implementation
- 38.7. AST validation
- 38.8. Feature gate checking
- 38.9. Lang Items
- 39. The HIR (High-level IR)
❱
- 39.1. Lowering AST to HIR
- 39.2. Debugging
- 40. The THIR (Typed High-level IR)
- 41. The MIR (Mid-level IR)
❱
- 41.1. MIR construction
- 41.2. MIR visitor and traversal
- 41.3. MIR queries and passes: getting the MIR
- 42. Inline assembly
- Supporting Infrastructure
- 43. Command-line arguments
- 44. rustc_driver and rustc_interface
❱
- 44.1. Remarks on perma-unstable features
- 44.2. Example: Type checking
- 44.3. Example: Getting diagnostics
- 45. Errors and lints
❱
- 45.1. Diagnostic and subdiagnostic structs
- 45.2. Translation
- 45.3. LintStore
- 45.4. Error codes
- 45.5. Diagnostic items
- 45.6. ErrorGuaranteed
- Analysis
- 46. Prologue
- 47. Generic parameter definitions
❱
- 47.1. EarlyBinder and instantiating parameters
- 48. Binders and Higher ranked regions
❱
- 48.1. Instantiating binders
- 49. Early vs Late bound parameters
- 50. The ty module: representing types
❱
- 50.1. ADTs and Generic Arguments
- 50.2. Parameter types/consts/regions
- 51. TypeFolder and TypeFoldable
- 52. Aliases and Normalization
- 53. Typing/Param Envs
- 54. Type inference
- 55. Trait solving
❱
- 55.1. Higher-ranked trait bounds
- 55.2. Caching subtleties
- 55.3. Implied bounds
- 55.4. Specialization
- 55.5. Chalk-based trait solving
❱
- 55.5.1. Lowering to logic
- 55.5.2. Goals and clauses
- 55.5.3. Canonical queries
- 55.5.4. Canonicalization
- 55.6. Next-gen trait solving
❱
- 55.6.1. Invariants of the type system
- 55.6.2. The solver
- 55.6.3. Canonicalization
- 55.6.4. Coinduction
- 55.6.5. Caching
- 55.6.6. Proof trees
- 55.6.7. Opaque types
- 55.6.8. Significant changes and quirks
- 55.7. Unsize and CoerceUnsized traits
- 56. Type checking
❱
- 56.1. Method Lookup
- 56.2. Variance
- 56.3. Coherence checking
- 56.4. Opaque types
❱
- 56.4.1. Inference details
- 56.4.2. Return Position Impl Trait In Trait
- 56.4.3. Region inference restrictions
- 57. Const condition checking
- 58. Pattern and Exhaustiveness Checking
- 59. Unsafety checking
- 60. MIR dataflow
- 61. Drop elaboration
- 62. The borrow checker
❱
- 62.1. Tracking moves and initialization
❱
- 62.1.1. Move paths
- 62.2. MIR type checker
- 62.3. Drop check
- 62.4. Region inference
❱
- 62.4.1. Constraint propagation
- 62.4.2. Lifetime parameters
- 62.4.3. Member constraints
- 62.4.4. Placeholders and universes
- 62.4.5. Closure constraints
- 62.4.6. Error reporting
- 62.5. Two-phase-borrows
- 63. Closure capture inference
- 64. Async closures/"coroutine-closures"
- MIR to Binaries
- 65. Prologue
- 66. MIR optimizations
- 67. Debugging MIR
- 68. Constant evaluation
❱
- 68.1. Interpreter
- 69. Monomorphization
- 70. Lowering MIR
- 71. Code Generation
❱
- 71.1. Updating LLVM
- 71.2. Debugging LLVM
- 71.3. Backend Agnostic Codegen
- 71.4. Implicit Caller Location
- 72. Libraries and Metadata
- 73. Profile-guided Optimization
- 74. LLVM Source-Based Code Coverage
- 75. Sanitizers Support
- 76. 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