1. About this guide
  2. Getting Started
  3. Building and debugging rustc
  4. 1. How to Build and Run the Compiler
    ❱
    1. 1.1. Prerequisites
    2. 1.2. Suggested Workflows
    3. 1.3. Distribution artifacts
    4. 1.4. Documenting Compiler
    5. 1.5. Rustdoc overview
    6. 1.6. ctags
    7. 1.7. Adding a new target
  5. 2. The compiler testing framework
    ❱
    1. 2.1. Running tests
    2. 2.2. Adding new tests
    3. 2.3. Using compiletest commands to control test execution
  6. 3. Debugging the Compiler
  7. 4. Profiling the compiler
    ❱
    1. 4.1. with the linux perf tool
  8. 5. crates.io Dependencies
  9. Contributing to Rust
  10. 6. Introduction
  11. 7. About the compiler team
  12. 8. Using Git
  13. 9. Mastering @rustbot
  14. 10. Walkthrough: a typical contribution
  15. 11. Bug Fix Procedure
  16. 12. Implementing new features
  17. 13. Stability attributes
  18. 14. Stabilizing Features
  19. 15. Feature Gates
  20. 16. Coding conventions
  21. 17. Notification groups
    ❱
    1. 17.1. ARM
    2. 17.2. Cleanup Crew
    3. 17.3. LLVM
    4. 17.4. RISC-V
    5. 17.5. Windows
  22. 18. Licenses
  23. High-level Compiler Architecture
  24. 19. Prologue
  25. 20. Overview of the Compiler
  26. 21. The compiler source code
  27. 22. Bootstrapping
  28. 23. Queries: demand-driven compilation
    ❱
    1. 23.1. The Query Evaluation Model in Detail
    2. 23.2. Incremental compilation
    3. 23.3. Incremental compilation In Detail
    4. 23.4. Debugging and Testing
    5. 23.5. Profiling Queries
    6. 23.6. Salsa
  29. 24. Memory Management in Rustc
  30. 25. Serialization in Rustc
  31. 26. Parallel Compilation
  32. 27. Rustdoc internals
  33. Source Code Representation
  34. 28. Prologue
  35. 29. Command-line arguments
  36. 30. The Rustc Driver and Interface
    ❱
    1. 30.1. Ex: Type checking through rustc_interface
    2. 30.2. Ex: Getting diagnostics through rustc_interface
  37. 31. Syntax and the AST
    ❱
    1. 31.1. Lexing and Parsing
    2. 31.2. Macro expansion
    3. 31.3. Name resolution
    4. 31.4. #[test] Implementation
    5. 31.5. Panic Implementation
    6. 31.6. AST Validation
    7. 31.7. Feature Gate Checking
  38. 32. The HIR (High-level IR)
    ❱
    1. 32.1. Lowering AST to HIR
    2. 32.2. Debugging
  39. 33. The MIR (Mid-level IR)
    ❱
    1. 33.1. THIR and MIR construction
    2. 33.2. MIR visitor and traversal
    3. 33.3. MIR passes: getting the MIR for a function
  40. 34. Identifiers in the Compiler
  41. 35. Closure expansion
  42. Analysis
  43. 36. Prologue
  44. 37. The ty module: representing types
    ❱
    1. 37.1. Generics and substitutions
    2. 37.2. TypeFolder and TypeFoldable
    3. 37.3. Generic arguments
  45. 38. Type inference
  46. 39. Trait solving
    ❱
    1. 39.1. Early and Late Bound Parameters
    2. 39.2. Higher-ranked trait bounds
    3. 39.3. Caching subtleties
    4. 39.4. Specialization
    5. 39.5. Chalk-based trait solving
      ❱
      1. 39.5.1. Lowering to logic
      2. 39.5.2. Goals and clauses
      3. 39.5.3. Canonical queries
  47. 40. Type checking
    ❱
    1. 40.1. Method Lookup
    2. 40.2. Variance
    3. 40.3. Opaque Types
  48. 41. Pattern and Exhaustiveness Checking
  49. 42. MIR dataflow
  50. 43. The borrow checker
    ❱
    1. 43.1. Tracking moves and initialization
      ❱
      1. 43.1.1. Move paths
    2. 43.2. MIR type checker
    3. 43.3. Region inference
      ❱
      1. 43.3.1. Constraint propagation
      2. 43.3.2. Lifetime parameters
      3. 43.3.3. Member constraints
      4. 43.3.4. Placeholders and universes
      5. 43.3.5. Closure constraints
      6. 43.3.6. Error reporting
    4. 43.4. Two-phase-borrows
  51. 44. Parameter Environments
  52. 45. Errors and Lints
    ❱
    1. 45.1. Creating Errors With SessionDiagnostic
    2. 45.2. LintStore
    3. 45.3. Diagnostic Codes
  53. MIR to Binaries
  54. 46. Prologue
  55. 47. MIR optimizations
  56. 48. Debugging
  57. 49. Constant evaluation
    ❱
    1. 49.1. miri const evaluator
  58. 50. Monomorphization
  59. 51. Lowering MIR
  60. 52. Code Generation
    ❱
    1. 52.1. Updating LLVM
    2. 52.2. Debugging LLVM
    3. 52.3. Backend Agnostic Codegen
    4. 52.4. Implicit Caller Location
  61. 53. Libraries and Metadata
  62. 54. Profile-guided Optimization
  63. 55. LLVM Source-Based Code Coverage
  64. 56. Sanitizers Support
  65. 57. Debugging Support in the Rust Compiler
  66. Appendix A: Background topics
  67. Appendix B: Glossary
  68. Appendix C: Code Index
  69. Appendix D: Compiler Lecture Series
  70. Appendix E: Bibliography
  71. Appendix Z: HumorRust

Guide to Rustc Development

Humor in Rust

What's a project without a sense of humor? And frankly some of these are enlightening?

  • Weird exprs test
  • Ferris Rap
  • The Genesis of Generic Germination
  • The Bastion of the Turbofish test
  • Rust Koans
  • break rust;
  • The Nomicon Intro
  • rustc-ty renaming punfest