Skip to content

wasm64: std fails to build with target-feature=+atomics #126778

Closed
@wooden-worm

Description

@wooden-worm

I tried to build an example project for wasm64-unknown-unknown with target-feature=+atomics, but the std failed to build due to

use crate::arch::wasm32;
and
use crate::arch::wasm32;
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-target-featureArea: Enabling/disabling target features like AVX, Neon, etc.C-bugCategory: This is a bug.O-wasmTarget: WASM (WebAssembly), http://webassembly.org/T-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions