We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Using js_sys::Float32Array::view causes wasm-bindgen cli command to fail with error:
js_sys::Float32Array::view
error: import of `__wbg_buffer_49131c283a06686f` doesn't have an adapter listed
when compiling in release mode.
use wasm_bindgen::prelude::*; #[wasm_bindgen] pub fn start() { unsafe { js_sys::Float32Array::view(&[0.0f32]); } }
[package] name = "wasmbug" version = "0.1.0" edition = "2018" [dependencies] wasm-bindgen = "0.2.68" js-sys = "0.3.45" [lib] crate-type=["cdylib"]
Then with rust 1.48 on linux
> cargo build --target wasm32-unknown-unknown --release ... > cd target/wasm32-unknown-unknown/release > wasm-bindgen --version wasm-bindgen 0.2.68 > wasm-bindgen --target web --no-typescript --out-dir . wasmbug.wasm error: import of `__wbg_buffer_49131c283a06686f` doesn't have an adapter listed
Avoiding use of js_sys::Float32Array::view prevents the problem from occurring
Edit: only happens in release mode
The text was updated successfully, but these errors were encountered:
Had RUSTFLAGS="-C target-cpu=native" in my environment which caused the issue.
RUSTFLAGS="-C target-cpu=native"
Sorry, something went wrong.
No branches or pull requests
Describe the Bug
Using
js_sys::Float32Array::view
causes wasm-bindgen cli command to fail with error:when compiling in release mode.
Steps to Reproduce
src/main.rs
cargo.toml
Then with rust 1.48 on linux
Additional Context
Avoiding use of
js_sys::Float32Array::view
prevents the problem from occurringEdit: only happens in release mode
The text was updated successfully, but these errors were encountered: