You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WebAudio wasm build fails with wasm-bindgen panic=unwind closures #1394
With Rust panic=unwind and current wasm-bindgen (0.2.129), cpal 0.18.2 fails to compile for wasm32-unknown-unknown in src/host/webaudio/mod.rs at Closure::wrap(Box::new(move || { ... })). The boxed callback type Box<dyn FnMut()> does not implement wasm-bindgen's MaybeUnwindSafe bound.
The callback is owned by the WebAudio host and does not cross Rust threads. Would you consider this change, or another supported closure construction, in cpal?
Update: our browser build no longer uses panic=unwind for Rust. Stable Rust with panic=abort compiles the full web dependency graph, and the Lua callback/pcall wasm reproducer passes with Lua exceptions compiled as C++ wasm EH. The cpal change is therefore not required for our build. The report still applies to projects that choose panic=unwind; we removed our local cpal patch.
Activity
Quat3rnion commentedon Oct 8, 2026
Update: our browser build no longer uses panic=unwind for Rust. Stable Rust with panic=abort compiles the full web dependency graph, and the Lua callback/pcall wasm reproducer passes with Lua exceptions compiled as C++ wasm EH. The cpal change is therefore not required for our build. The report still applies to projects that choose panic=unwind; we removed our local cpal patch.