I tried to build an example project for wasm64-unknown-unknown with target-feature=+atomics, but the std failed to build due to
and
hardcoding
wasm32 arch.
I could get std to build by adding #![feature(simd_wasm64)] to https://github.com/rust-lang/rust/blob/master/library/std/src/lib.rs, and a few cfg checks to import the correct module.
I could work on a PR if that's the right approach.
Meta
rustc --version --verbose:
rustc 1.81.0-nightly (d7f6ebace 2024-06-16)
binary: rustc
commit-hash: d7f6ebacee13b6c03623c4b74197280454ede8de
commit-date: 2024-06-16
host: aarch64-apple-darwin
release: 1.81.0-nightly
LLVM version: 18.1.7
I tried to build an example project for
wasm64-unknown-unknownwithtarget-feature=+atomics, but thestdfailed to build due torust/library/std/src/sys/pal/wasm/atomics/futex.rs
Line 1 in 7a08f84
rust/library/std/src/sys/pal/wasm/atomics/thread.rs
Line 22 in 7a08f84
wasm32arch.I could get
stdto build by adding#![feature(simd_wasm64)]to https://github.com/rust-lang/rust/blob/master/library/std/src/lib.rs, and a fewcfgchecks to import the correct module.I could work on a PR if that's the right approach.
Meta
rustc --version --verbose: