-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
Description
Currently Chrome and Firefox are rolling out wasm MVP support, but it will be some months before other browsers go through their release train and get wasm out to users. Until wasm is ubiquitous emscripten users will probably want to build both asm.js and wasm versions of their code. There are a couple of possible ways to do this today.
- Use the
native-wasm,asm.js
binaryen method. This isn't well tested and in any case won't really work now because wasm module loading needs to be asynchronous. - Do 2 separate builds (and generate 2 different sets of JS glue) and load one or the other based on feature testing.
Would it be possible to support both synchronous and async loading from the same generated JS glue? If so, would there be significant drawbacks (e.g. code size?). Otherwise, what can we do to make option 2 easier?
ringoz, EliSnow and yieme