GoogleChromeLabs / wasm-bindgen-rayon

An adapter for enabling Rayon-based concurrency on the Web with WebAssembly.
https://github.com/RReverser/wasm-bindgen-rayon
Apache License 2.0
404 stars 35 forks source link

why not stable? #34

Closed mimoo closed 1 year ago

mimoo commented 1 year ago

Hey!

I was wondering why we can't use Rust stable and have to use Rust nightly. Thanks!

RReverser commented 1 year ago

Because, as the README says, it required rebuilding standard library with Wasm atomics support, and that's possible only on nightly Rust. The standard library build provided by stable Rust doesn't support atomics.

RReverser commented 1 year ago

FWIW, as I just learnt, you can actually use stable toolchain too if you set RUSTC_BOOTSTRAP=1 env variable during the build. It's not particularly documented or meant to be used for this, but... it might help 😅