mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
4e50a44530
std: add wasm64 to sync::Once and thread_parking atomics cfg guards When targeting `wasm64-unknown-unknown` with atomics enabled, `std::sync::Once` and `thread_parking` fall through to the `no_threads`/`unsupported` implementations because the cfg guards only check for `wasm32`. This causes worker threads to panic with `unreachable` at runtime. The underlying futex implementations already handle both wasm32 and wasm64 correctly, only the cfg guards were missing wasm64. I tested this manually with a multithreaded wasm64 application ([o1js](https://github.com/o1-labs/o1js/)) compiled with `-Z build-std=panic_abort,std` and `-C target-feature=+atomics,+bulk-memory,+mutable-globals` Related: rust-lang/rust#83879 rust-lang/rust#77839 Happy to adjust anything based on feedback