rustc-dev-guide.rust-lang.org
minicore test auxiliary: using core stubs tests/auxiliary/minicore.rs is a test auxiliary for ui/codegen/assembly/mir-opt test suites. It provides core stubs for tests that need to build for cross-compiled targets but do not need/want to ru...
Guide to Rustc Development
Book
2024-01-01
~1 min read
rustc-dev-guide.rust-lang.org
Ecosystem testing Rust tests integration with real-world code in the ecosystem to catch regressions and make informed decisions about the evolution of the language. Testing methods Crater Crater is a tool which runs tests on many thousands...
Guide to Rustc Development
Book
2024-01-01
~1 min read
rustc-dev-guide.rust-lang.org
Crater Crater is a tool for compiling and running tests for every crate on crates.io (and a few on GitHub). It is mainly used for checking the extent of breakage when implementing potentially breaking changes and ensuring lack of breakage b...
Guide to Rustc Development
Book
2024-01-01
~1 min read
rustc-dev-guide.rust-lang.org
Fuchsia integration tests Fuchsia is an open-source operating system with about 2 million lines of Rust code.[^loc] It has caught a large number of regressions in the past and was subsequently included in CI. What to do if the Fuchsia job b...
Guide to Rustc Development
Book
2024-01-01
~5 min read
rustc-dev-guide.rust-lang.org
Rust for Linux integration tests Rust for Linux (RfL) is an effort for adding support for the Rust programming language into the Linux kernel. What to do if the Rust for Linux job breaks? If a PR breaks the Rust for Linux CI job, then: • If...
Guide to Rustc Development
Book
2024-01-01
~1 min read
rustc-dev-guide.rust-lang.org
Codegen backend testing See also the Code generation chapter. In addition to the primary LLVM codegen backend, the rust-lang/rust CI also runs tests of the cranelift and GCC codegen backends in certain test jobs. For more details on the tes...
Guide to Rustc Development
Book
2024-01-01
~1 min read
rustc-dev-guide.rust-lang.org
Cranelift codegen backend tests TODO: please add some more information to this page.
Guide to Rustc Development
Book
2024-01-01
~1 min read
rustc-dev-guide.rust-lang.org
GCC codegen backend We run a subset of the compiler test suite with the GCC codegen backend on our CI, to help find changes that could break the integration of this backend with the compiler. If you encounter any bugs or problems with the G...
Guide to Rustc Development
Book
2024-01-01
~3 min read
rustc-dev-guide.rust-lang.org
Performance testing rustc-perf A lot of work is put into improving the performance of the compiler and preventing performance regressions. The rustc-perf project provides several services for testing and tracking performance. It provides ho...
Guide to Rustc Development
Book
2024-01-01
~2 min read
rustc-dev-guide.rust-lang.org
Miscellaneous testing-related info RUSTC_BOOTSTRAP and stability This is a bootstrap/compiler implementation detail, but it can also be useful for testing: • RUSTC_BOOTSTRAP=1 will "cheat" and bypass usual stability checking, allowing you t...
Guide to Rustc Development
Book
2024-01-01
~1 min read
rustc-dev-guide.rust-lang.org
Debugging the compiler This chapter contains a few tips to debug the compiler. These tips aim to be useful no matter what you are working on. Some of the other chapters have advice about specific parts of the compiler (e.g. the Queries Debu...
Guide to Rustc Development
Book
2024-01-01
~8 min read
rustc-dev-guide.rust-lang.org
Using tracing to debug the compiler The compiler has a lot of debug! (or trace!) calls, which print out logging information at many points. These are very useful to at least narrow down the location of a bug if not to find it entirely, or j...
Guide to Rustc Development
Book
2024-01-01
~7 min read
rustc-dev-guide.rust-lang.org
Profiling the compiler This section talks about how to profile the compiler and find out where it spends its time. Depending on what you're trying to measure, there are several different approaches: • If you want to see if a PR improves or...
Guide to Rustc Development
Book
2024-01-01
~3 min read
rustc-dev-guide.rust-lang.org
Profiling with perf This is a guide for how to profile rustc with perf. Initial steps • Get a clean checkout of rust-lang/rust • Set the following settings in your bootstrap.toml: • rust.debuginfo-level = 1 - enables line debuginfo • rust.j...
Guide to Rustc Development
Book
2024-01-01
~9 min read
rustc-dev-guide.rust-lang.org
Profiling on Windows Introducing WPR and WPA High-level performance analysis (including memory usage) can be performed with the Windows Performance Recorder (WPR) and Windows Performance Analyzer (WPA). As the names suggest, WPR is for reco...
Guide to Rustc Development
Book
2024-01-01
~4 min read
rustc-dev-guide.rust-lang.org
Profiling with rustc-perf The Rust benchmark suite provides a comprehensive way of profiling and benchmarking the Rust compiler. You can find instructions on how to use the suite in its manual. However, using the suite manually can be a bit...
Guide to Rustc Development
Book
2024-01-01
~2 min read
rustc-dev-guide.rust-lang.org
crates.io dependencies The Rust compiler supports building with some dependencies from crates.io. Rust Forge has official policy for vetting new dependencies. Permitted dependencies The tidy tool has a list of crates that are allowed. To ad...
Guide to Rustc Development
Book
2024-01-01
~1 min read
rustc-dev-guide.rust-lang.org
Contribution procedures Bug reports While bugs are unfortunate, they're a reality in software. We can't fix what we don't know about, so please report liberally. If you're not sure if something is a bug, feel free to open an issue anyway. I...
Guide to Rustc Development
Book
2024-01-01
~16 min read
rustc-dev-guide.rust-lang.org
About the compiler team NOTE: There exists much detail about the team on Forge, making most of the following obsolete. rustc is maintained by the Rust compiler team. The people who belong to this team collectively work to track regressions...
Guide to Rustc Development
Book
2024-01-01
~4 min read
rustc-dev-guide.rust-lang.org
Using Git The Rust project uses Git to manage its source code. In order to contribute, you'll need some familiarity with its features so that your changes can be incorporated into the compiler. The goal of this page is to cover some of the...
Guide to Rustc Development
Book
2024-01-01
~20 min read