Allow compiling the wasm32-wasi std library with atomics#102372
Allow compiling the wasm32-wasi std library with atomics#102372bors merged 3 commits intorust-lang:masterfrom
wasm32-wasi std library with atomics#102372Conversation
|
r? @thomcc (rust-highfive has picked a reviewer for you, use r? to override) |
|
There are a couple of things I could use help with in this PR:
|
UNIX uses an |
You'll need to set I've historically dabbled in getting (FWIW historical test runs turned up no actual failures, just a lot of infrastructural changes to get things working) |
|
If you're interested this is my historical work to get the test suite running with in |
|
This is still a draft. Feel free to kick it back to me with at-rustbot ready once it's ready for review. @rustbot author |
|
As @alexcrichton notes above, the in-tree testing story still has some way to go, so I manually tested that this change works using the following sequence of steps:
|
442e536 to
587e971
Compare
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
|
Ok, I guess: @rustbot label +T-libs-api -T-libs |
|
Oh, never mind: @rustbot label -T-libs-api +T-libs |
|
Have you done a check for the places we might |
I think you mean I would say that compiling Rust with atomics and shared memory is still a highly risky venture and that this PR only fixes an issue that I am aware of. There will likely be others once people start experimenting with this. |
Uh, yeah, and just a grep for cfgs with wasm in them I guess (in case they were on
This is pretty concerning (assuming you mean that there are likely issues in |
|
Oh, it requires -Zbuild-std? Hm... |
|
Yeah, this PR just fixes compilation with features that are already exposed (even if experimentally behind |
Allow compiling the `wasm32-wasi` std library with atomics The issue rust-lang#102157 demonstrates how currently the `-Z build-std` option will fail when re-compiling the standard library with `RUSTFLAGS` like `RUSTFLAGS="-C target-feature=+atomics,+bulk-memory -C link-args=--shared-memory"`. This change attempts to resolve those build issues by depending on the the WebAssembly `futex` module and providing an implementation for `env_lock`. Fixes rust-lang#102157.
|
Failed on rollup: #102908 (comment) |
|
@bors r+ |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (2a92176): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Footnotes |
|
The regressions are recent diesel noise, and unrelated to this PR and the wasi target. @rustbot label: +perf-regression-triaged |
Allow compiling the `wasm32-wasi` std library with atomics The issue rust-lang#102157 demonstrates how currently the `-Z build-std` option will fail when re-compiling the standard library with `RUSTFLAGS` like `RUSTFLAGS="-C target-feature=+atomics,+bulk-memory -C link-args=--shared-memory"`. This change attempts to resolve those build issues by depending on the the WebAssembly `futex` module and providing an implementation for `env_lock`. Fixes rust-lang#102157.
The issue #102157 demonstrates how currently the
-Z build-stdoption will fail when re-compiling the standard library withRUSTFLAGSlikeRUSTFLAGS="-C target-feature=+atomics,+bulk-memory -C link-args=--shared-memory". This change attempts to resolve those build issues by depending on the the WebAssemblyfutexmodule and providing an implementation forenv_lock. Fixes #102157.