Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
rustc-dev-guide.rust-lang.org
MIR Debugging The -Z dump-mir flag can be used to dump a text representation of the MIR. The following optional flags, used in combination with -Z dump-mir, enable additional output formats, including: • -Z dump-mir-graphviz - dumps a .dot...
Guide to Rustc Development Book 2024-01-01 ~1 min read
rustc-dev-guide.rust-lang.org
Constant Evaluation Constant evaluation is the process of computing values at compile time. For a specific item (constant/static/array length) this happens after the MIR for the item is borrow-checked and optimized. In many cases trying to...
Guide to Rustc Development Book 2024-01-01 ~1 min read
rustc-dev-guide.rust-lang.org
Interpreter The interpreter is a virtual machine for executing MIR without compiling to machine code. It is usually invoked via tcx.const_eval_* functions. The interpreter is shared between the compiler (for compile-time function evaluation...
Guide to Rustc Development Book 2024-01-01 ~8 min read
rustc-dev-guide.rust-lang.org
Monomorphization As you probably know, Rust has a very expressive type system that has extensive support for generic types. But of course, assembly is not generic, so we need to figure out the concrete types of all the generics before the c...
Guide to Rustc Development Book 2024-01-01 ~2 min read
rustc-dev-guide.rust-lang.org
Lowering MIR to a Codegen IR Now that we have a list of symbols to generate from the collector, we need to generate some sort of codegen IR. In this chapter, we will assume LLVM IR, since that's what rustc usually uses. The actual monomorph...
Guide to Rustc Development Book 2024-01-01 ~1 min read
rustc-dev-guide.rust-lang.org
Code generation Code generation (or "codegen") is the part of the compiler that actually generates an executable binary. Usually, rustc uses LLVM for code generation, but there is also support for Cranelift and GCC. The key is that rustc do...
Guide to Rustc Development Book 2024-01-01 ~2 min read
rustc-dev-guide.rust-lang.org
Updating LLVM Rust supports building against multiple LLVM versions: • Tip-of-tree for the current LLVM development branch is usually supported within a few days. PRs for such fixes are tagged with llvm-main. • The latest released major ver...
Guide to Rustc Development Book 2024-01-01 ~7 min read
rustc-dev-guide.rust-lang.org
Debugging LLVM NOTE: If you are looking for info about code generation, please see this chapter instead. This section is about debugging compiler bugs in code generation (e.g. why the compiler generated some piece of code or crashed in LLVM...
Guide to Rustc Development Book 2024-01-01 ~8 min read
rustc-dev-guide.rust-lang.org
Backend Agnostic Codegen rustc_codegen_ssa provides an abstract interface for all backends to implement, namely LLVM, Cranelift, and GCC. Below is some background information on the refactoring that created this abstract interface. Refactor...
Guide to Rustc Development Book 2024-01-01 ~6 min read
rustc-dev-guide.rust-lang.org
Implicit caller location Approved in RFC 2091, this feature enables the accurate reporting of caller location during panics initiated from functions like Option::unwrap, Result::expect, and Index::index. This feature adds the #[track_caller...
Guide to Rustc Development Book 2024-01-01 ~7 min read
rustc-dev-guide.rust-lang.org
Debug Info Debug info is a collection of information generated by the compiler that allows debuggers to correctly interpret the state of a program while it is running. That includes things like mapping instruction addresses to lines of code...
Guide to Rustc Development Book 2024-01-01 ~5 min read
rustc-dev-guide.rust-lang.org
Rust Codegen The first phase in debug info generation requires Rust to inspect the MIR of the program and communicate it to LLVM. This is primarily done in rustc_codegen_llvm/debuginfo, though some type-name processing exists in rustc_codeg...
Guide to Rustc Development Book 2024-01-01 ~5 min read
rustc-dev-guide.rust-lang.org
(WIP) LLVM Codegen When Rust calls an LLVM DIBuilder function, LLVM translates the given information to a "debug record" that is format-agnostic. These records can be inspected in the LLVM-IR. It is important to note that tags within the de...
Guide to Rustc Development Book 2024-01-01 ~1 min read
rustc-dev-guide.rust-lang.org
Debugger Internals It is the debugger's job to convert the debug info into an in-memory representation. Both the interpretation of the debug info and the in-memory representation are arbitrary; anything will do so long as meaningful informa...
Guide to Rustc Development Book 2024-01-01 ~1 min read
rustc-dev-guide.rust-lang.org
LLDB Internals LLDB's debug info processing relies on a set of extensible interfaces largely defined in lldb/src/Plugins. These are meant to allow third-party compiler developers to add language support that is loaded at run-time by LLDB, b...
Guide to Rustc Development Book 2024-01-01 ~7 min read
rustc-dev-guide.rust-lang.org
(WIP) GDB Internals GDB's Rust support lives at gdb/rust-lang.h and gdb/rust-lang.c. The expression parsing support can be found in gdb/rust-exp.h and gdb/rust-parse.c
Guide to Rustc Development Book 2024-01-01 ~1 min read
rustc-dev-guide.rust-lang.org
Debugger Visualizers These are typically the last step before the debugger displays the information, but the results may be piped through a debug adapter such as an IDE's debugger API. The term "Visualizer" is a bit of a misnomer. The real...
Guide to Rustc Development Book 2024-01-01 ~4 min read
rustc-dev-guide.rust-lang.org
LLDB - Python Providers NOTE: LLDB's C++<->Python FFI expects a version of Python designated at the time LLDB was compiled. LLDB is careful to correspond this version to the minimum in typical Linux and macOS distributions, but on Windows t...
Guide to Rustc Development Book 2024-01-01 ~18 min read
rustc-dev-guide.rust-lang.org
(WIP) GDB - Python Providers Below are links to relevant parts of the GDB documentation • Overview on writing a pretty printer • Pretty Printer API (equivalent to LLDB's SyntheticProvider) • Value API (equivalent to LLDB's SBValue) • Type A...
Guide to Rustc Development Book 2024-01-01 ~1 min read
rustc-dev-guide.rust-lang.org
(WIP) CDB - Natvis Official documentation for Natvis can be found here and here
Guide to Rustc Development Book 2024-01-01 ~1 min read
"Good farmers use their bare hands, average farmers use a combine harvester."

Search tips

Type anything to search across articles, videos (including conference talks), podcasts, research, crates, and Rust API documentation. These operators give you finer control — click an example to try it.

Find pages containing all your words. Pages where the words appear together rank higher.
Quote part of your query to keep those words together as an exact phrase within a larger search.
Wrap the whole query in quotes for a verbatim search that matches text exactly, punctuation and all — perfect for Rust syntax. Needs at least 3 characters.
Put ! first to open the top result immediately. Quote the whole query for a literal leading bang, as in '!Send'. Bangs elsewhere, such as println!, stay literal. Browser and launcher shortcuts can invoke this directly. See search integrations.
Limit results to a single site. Works on its own () too. One site: per search.

Use the tabs and filters above the results to narrow by content type, publication year, and sort order.