Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
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...
rustc-dev-guide.rust-lang.org Guide to Rustc Development Book 2024-01-01 ~1 min read
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...
rustc-dev-guide.rust-lang.org Guide to Rustc Development Book 2024-01-01 ~1 min read
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...
rustc-dev-guide.rust-lang.org Guide to Rustc Development Book 2024-01-01 ~8 min read
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...
rustc-dev-guide.rust-lang.org Guide to Rustc Development Book 2024-01-01 ~2 min read
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...
rustc-dev-guide.rust-lang.org Guide to Rustc Development Book 2024-01-01 ~1 min read
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...
rustc-dev-guide.rust-lang.org Guide to Rustc Development Book 2024-01-01 ~2 min read
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...
rustc-dev-guide.rust-lang.org Guide to Rustc Development Book 2024-01-01 ~7 min read
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...
rustc-dev-guide.rust-lang.org Guide to Rustc Development Book 2024-01-01 ~8 min read
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...
rustc-dev-guide.rust-lang.org Guide to Rustc Development Book 2024-01-01 ~6 min read
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...
rustc-dev-guide.rust-lang.org Guide to Rustc Development Book 2024-01-01 ~7 min read
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...
rustc-dev-guide.rust-lang.org Guide to Rustc Development Book 2024-01-01 ~5 min read
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...
rustc-dev-guide.rust-lang.org Guide to Rustc Development Book 2024-01-01 ~5 min read
(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...
rustc-dev-guide.rust-lang.org Guide to Rustc Development Book 2024-01-01 ~1 min read
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...
rustc-dev-guide.rust-lang.org Guide to Rustc Development Book 2024-01-01 ~1 min read
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...
rustc-dev-guide.rust-lang.org Guide to Rustc Development Book 2024-01-01 ~7 min read
(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
rustc-dev-guide.rust-lang.org Guide to Rustc Development Book 2024-01-01 ~1 min read
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...
rustc-dev-guide.rust-lang.org Guide to Rustc Development Book 2024-01-01 ~4 min read
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...
rustc-dev-guide.rust-lang.org Guide to Rustc Development Book 2024-01-01 ~18 min read
(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...
rustc-dev-guide.rust-lang.org Guide to Rustc Development Book 2024-01-01 ~1 min read
(WIP) CDB - Natvis Official documentation for Natvis can be found here and here
rustc-dev-guide.rust-lang.org Guide to Rustc Development Book 2024-01-01 ~1 min read
"The big gorilla 3D game framework. Apparently it actually works."

Search tips

Type anything to search across articles, videos (including conference talks), podcasts, and research. 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.
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.