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
error: failed to generate bindings for import of `__wbindgen_placeholder__::__wbindgen_closure_wrapper28`
Caused by:
no function table found in module
Error: Running the wasm-bindgen CLI
Caused by: failed to execute `wasm-bindgen`: exited with exit code: 1
Steps to Reproduce
Use the following code in lib.rs, which the compiler says is correct:
use wasm_bindgen::prelude::*;use wasm_bindgen::JsCast;use web_sys::console::{log_1, profile_0, profile_end_0};use web_sys::window;#[wasm_bindgen(start)]pubfnrun(){let win = window().expect("no global `window` exists");profile_0();log_1(&"Hello from Rust!".into());let cb = Closure::wrap(Box::new(profile_end_0)asBox<dynFn()>);
win.set_timeout_with_callback_and_timeout_and_arguments_0(cb.as_ref().unchecked_ref(),5).expect("could not set timeout");
cb.forget();}
Try to compile by running wasm-pack build with any combination of options.
Expected Behavior
Compile and run without issue.
Actual Behavior
Receive the error message:
error: failed to generate bindings for import of `__wbindgen_placeholder__::__wbindgen_closure_wrapper28`
Caused by:
no function table found in module
Error: Running the wasm-bindgen CLI
Caused by: failed to execute `wasm-bindgen`: exited with exit code: 1
Additional Context
I'm using wasm-bindgen 0.2.58 and web-sys 0.3.35.
The text was updated successfully, but these errors were encountered:
The main gc pass of unused items in wasm-bindgen was accidentally
removing the function table because we weren't properly rooting it in
the auxiliary section which has a few ways that imports can reference
the function table via intrinsics and closures.
Closesrustwasm#1967
The main gc pass of unused items in wasm-bindgen was accidentally
removing the function table because we weren't properly rooting it in
the auxiliary section which has a few ways that imports can reference
the function table via intrinsics and closures.
Closes#1967
Describe the Bug
Could not compile due to error:
Steps to Reproduce
Use the following code in
lib.rs
, which the compiler says is correct:Try to compile by running
wasm-pack build
with any combination of options.Expected Behavior
Compile and run without issue.
Actual Behavior
Receive the error message:
Additional Context
I'm using wasm-bindgen 0.2.58 and web-sys 0.3.35.
The text was updated successfully, but these errors were encountered: