From c6e16b0285baf535dab15d693d236fe308ba1ef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Sj=C3=B8rup?= Date: Wed, 31 Jan 2024 15:02:00 +0100 Subject: [PATCH] WebAssembly.Instance needs to be called as a constructor (#364) --- crates/js-component-bindgen/src/transpile_bindgen.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/js-component-bindgen/src/transpile_bindgen.rs b/crates/js-component-bindgen/src/transpile_bindgen.rs index 2201f7c1b..566e9c2d5 100644 --- a/crates/js-component-bindgen/src/transpile_bindgen.rs +++ b/crates/js-component-bindgen/src/transpile_bindgen.rs @@ -248,7 +248,7 @@ impl<'a> JsBindgen<'a> { output, "\ {} - export function instantiate(getCoreModule, imports, instantiateCore = WebAssembly.Instance) {{ + export function instantiate(getCoreModule, imports, instantiateCore = (module, importObject) => new WebAssembly.Instance(module, importObject)) {{ {} ", &js_intrinsics as &str,