design
design copied to clipboard
Synchronous compilation
I'm currently porting a library to Wasm and it's users rely on synchronous instantiation. The goal is that users can just embed the library in a script
tag and directly use it afterwards just as it's original in javascript.
With WebAssembly.Module
I get:
WebAssembly.Compile is disallowed on the main thread, if the buffer size is larger than 4KB...
Is there any synchronous alternative? The current module's buffer weights 97kb
including -O3
.