Skip to content

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

Closed

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

Activity

  1. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jun 21, 2024
  2. wooden-worm commented on Jun 21, 2024

    @wooden-worm
    ContributorAuthor

    There's another similar problem with building for wasm64 using target-feature=+simd128: portable-simd only supports wasm32

  3. workingjubilee commented on Jun 21, 2024

    @workingjubilee
    Member

    that sounds about right as a fix. feel free to PR it!

  4. added
    O-wasmTarget: WASM (WebAssembly), http://webassembly.org/
    T-libsRelevant to the library team, which will review and decide on the PR/issue.
    A-target-featureArea: Enabling/disabling target features like AVX, Neon, etc.
    and removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jun 23, 2024
  5. added a commit that references this issue on Jul 1, 2024
  6. added a commit that references this issue on Jul 4, 2024
  7. added a commit that references this issue on Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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