about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
AgeCommit message (Collapse)AuthorLines
2025-03-10Handle backticks in try job patternsJakub Beránek-11/+16
2025-03-10Modify try-job documentationJakub Beránek-5/+8
2025-03-10Merge pull request #2258 from fee1-dead-contrib/constckOli Scherer-67/+160
Rewrite effects checking chapter
2025-03-10Merge pull request #2273 from rust-lang/tshepang-patch-1许杰友 Jieyou Xu (Joe)-2/+2
use new terminology
2025-03-10add missing punctuationTshepang Mbambo-1/+1
2025-03-10clean --bless textTshepang Mbambo-5/+7
2025-03-10add a pause, for readabilityTshepang Mbambo-2/+2
2025-03-10already mentioned before showing code snippetTshepang Mbambo-1/+1
2025-03-10use new terminologyTshepang Mbambo-2/+2
2025-03-09Merge pull request #2270 from tshepang/example-llvm-prs许杰友 Jieyou Xu (Joe)-14/+9
mention llvm 20 in example prs
2025-03-09Merge pull request #2271 from rust-lang/tshepang-patch-1许杰友 Jieyou Xu (Joe)-2/+1
fix text
2025-03-08ignore-stage0 and only-stage0 do not existTshepang Mbambo-1/+1
2025-03-08fix textTshepang Mbambo-2/+1
- There is more than just target and stage - There is only 3 stages, so don't mention them specially
2025-03-08link to latest major llvm update prTshepang Mbambo-1/+2
2025-03-08only a few are needed as examplesTshepang Mbambo-6/+0
2025-03-08numbers were not sequential, so stop tryingTshepang Mbambo-7/+7
2025-03-08consider `explicit_implied_const_bounds`Deadbeef-1/+30
2025-03-07Document that `rmake.rs`/`run-make-support` may not use unstable features许杰友 Jieyou Xu (Joe)-0/+4
2025-03-05Don't suggest explicitly `cfg`-gating `trace!` calls in bootstrapmoxian-3/+1
2025-03-05Rollup merge of #136581 - jieyouxu:makefile-be-gone, r=Kobzol许杰友 Jieyou Xu (Joe)-60/+2
Retire the legacy `Makefile`-based `run-make` test infra The final piece of [porting run-make tests to use Rust #121876](https://github.com/rust-lang/rust/issues/121876). Closes #121876. Closes #40713. Closes #81791 (no longer using `wc`). Closes #56475 (no longer a problem in current form of that test; we don't ignore the test on `aarch64-unknown-linux-gnu`). ### Summary This PR removes the legacy `Makefile`-based `run-make` test infra which has served us well over the years. The legacy infra is no longer needed since we ported all of `Makefile`-based `run-make` tests to the new `rmake.rs` infra. Additionally, this PR: - Removes `tests/run-make/tools.mk` since no more `Makefile`-based tests remain. - Updates `tests/run-make/README.md` and rustc-dev-guide docs to remove mention about `Makefile`-based `run-make` tests - Update test suite requirements in rustc-dev-guide on Windows to no longer need MSYS2 (they should also now run successfully on native Windows MSVC). - Update `triagebot.toml` to stop backlinking to #121876. **Thanks to everyone who helped in this effort to modernize the `run-make` test infra and test suite!** r? bootstrap
2025-03-04Auto merge of #135695 - Noratrieb:elf-raw-dylib, r=bjorn3bors-0/+1
Support raw-dylib link kind on ELF raw-dylib is a link kind that allows rustc to link against a library without having any library files present. This currently only exists on Windows. rustc will take all the symbols from raw-dylib link blocks and put them in an import library, where they can then be resolved by the linker. While import libraries don't exist on ELF, it would still be convenient to have this same functionality. Not having the libraries present at build-time can be convenient for several reasons, especially cross-compilation. With raw-dylib, code linking against a library can be cross-compiled without needing to have these libraries available on the build machine. If the libc crate makes use of this, it would allow cross-compilation without having any libc available on the build machine. This is not yet possible with this implementation, at least against libc's like glibc that use symbol versioning. The raw-dylib kind could be extended with support for symbol versioning in the future. This implementation is very experimental and I have not tested it very well. I have tested it for a toy example and the lz4-sys crate, where it was able to successfully link a binary despite not having a corresponding library at build-time. I was inspired by Björn's comments in https://internals.rust-lang.org/t/bundle-zig-cc-in-rustup-by-default/22096/27 Tracking issue: #135694 r? bjorn3 try-job: aarch64-apple try-job: x86_64-msvc-1 try-job: x86_64-msvc-2 try-job: test-various
2025-03-03Remove some unnecessary aliases from `rustc_data_structures::sync`Zalathar-2/+0
With the removal of `cfg(parallel_compiler)`, these are always shared references and `std::sync::OnceLock`.
2025-03-02Auto merge of #136864 - Kobzol:citool, r=marcoienibors-4/+13
Rewrite the `ci.py` script in Rust It would seem that I would learn by now that any script written in Python will become unmaintainable sooner or later, but alas.. r? `@marcoieni` try-job: aarch64-gnu try-job: dist-x86_64-linux-alt try-job: x86_64-msvc-ext2 Fixes: https://github.com/rust-lang/rust/issues/137013
2025-03-02rustc-dev-guide: remove mentions of legacy `Makefile` run-make infra许杰友 Jieyou Xu (Joe)-60/+2
And remove outdated requirements to run `run-make` tests on Windows.
2025-02-26Support raw-dylib link kind on ELFNoratrieb-0/+1
raw-dylib is a link kind that allows rustc to link against a library without having any library files present. This currently only exists on Windows. rustc will take all the symbols from raw-dylib link blocks and put them in an import library, where they can then be resolved by the linker. While import libraries don't exist on ELF, it would still be convenient to have this same functionality. Not having the libraries present at build-time can be convenient for several reasons, especially cross-compilation. With raw-dylib, code linking against a library can be cross-compiled without needing to have these libraries available on the build machine. If the libc crate makes use of this, it would allow cross-compilation without having any libc available on the build machine. This is not yet possible with this implementation, at least against libc's like glibc that use symbol versioning. The raw-dylib kind could be extended with support for symbol versioning in the future. This implementation is very experimental and I have not tested it very well. I have tested it for a toy example and the lz4-sys crate, where it was able to successfully link a binary despite not having a corresponding library at build-time.
2025-02-25Merge from rustcBoxy-12/+63
2025-02-25Preparing for merge from rustcBoxy-1/+1
2025-02-25Fix posting message to ZulipJakub Beránek-1/+1
2025-02-24use lua localsjyn-5/+5
Co-authored-by: DianQK <dianqk@dianqk.net>
2025-02-23document how to setup RA for nvim automaticallyjyn-4/+29
2025-02-23Auto merge of #137215 - onur-ozkan:rustc-tool-build-stages, r=jieyouxu,Kobzolbors-0/+24
stabilize stage management for rustc tools https://github.com/rust-lang/rust/pull/135990 got out of control due to excessive complexity. This PR aims to achieve the same goal with a simpler approach, likely through multiple smaller PRs. I will keep the other one read-only and open as a reference for future work. This work stabilizes the staging logic for `ToolRustc` programs, so you no longer need to handle build and target compilers separately in steps. Previously, most tools didn't do this correctly, which was causing the compiler to be built twice (e.g., `x test cargo --stage 1` would compile the stage 2 compiler before, but now it only compiles the stage 1 compiler). I also tried to document how we should write `ToolRustc` steps as they are quite different and require more attention than other tools. Next goal is to stabilize how stages are handled for the rustc itself. Currently, `x build --stage 1` builds the stage 1 compiler which is fine, but `x build compiler --stage 1` builds stage 2 compiler. ~~for now, r? ghost~~
2025-02-20Rewrite effects checking chapterDeadbeef-67/+131
2025-02-20Merge pull request #2256 from torfsen/fix-examples-for-nightly-2025-02-13许杰友 Jieyou Xu (Joe)-14/+37
2025-02-19Rollup merge of #137227 - epage:features_untracked, r=compiler-errorsMatthias Krüger-3/+1
docs(dev): Update the feature-gate instructions `features_untracked` was removed in #114723 features are now functions as of #132027
2025-02-19Rollup merge of #127793 - ChaiTRex:zed_support, r=KobzolMatthias Krüger-0/+11
Added project-specific Zed IDE settings This repository currently has project-specific VS Code IDE settings in `.vscode` and `compiler/rustc_codegen_cranelift/.vscode`. Now there are equivalent project-specific Zed IDE settings alongside those. This fixes `rust-analyzer` not being able to properly handle this project. Note that: 1. The contents of `src/tools/rust-analyzer/.vscode` could not be translated to Zed, as they aren't basic IDE settings. 2. One of the VS Code settings in `.vscode` has no corresponding setting in Zed, and so this has been noted like this: ```json "_settings_only_in_vs_code_not_yet_in_zed": { "git.detectSubmodulesLimit": 20 }, ```
2025-02-19add rustc-dev doc about bootstrap toolsonur-ozkan-0/+24
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18docs(dev): Access features as functions, not membersEd Page-1/+1
This was changed in #132027
2025-02-18docs(dev): Remove reference to features_untrackedEd Page-3/+1
This was removed in #114723
2025-02-17Add Zed to dev guide suggested workflows pageChai T. Rex-0/+11
2025-02-17Update documentationJakub Beránek-4/+13
2025-02-17Rollup merge of #137080 - jieyouxu:more-tracing, r=onur-ozkanMatthias Krüger-0/+8
bootstrap: add more tracing to compiler/std/llvm flows - Add more tracing to compiler/std/llvm flows. - Two drive-by nits: 1. Take `TargetSelection` by-value for `builder.is_builder_target()`. Noticed while adding tracing; follow-up to #136767. 2. Coalesce enzyme build logic into one branch. - Document `COMPILER{,_FOR}` tracing targets for #96176. - No functional changes. ### Testing You can play with the tracing locally with: ``` $ BOOTSTRAP_TRACING=bootstrap=debug ./x build library $ BOOTSTRAP_TRACING=bootstrap=trace ./x build library $ BOOTSTRAP_TRACING=bootstrap=trace,COMPILER=trace,COMPILER_FOR=trace ./x build library ``` ### Previews ``` $ BOOTSTRAP_TRACING=bootstrap=debug ./x build library ``` ![Screenshot 2025-02-15 230824](https://github.com/user-attachments/assets/c3b02b62-d52e-4c03-a00a-da0d95618989) ``` $ BOOTSTRAP_TRACING=bootstrap=trace,COMPILER=trace,COMPILER_FOR=trace ./x build library ``` ![Screenshot 2025-02-15 233859](https://github.com/user-attachments/assets/842e4ece-4c26-4191-acbb-5f93e42de4dc) r? ``@onur-ozkan`` (or reroll)
2025-02-17Move some `Map` methods onto `TyCtxt`.Nicholas Nethercote-1/+1
The end goal is to eliminate `Map` altogether. I added a `hir_` prefix to all of them, that seemed simplest. The exceptions are `module_items` which became `hir_module_free_items` because there was already a `hir_module_items`, and `items` which became `hir_free_items` for consistency with `hir_module_free_items`.
2025-02-16Bump mdbook-linkcheck2 dependency versionMartin Liska-1/+1
2025-02-16rustc-dev-guide: document `COMPILER` and `COMPILER_FOR` tracing targets许杰友 Jieyou Xu (Joe)-0/+8
2025-02-15Merge pull request #2246 from marxin/CI-more-ofterNoah Lev-2/+2
Run CI multiple times a day
2025-02-15Merge pull request #2254 from marxin/start-using-latest-linkcheck2Noah Lev-1/+1
Start using latest release where -f checks all local links
2025-02-15Fix CI scheduleMartin Liska-1/+1
2025-02-15Fix examples to work with nightly-2025-02-13Florian Brucker-14/+37
While there were comments indicating which nightly versions the examples were tested with, those versions did not work for me: neither did the examples compile, nor did they produce the expected output. This commit fixes the compilation issues, using nightly-2025-02-13 for all examples (previously the version differed between the examples) and, in the case of the `rustc_driver` examples, also fixes the argument passing: rustc ignores the first argument, so we need to pass the filename as the second (otherwise we only get the help text printed). Note that the `rustc-interface-getting-diagnostics.rs` example still does not produce any output, which I assume is not how it is intended. However, I don't know enough to fix it. To avoid inconsistencies between the documented version and the actually required version I've moved the version comment from the Markdown into the Rust code where it hopefully won't be forgotten as easily. Finally I've clarified in the examples' README that you also need to use the proper nightly version when compiling the examples, not just when running them.
2025-02-15rustc-dev-guide: document `{ignore,only}-rustc_abi-x86-sse2`许杰友 Jieyou Xu (Joe)-0/+1
2025-02-14Merge pull request #2252 from chenyukang/fix-perf许杰友 Jieyou Xu (Joe)-0/+7
Add note for perf issue