How do I instanciate multiple wasm modules generated using wasm-bindgen?
We’re using --target web
, which generates a js wrapper code, which exports an “init” function using export default
.
The first line of that init
function is:
if (wasm !== undefined) return wasm;
If wasm
is undefined, it will instanciate the wasm module, then set wasm = wasm.exports
, which it appears to return.
If I’d like to start fresh, how would I do that, while keeping the convenient wrapper code?