# [DRAFT] <h1 align="center">Rust Language Bootstrap Team 2023 Progress Report</h1> <br/> ## Highlights and Development Statistics of 2023 ### This year with the `T-Bootstrap` label: <details> <summary>201 issues were reported</summary> <div style="overflow-y: scroll; max-height: 750px;"> - [`x clippy` keeps nix-patching binaries](https://github.com/rust-lang/rust/issues/119442) - [set `--change-id` in ci](https://github.com/rust-lang/rust/issues/119296) - [Manifest issue with "preview" components](https://github.com/rust-lang/rust/issues/119164) - [When running CI locally with src/ci/docker/run.sh bootstrap can't access git history, requires a local LLVM build](https://github.com/rust-lang/rust/issues/118930) - [Bootstrap uses stage 1 artifacts in a stage 2 cross testing context ](https://github.com/rust-lang/rust/issues/118918) - [error[E0599]: no method named `write_all` found for struct `File` in the current scope](https://github.com/rust-lang/rust/issues/118862) - [give a better error when `origin/HEAD` is vastly out of date](https://github.com/rust-lang/rust/issues/118758) - [download-ci-llvm still builds compiler-rt](https://github.com/rust-lang/rust/issues/118630) - [The build system doesn't allow to customize compile/linker/cmake flags for sanitizers](https://github.com/rust-lang/rust/issues/118629) - [Cannot use unstable flags in RUSTFLAGS_BOOTSTRAP](https://github.com/rust-lang/rust/issues/118369) - [bootstrap: "test library/core --stage 2" does not actually test stage 2](https://github.com/rust-lang/rust/issues/118233) - [Bootstrap sometimes fails to build miri](https://github.com/rust-lang/rust/issues/118129) - [LLVMRust symbols not defined when building with -Zcross-crate-inline-threshold=always](https://github.com/rust-lang/rust/issues/118084) - [Mommy can't check rust-analyzer if I ask her for debuginfo](https://github.com/rust-lang/rust/issues/118061) - [bootstrap: fingerprinting is broken somehow](https://github.com/rust-lang/rust/issues/117983) - [Bootstrap: Build compiler crates that ought to compile on stable without `RUSTC_BOOTSTRAP=1`](https://github.com/rust-lang/rust/issues/117937) - [bootstrap is broken in rust-1.75.0-beta with: thread 'main' panicked at src/core/builder.rs:1795:26: std::fs::read_dir(registry_src) failed with No such file or directory (os error 2)](https://github.com/rust-lang/rust/issues/117885) - [`x clean compiler/rustc_middle` errors with a stability error](https://github.com/rust-lang/rust/issues/117762) - [Some tests are incorrectly skipped for macOS CI](https://github.com/rust-lang/rust/issues/117721) ... (removed the rest for now to avoid hackmd limit) </div> </details> <details> <summary>222 issues were closed</summary> <div style="overflow-y: scroll; max-height: 750px;"> - [When running CI locally with src/ci/docker/run.sh bootstrap can't access git history, requires a local LLVM build](https://github.com/rust-lang/rust/issues/118930) - [error[E0599]: no method named `write_all` found for struct `File` in the current scope](https://github.com/rust-lang/rust/issues/118862) - [LLVMRust symbols not defined when building with -Zcross-crate-inline-threshold=always](https://github.com/rust-lang/rust/issues/118084) - [Mommy can't check rust-analyzer if I ask her for debuginfo](https://github.com/rust-lang/rust/issues/118061) - [bootstrap: fingerprinting is broken somehow](https://github.com/rust-lang/rust/issues/117983) - [`x clean compiler/rustc_middle` errors with a stability error](https://github.com/rust-lang/rust/issues/117762) - [Suggestion: Cache `x --help` so that it doesn't rebuild to show help message](https://github.com/rust-lang/rust/issues/117653) - [CI: Bootstrap no longer documents compiler crates](https://github.com/rust-lang/rust/issues/117430) - [cranelift component broken?](https://github.com/rust-lang/rust/issues/117366) - [bootstrap: cargo output is missing](https://github.com/rust-lang/rust/issues/117315) ... (removed the rest for now to avoid hackmd limit) </div> </details> <details> <summary>895 pull requests were opened</summary> <div style="overflow-y: scroll; max-height: 750px;"> - [annotate-snippets: update to 0.10](https://github.com/rust-lang/rust/pull/119448) - [Handle non-existent/empty .cargo/registry/src and empty env vars](https://github.com/rust-lang/rust/pull/119445) - [Simplify bootstrap `--check-cfg` arguments](https://github.com/rust-lang/rust/pull/119441) - [[perf experiment] Enable overflow checks for not-std](https://github.com/rust-lang/rust/pull/119440) - [bootstrap: Move -Clto= setting from Rustc::run to rustc_cargo](https://github.com/rust-lang/rust/pull/119414) - [solaris support on bootstrap lock](https://github.com/rust-lang/rust/pull/119413) - [utilize the unused `llvm-tools` option](https://github.com/rust-lang/rust/pull/119378) - [Remove usage of deprecated `missing-tools` bootstrap flag](https://github.com/rust-lang/rust/pull/119373) - [Update sysinfo](https://github.com/rust-lang/rust/pull/119303) - [suppress change-tracker warnings in CI containers](https://github.com/rust-lang/rust/pull/119298) - [fix `./configure --set change-id`](https://github.com/rust-lang/rust/pull/119294) - [bootstrap: use same make flags with rustdoc](https://github.com/rust-lang/rust/pull/119292) - [[debugging] do not merge](https://github.com/rust-lang/rust/pull/119279) ... (removed the rest for now to avoid hackmd limit) </div> </details> <details> <summary>714 pull requests were merged</summary> <div style="overflow-y: scroll; max-height: 750px;"> - [Simplify bootstrap `--check-cfg` arguments](https://github.com/rust-lang/rust/pull/119441) - [solaris support on bootstrap lock](https://github.com/rust-lang/rust/pull/119413) - [utilize the unused `llvm-tools` option](https://github.com/rust-lang/rust/pull/119378) - [Remove usage of deprecated `missing-tools` bootstrap flag](https://github.com/rust-lang/rust/pull/119373) - [Update sysinfo](https://github.com/rust-lang/rust/pull/119303) - [fix `./configure --set change-id`](https://github.com/rust-lang/rust/pull/119294) - [bootstrap: use same make flags with rustdoc](https://github.com/rust-lang/rust/pull/119292) - [remove dead inferred outlives testing code](https://github.com/rust-lang/rust/pull/119248) ... (removed the rest for now to avoid hackmd limit) </div> </details> <br/> *Please note that the rollups are not considered in the Pull Request statistics.* ### Most Notable Pull Requests Merged This Year Related to Bootstrap: - [Add `dist.compression-profile` option to control compression speed](https://github.com/rust-lang/rust/pull/109124) - [Add `libLLVM.so` to the target libdir when download-rustc is enabled](https://github.com/rust-lang/rust/pull/110263) - [Add `rust.lto=off` to bootstrap and set as compiler/library default](https://github.com/rust-lang/rust/pull/107241) - [add bootstrap flag --skip-stage0-validation](https://github.com/rust-lang/rust/pull/117043) - [add safe compilation options](https://github.com/rust-lang/rust/pull/117966) - [add sanity checks for user write access on `x install`](https://github.com/rust-lang/rust/pull/116127) - [Add tests for configure.py](https://github.com/rust-lang/rust/pull/109267) - [allow LTO on proc-macro crates with `-Zdylib-lto`](https://github.com/rust-lang/rust/pull/115986) - [Always set `RUSTC_BOOTSTRAP` with `x doc`](https://github.com/rust-lang/rust/pull/109667) - [Always use `os-release` rather than `/lib` to detect `NixOS` (bootstrap)](https://github.com/rust-lang/rust/pull/115090) - [Apply BOLT optimizations without rebuilding LLVM](https://github.com/rust-lang/rust/pull/107723) - [Avoid one `rustc` rebuild in the optimized build pipeline](https://github.com/rust-lang/rust/pull/112012) - [Avoid unnecessary builds/rebuilds of `rust-demangler`](https://github.com/rust-lang/rust/pull/117197) - [bootstrap major change detection implementation](https://github.com/rust-lang/rust/pull/115898) - [bootstrap: cleanup the list of extra check cfgs](https://github.com/rust-lang/rust/pull/107080) - [bootstrap: Disallow `--exclude test::std`](https://github.com/rust-lang/rust/pull/112297) - [bootstrap: Don't override `debuginfo-level = 1` to mean `line-tables-only`](https://github.com/rust-lang/rust/pull/112528) - [bootstrap: simplify setting unstable-options for tools](https://github.com/rust-lang/rust/pull/117850) - [bootstrap: Unify test argument handling](https://github.com/rust-lang/rust/pull/110576) - [bootstrap: Update the output of the `check` descriptions](https://github.com/rust-lang/rust/pull/108463) - [bootstrap: use same make flags with rustdoc](https://github.com/rust-lang/rust/pull/119292) - [bootstrap: Various Step refactors](https://github.com/rust-lang/rust/pull/111955) - [Centralize command running in boostrap (part one)](https://github.com/rust-lang/rust/pull/116581) - [check config file before prompts on `x setup`](https://github.com/rust-lang/rust/pull/117708) - [clean stage-specific artifacts using x clean --stage](https://github.com/rust-lang/rust/pull/114126) - [Copy stage0 `rustc` binaries to `stage0-sysroot`](https://github.com/rust-lang/rust/pull/113341) - [coverage: Anonymize line numbers in `run-coverage` test snapshots](https://github.com/rust-lang/rust/pull/114875) - [coverage: Explicitly test the coverage maps produced by codegen/LLVM](https://github.com/rust-lang/rust/pull/114843) - [coverage: Rename the run-coverage test mode to coverage-run](https://github.com/rust-lang/rust/pull/117700) - [coverage: Unify `tests/coverage-map` and `tests/run-coverage` into `tests/coverage`](https://github.com/rust-lang/rust/pull/117484) - [Deny having src/test exisiting in tidy](https://github.com/rust-lang/rust/pull/106734) - [don't build `rust-analyzer-proc-macro-srv` on def config](https://github.com/rust-lang/rust/pull/119124) - [Don't compile rustc to self-test compiletest](https://github.com/rust-lang/rust/pull/112256) - [Don't pass --test-args to python -m unitest](https://github.com/rust-lang/rust/pull/113234) - [dump bootstrap shims](https://github.com/rust-lang/rust/pull/118647) - [enable parallel rustc front end in nightly builds](https://github.com/rust-lang/rust/pull/117435) - [enable rust_2018_idioms lint group for doctests](https://github.com/rust-lang/rust/pull/106621) - [Ensure `lld` is supported with `download-ci-llvm`](https://github.com/rust-lang/rust/pull/104748) - [Generalize LLD usage in bootstrap](https://github.com/rust-lang/rust/pull/116278) - [Generate docs for bootstrap itself](https://github.com/rust-lang/rust/pull/111976) - [Generate shell completions for bootstrap with Clap](https://github.com/rust-lang/rust/pull/111388) - [Greatly decrease the size of `rustc_driver.so` when debuginfo is enabled](https://github.com/rust-lang/rust/pull/110221) - [Import rust-installer & adjust compression settings](https://github.com/rust-lang/rust/pull/108534) - [Improve android-ndk property interface](https://github.com/rust-lang/rust/pull/116998) - [improve container runner script](https://github.com/rust-lang/rust/pull/119165) - [Improve startup time of bootstrap](https://github.com/rust-lang/rust/pull/111562) - [Include executed tests in the build metrics (and use a custom test display impl)](https://github.com/rust-lang/rust/pull/108659) - [Make `nodejs` control the default for RustdocJs tests instead of a hard-off switch](https://github.com/rust-lang/rust/pull/113640) - [Make Rust Analyzer tests faster by compiling less code](https://github.com/rust-lang/rust/pull/113244) - [Make the x tool use the x and x.ps1 scripts](https://github.com/rust-lang/rust/pull/105844) - [Migrate bootstrap to Clap-based argument parsing](https://github.com/rust-lang/rust/pull/110693) - [Move BOLT from `bootstrap` to `opt-dist`](https://github.com/rust-lang/rust/pull/113592) - [new tool rustdoc-gui-test](https://github.com/rust-lang/rust/pull/111348) - [Optimize librustc_driver.so with BOLT](https://github.com/rust-lang/rust/pull/116352) - [Parallelize initial Rust download in bootstrap](https://github.com/rust-lang/rust/pull/110427) - [Pass `--locked` to the x test tidy call](https://github.com/rust-lang/rust/pull/107169) - [Pass arguments to `x` subcommands with `--`](https://github.com/rust-lang/rust/pull/107905) - [Port PGO/LTO/BOLT optimized build pipeline to Rust](https://github.com/rust-lang/rust/pull/112235) - [Prepare the `bootstrap` tool for the new check-cfg syntax](https://github.com/rust-lang/rust/pull/116983) - [Recompile LLVM when it changes in the git sources](https://github.com/rust-lang/rust/pull/118187) - [Remap Cargo dependencies to /rust/deps](https://github.com/rust-lang/rust/pull/115872) - [Remove `llvm.skip-rebuild` option](https://github.com/rust-lang/rust/pull/108613) - [remove hex dependency in bootstrap](https://github.com/rust-lang/rust/pull/119020) - [Remove unused bootstrap config option](https://github.com/rust-lang/rust/pull/118703) - [Remove usage of deprecated `missing-tools` bootstrap flag](https://github.com/rust-lang/rust/pull/119373) - [reorganize/refactor bootstrap codebase](https://github.com/rust-lang/rust/pull/116196) - [Replace any existing `build/host` symlink](https://github.com/rust-lang/rust/pull/109811) - [Respect CARGOFLAGS in bootstrap.py](https://github.com/rust-lang/rust/pull/111979) - [Run tests on PGO/LTO/BOLT optimized dist artifacts](https://github.com/rust-lang/rust/pull/111495) - [Set `channel = nightly` in dist profile](https://github.com/rust-lang/rust/pull/113185) - [Set LIBC_CHECK_CFG=1 when building Rust code in bootstrap](https://github.com/rust-lang/rust/pull/108898) - [ship tools with sysroot](https://github.com/rust-lang/rust/pull/110365) - [Simplify bootstrap `--check-cfg` arguments](https://github.com/rust-lang/rust/pull/119441) - [skip {tidy,compiletest,rustdoc-gui} based tests for `DocTests::Only`](https://github.com/rust-lang/rust/pull/118322) - [solaris support on bootstrap lock](https://github.com/rust-lang/rust/pull/119413) - [solaris support on bootstrap lock](https://github.com/rust-lang/rust/pull/119413) - [Speed up tidy quite a lot](https://github.com/rust-lang/rust/pull/108772) - [speed up x clean](https://github.com/rust-lang/rust/pull/117723) - [Stop normalizing so many different prefixes](https://github.com/rust-lang/rust/pull/111975) - [Strip unexpected debuginfo from `libLLVM.so` and `librustc_driver.so` when not requesting any debuginfo](https://github.com/rust-lang/rust/pull/114305) - [Support `x test --stage 1 ui-fulldeps`](https://github.com/rust-lang/rust/pull/110478) - [Test the cargo args generated by bootstrap.py](https://github.com/rust-lang/rust/pull/112281) - [tidy: Issue an error when UI test limits are too high](https://github.com/rust-lang/rust/pull/110241) - [Update to LLVM 17](https://github.com/rust-lang/rust/pull/114048) - [Use `free-args` consistently in bootstrap](https://github.com/rust-lang/rust/pull/111223) - [utilize stdlib debug assertion status in compiletest](https://github.com/rust-lang/rust/pull/118132) - [utilize the unused llvm-tools option](https://github.com/rust-lang/rust/pull/119378) - [windows: kill rust-analyzer-proc-macro-srv before deleting stage0 directory](https://github.com/rust-lang/rust/pull/110979) ## Primary Goals for 2024 Plans for Bootstrap Team in 2024 will be designed (but not limited) around the topics outlined below. - ### Refactor Standard Library Bootstrapping As part of [compiler-team/issues/619: Redesign bootstrap stages](https://github.com/rust-lang/compiler-team/issues/619) proposal, we have a plan to utilize the beta standard library on stage0 instead of compiling it from the current source using the beta compiler. Standard library should only be built from current source in case where stage is not 0. - ### Migration of Python Scripts to Rust Removing Python scripts from bootstrap and relying entirely on Rust. For additional context, please refer to [rust-lang/rust/issues/94829](https://github.com/rust-lang/rust/issues/94829). - ### Custom Target Runners Support of [CARGO_TARGET_<triple>_RUNNER](https://doc.rust-lang.org/cargo/reference/config.html#targettriplerunner) from Cargo on bootstrap tests which should improve the experience of cross-platform tests. For additional context, please refer to [rust-lang/rust/issues/110537](https://github.com/rust-lang/rust/issues/110537). - ### Support for Building and Testing the Standard Library with `panic=abort` Improving bootstrap capability on standard library with `panic=abort` by providing an interface that allows users to build or test the standard library with their preferred panic strategy. For additional context, please refer to [rust-lang/rust/issues/84766](https://github.com/rust-lang/rust/issues/84766). - ### Feature Gating Developing a mechanism to manage all bootstrap features through a single interface from the build configuration. For additional context, please refer to [rust-lang/rust/issues/102600](https://github.com/rust-lang/rust/issues/102600). - ### Configuration Layer Currently, we don't have an interface for enabling different configurations for each stage. Until now, we have been implementing temporary solutions and workarounds (such as adding stage-based environment variables) when there was a need to modify options on specific stages. We will be enhancing the configuration layer with the support of stage-based options. For additional context, please refer to [rust-lang/rust/issues/112679](https://github.com/rust-lang/rust/issues/112679). - ### Increasing Test Coverage Expanding the test coverage for bootstrapping, reducing the team concerns on code-review and development.