Rollup merge of #153174 - Trivo25:fix-wasm64-sync-cfg, r=joboet

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
This commit is contained in:
Jonathan Brouwer
2026-03-06 18:49:47 +01:00
committed by GitHub

Diff Content Not Available