-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Library crashes when compiled to WASM with atomics
flag enabled
#10
Comments
mrDIMAS
added a commit
that referenced
this issue
Sep 12, 2024
Could you please try the fix? I checked it with the following commands and it seems to work fine cd wasm-examples
rustup default nightly
RUSTFLAGS="-Ctarget-feature=+atomics,+bulk-memory,+mutable-globals" wasm-pack build . --target=web -- -Z build-std=panic_abort,std
basic-http-server |
Works perfectly, thank you for the very quick fix, much appreciated! |
Cool, I'll submit a new version on crates.io then. |
I've published |
Many thanks! I owe you a beverage :D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When compiled to WASM with
atomics
flag (which flutter rust bridge enables) the library crashes due toThis error is exactly the same as documented in
cpal
: RustAudio/cpal#656Fixed here: https://github.com/RustAudio/cpal/pull/837/files
Basically with this flag the generated WASM code uses
SharedArrayBuffer
, but thecopyToChannel
only allowsFloat32Array
.See also the related ticket on
wasm-bindgen
: rustwasm/wasm-bindgen#3772The text was updated successfully, but these errors were encountered: