Open
Description
Version: Deno 1.41.3
Reproduction: https://github.com/kylebarron/wasm-bindgen-deno-test
This exports a simple function panic_async
. If you call this with await wasm.panic_async();
,
the future never resolves and the REPL hangs forever:

Note that if you call the function without await
then you do get an Uncaught RuntimeError
> wasm.panic_async();
Promise { <pending> }
Uncaught RuntimeError: unreachable
at <anonymous> (file:///Users/kyle/tmp/wasm-bindgen-deno-test/wasm-bindgen-deno-test/pkg/wasm_bindgen_deno_test_bg.wasm:1:10804)
at <anonymous> (file:///Users/kyle/tmp/wasm-bindgen-deno-test/wasm-bindgen-deno-test/pkg/wasm_bindgen_deno_test_bg.wasm:1:16086)
at <anonymous> (file:///Users/kyle/tmp/wasm-bindgen-deno-test/wasm-bindgen-deno-test/pkg/wasm_bindgen_deno_test_bg.wasm:1:12546)
at <anonymous> (file:///Users/kyle/tmp/wasm-bindgen-deno-test/wasm-bindgen-deno-test/pkg/wasm_bindgen_deno_test_bg.wasm:1:8885)
at <anonymous> (file:///Users/kyle/tmp/wasm-bindgen-deno-test/wasm-bindgen-deno-test/pkg/wasm_bindgen_deno_test_bg.wasm:1:16497)
at __wbg_adapter_16 (file:///Users/kyle/tmp/wasm-bindgen-deno-test/wasm-bindgen-deno-test/pkg/wasm_bindgen_deno_test.js:81:10)
at real (file:///Users/kyle/tmp/wasm-bindgen-deno-test/wasm-bindgen-deno-test/pkg/wasm_bindgen_deno_test.js:66:20)
at ext:core/01_core.js:303:9
at eventLoopTick (ext:core/01_core.js:169:7)
So I assume what's happening here is that constructing the future errors and then there's nothing to await
, or something like that.
For contrast, running this in Node crashes the process:

To reproduce:
wasm-pack build --target web
Then inside Deno:
const wasm = await import("./pkg/wasm_bindgen_deno_test.js");
let _ = await wasm.default();
await wasm.panic_async();
Activity