Skip to content

rustc-dev-guide subtree update #145040

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Aug 7, 2025
2 changes: 1 addition & 1 deletion src/doc/rustc-dev-guide/rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
383b9c447b61641e1f1a3850253944a897a60827
6bcdcc73bd11568fd85f5a38b58e1eda054ad1cd
2 changes: 1 addition & 1 deletion src/doc/rustc-dev-guide/src/offload/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ First you need to clone and configure the Rust repository:
```bash
git clone [email protected]:rust-lang/rust
cd rust
./configure --enable-llvm-link-shared --release-channel=nightly --enable-llvm-assertions --enable-offload --enable-enzyme --enable-clang --enable-lld --enable-option-checking --enable-ninja --disable-docs
./configure --enable-llvm-link-shared --release-channel=nightly --enable-llvm-assertions --enable-llvm-offload --enable-llvm-enzyme --enable-clang --enable-lld --enable-option-checking --enable-ninja --disable-docs
```

Afterwards you can build rustc using:
Expand Down
4 changes: 4 additions & 0 deletions src/doc/rustc-dev-guide/src/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ the name `'tcx`, which means that something is tied to the lifetime of the

[`TyCtxt`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TyCtxt.html

For more information about queries in the compiler, see [the queries chapter][queries].

[queries]: ./query.md

### `ty::Ty`

Types are really important in Rust, and they form the core of a lot of compiler
Expand Down
23 changes: 22 additions & 1 deletion src/doc/rustc-dev-guide/src/tests/running.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,14 +342,35 @@ coordinate running tests (see [src/bootstrap/src/core/build_steps/test.rs]).
> **TODO**
>
> - Is there any support for using an iOS emulator?
> - It's also unclear to me how the wasm or asm.js tests are run.

[armhf-gnu]: https://github.com/rust-lang/rust/tree/master/src/ci/docker/host-x86_64/armhf-gnu/Dockerfile
[QEMU]: https://www.qemu.org/
[remote-test-client]: https://github.com/rust-lang/rust/tree/master/src/tools/remote-test-client
[remote-test-server]: https://github.com/rust-lang/rust/tree/master/src/tools/remote-test-server
[src/bootstrap/src/core/build_steps/test.rs]: https://github.com/rust-lang/rust/blob/master/src/bootstrap/src/core/build_steps/test.rs

## Testing tests on wasi (wasm32-wasip1)

Some tests are specific to wasm targets.
To run theste tests, you have to pass `--target wasm32-wasip1` to `x test`.
Additionally, you need the wasi sdk.
Follow the install instructions from the [wasi sdk repository] to get a sysroot on your computer.
On the [wasm32-wasip1 target support page] a minimum version is specified that your sdk must be able to build.
Some cmake commands that take a while and give a lot of very concerning c++ warnings...
Then, in `bootstrap.toml`, point to the sysroot like so:

```
[target.wasm32-wasip1]
wasi-root = "<wasi-sdk location>/build/sysroot/install/share/wasi-sysroot"
```

In my case I git-cloned it next to my rust folder, so it was `../wasi-sdk/build/....`
Now, tests should just run, you don't have to set up anything else.

[wasi sdk repository]: https://github.com/WebAssembly/wasi-sdk
[wasm32-wasip1 target support page]: https://github.com/rust-lang/rust/blob/master/src/doc/rustc/src/platform-support/wasm32-wasip1.md#building-the-target.


## Running rustc_codegen_gcc tests

First thing to know is that it only supports linux x86_64 at the moment. We will
Expand Down
Loading