Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking Issue for std::arch::wasm64 #90599

Open
Amanieu opened this issue Nov 5, 2021 · 5 comments
Open

Tracking Issue for std::arch::wasm64 #90599

Amanieu opened this issue Nov 5, 2021 · 5 comments
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@Amanieu
Copy link
Member

Amanieu commented Nov 5, 2021

Feature gate: #![feature(simd_wasm64)]

This is a tracking issue for std::arch::wasm64 and std::arch::wasm modules, both of which are currently aliases for std::arch::wasm32.

@Amanieu Amanieu added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC labels Nov 5, 2021
Amanieu added a commit to Amanieu/stdarch that referenced this issue Nov 5, 2021
@devsnek
Copy link
Contributor

devsnek commented Nov 5, 2021

technically this is more than just simd

@Amanieu Amanieu changed the title Tracking Issue for wasm64 SIMD Tracking Issue for std::arch::wasm64 Nov 5, 2021
@Craig-Macomber
Copy link
Contributor

As far as I can tell, the change to make core::arch::wasm unstable was a breaking change (Broke my new project for a nightly user: Craig-Macomber/lol_alloc#1 ) with a really confusing error (Why should using core::arch::wasm require truing on simd_wasm64 to access memory_grow for nightly users when it used to work fine on stable? How is that feature even relevant?).

I think we should consider renaming that feature, and/or not disabling the entire core::arch::wasm module with it (as that prevents people from writing wasm target agnostic memory allocators since they can't use core::arch::wasm::memory_grow).

@Amanieu
Copy link
Member Author

Amanieu commented Aug 9, 2022

core::arch::wasm has always been unstable since it was introduced in 1.58: https://doc.rust-lang.org/1.58.0/src/core/up/up/stdarch/crates/core_arch/src/mod.rs.html#182-185

@Craig-Macomber
Copy link
Contributor

Thats odd. I get no issues using it in

stable-x86_64-unknown-linux-gnu (default)
rustc 1.62.1 (e092d0b6b 2022-07-16)

with --target wasm32-unknown-unknown.

Maybe there was a bug in marking of aliased paths unstable?

I do get the error if I do use core::arch::wasm; but not if I do use core::arch::wasm::memory_grow;

So it seems like we have three issues:

  1. The error is bad: this has nothing to do with simd or wasm64:
error[E0658]: use of unstable library feature 'simd_wasm64'
  --> lol_alloc/src/lib.rs:33:5
   |
33 | use core::arch::wasm;
   |     ^^^^^^^^^^^^^^^^
  1. In some versions of rust, including at least 1.60.0 and 1.60.1, its possible to import children of unstable items without a stability warning: this likely only applies to aliased modules. Apparently this changes (is fixed) in later versions (on nightly). I have not confirmed this change myself.

  2. core::arch::wasm::memory_grow works on current stable rust (though it shouldn't), and it does not work on some future version, which is a unintended API breaking change for something that appeared stable.

@Amanieu
Copy link
Member Author

Amanieu commented Aug 9, 2022

I believe the stricter checking of stability was introduced by #95956.

Can you open a separate issue for this? This issue is for tracking the stabilization of the wasm64 intrinsics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants