(WIP) Testing The debug info test suite is undergoing a substantial rewrite. This section will be filled out as the rewrite makes progress. Please see this tracking issue for more information.
Debugging support in the Rust compiler This document explains the state of debugging tools support in the Rust compiler (rustc). It gives an overview of GDB, LLDB, WinDbg/CDB, as well as infrastructure around Rust compiler to debug Rust cod...
Libraries and metadata When the compiler sees a reference to an external crate, it needs to load some information about that crate. This chapter gives an overview of that process, and the supported file formats for crate libraries. Librarie...
Profile-guided optimization rustc supports doing profile-guided optimization (PGO). This chapter describes what PGO is and how the support for it is implemented in rustc. What is profiled-guided optimization? The basic concept of PGO is to...
LLVM source-based code coverage rustc supports detailed source-based code and test coverage analysis with a command line option (-C instrument-coverage) that instruments Rust libraries and binaries with additional instructions and data, at...
Sanitizers support The rustc compiler contains support for following sanitizers: • AddressSanitizer a faster memory error detector. Can detect out-of-bounds access to heap, stack, and globals, use after free, use after return, double free,...
Background topics This section covers a numbers of common compiler terms that arise in this guide. We try to give the general definition while providing some Rust-specific context. What is a control-flow graph? A control-flow graph (CFG) is...
Glossary Term | Meaning -----------------------------------------------|-------- 1-ZST | A one-aligned zero-sized type. A type of size zero with an alignment of one. arena, arena allocation | An arena is a large memory buffer from which oth...
Code Index rustc has a lot of important data structures. This is an attempt to give some guidance on where to learn more about some of the key data structures of the compiler. Item | Kind | Short description | Chapter | Declaration --------...
Compiler Lecture Series These are videos where various experts explain different parts of the compiler: General • January 2019: Tom Tromey discusses debugging support in rustc • June 2019: Responsive compilers - Nicholas Matsakis - PLISS 20...
Rust Bibliography This is a reading list of material relevant to Rust. It includes prior research that has - at one time or another - influenced the design of Rust, as well as publications about Rust. Type system • Alias burying - We tried...
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 N...
Pre-stabilization testing of new solver and polonius alpha on CI We want to improve the continuous test coverage of next solver and polonius alpha with a goal to stabilize them in 2026. To achieve this, we need to ensure these unstable feat...
Pre-stabilization testing of the next solver and polonius alpha on CI We want to improve the continuous test coverage of next solver and polonius alpha with a goal to stabilize them in 2026. To achieve this, we need to ensure these unstable...
Well-Formedness What is Well-Formedness? "Well-formed" means "correctly built."[^wf-history] Something is well-formed when its structure follows rules. When we use this term in the Rust compiler we are concerned with establishing some kind...
Autodiff CI job The optional-x86_64-gnu-autodiff job provides continuous test coverage for the experimental autodiff feature and its integration with LLVM Enzyme. It is an optional auto job, so a failure does not prevent a pull request from...