@@ -342,14 +342,35 @@ coordinate running tests (see [src/bootstrap/src/core/build_steps/test.rs]).
342
342
> ** TODO**
343
343
>
344
344
> - Is there any support for using an iOS emulator?
345
- > - It's also unclear to me how the wasm or asm.js tests are run.
345
+ > - It's also unclear to me how the asm.js tests are run.
346
346
347
347
[ armhf-gnu ] : https://github.com/rust-lang/rust/tree/master/src/ci/docker/host-x86_64/armhf-gnu/Dockerfile
348
348
[ QEMU ] : https://www.qemu.org/
349
349
[ remote-test-client ] : https://github.com/rust-lang/rust/tree/master/src/tools/remote-test-client
350
350
[ remote-test-server ] : https://github.com/rust-lang/rust/tree/master/src/tools/remote-test-server
351
351
[ src/bootstrap/src/core/build_steps/test.rs ] : https://github.com/rust-lang/rust/blob/master/src/bootstrap/src/core/build_steps/test.rs
352
352
353
+ ## Testing tests on wasi (wasm32-wasip1)
354
+
355
+ Some tests are specific to wasm targets.
356
+ To run theste tests, you have to pass ` --target wasm32-wasip1 ` to ` x test ` .
357
+ Additionally, you need the wasi sdk.
358
+ Follow the install instructions from the [ wasi sdk repository] to get a sysroot on your computer.
359
+ Some cmake commands that take a while and give a lot of very concerning c++ warnings...
360
+ Then, in ` bootstrap.toml ` , point to the sysroot like so:
361
+
362
+ ```
363
+ [target.wasm32-wasip1]
364
+ wasi-root = "<wasi-sdk ___location>/build/sysroot/install/share/wasi-sysroot"
365
+ ```
366
+
367
+ In my case I git-cloned it next to my rust folder, so it was ` ../wasi-sdk/build/.... `
368
+ Now, tests should just run, you don't have to set up anything else.
369
+
370
+ [ wasi sdk repository ] : https://github.com/WebAssembly/wasi-sdk
371
+
372
+
373
+
353
374
## Running rustc_codegen_gcc tests
354
375
355
376
First thing to know is that it only supports linux x86_64 at the moment. We will
0 commit comments