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

Error with simd_wasm64 feature #1

Closed
Titaniumtown opened this issue Aug 9, 2022 · 6 comments
Closed

Error with simd_wasm64 feature #1

Titaniumtown opened this issue Aug 9, 2022 · 6 comments

Comments

@Titaniumtown
Copy link

I tried using this in my wasm project and I get the following error:

error[E0658]: use of unstable library feature 'simd_wasm64'
  --> /home/simon/.cargo/git/checkouts/lol_alloc-22b2a73873fe6f0a/ecf5399/lol_alloc/src/lib.rs:1:1
   |
1  | / #![no_std]
2  | |
3  | | #[cfg(test)]
4  | | #[macro_use]
...  |
35 | |     fn memory_grow(&self, delta: PageCount) -> PageCount {
36 | |         PageCount(core::arch::wasm::memory_grow(0, delta.0))
   | |_______________________________________________^
   |
   = note: see issue #90599 <https://github.com/rust-lang/rust/issues/90599> for more information
   = help: add `#![feature(simd_wasm64)]` to the crate attributes to enable
@Titaniumtown Titaniumtown changed the title simd_wasm64 feature Error with simd_wasm64 feature Aug 9, 2022
@Craig-Macomber
Copy link
Owner

Odd. What version of rust are you using? I'm using 1.62.0.

What target are you using? I only tested with wasm32-unknown-unknown. Are you using the tier 3 wasm64-unknown-unknown target?

@Titaniumtown
Copy link
Author

cargo build --release --target wasm32-unknown-unknown I am compiling for wasm32, and I'm using the latest nightly build as I need those features.

@Craig-Macomber
Copy link
Owner

I have no idea why calling core::arch::wasm::memory_grow claims to need #![feature(simd_wasm64)]. I'm on stable (and thus can even use such features) and it works fine.

Looks like core::arch::wasm is documented as marked with needing simd_wasm64: https://doc.rust-lang.org/core/arch/wasm/index.html

Maybe this is a recent regression on nightly?

@Craig-Macomber
Copy link
Owner

I have published a new version that should work around this issue.

@Craig-Macomber
Copy link
Owner

Looks like core::arch::wasm::memory_grow working at on on stable was a rustc bug, and its just an alias for core::arch::wasm32::memory_grow so my change is a good fix.

The readme is now more clear about just supporting wasm32 as well. I'm going to consider this resolved, but feel free to re-open if its not fixed for you in 0.1.2

@Titaniumtown
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants