-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emit WebAssembly by default instead of asm.js #6168
Comments
Yeah I think we should do this, for the reasons you said. Agreed that there's no need to block on the wasm backend by default transition. |
AIUI threads/atomic operations are not currently available in wasm, so would we default to wasm unless "-s USE_PTHREADS" is specified, or would it better to have to specifically state asmjs in this case (and have an error thrown if you don't)? Edit: specifically specify ... huh! :-) |
Sorry, just seen https://github.com/kripken/emscripten/wiki/Pthreads-with-WebAssembly. So, probably not a problem - I imagine it'll be in release versions (of browsers) by the time this lands (though possibly still behind a flag) |
According to https://caniuse.com/#feat=wasm, 69% of browsers, mobile and desktop combined, support WebAssembly. Most of the incompatibility is in mobile browsers. I have no comment on which default is better. |
Agreed. We should do that more often in general too. I'll wrote a doc for discussion, #6174.
Those two PRs appear to be still open - @juj, can you please make it a priority to resolve things there? Otherwise, though,
Yeah, and the same for SIMD - those two features are in JS (perhaps behind a flag due to Spectre...) but not in wasm yet. I don't think we should wait on that, but we should document and warn in the compiler about this (and then people can emit JS instead of wasm if they want those).
Thanks for the stat, good to have a concrete number. When doing this we should definitely document that. |
PR for this: #6419 |
This issue can be closed now. |
Yes, thanks @DesWurstes! |
Now that all major browsers support wasm, and wasm output has been pretty stable for a while, maybe it's a good time to change the default output from asm.js to wasm?
Benefits:
Stuff to think about:
The text was updated successfully, but these errors were encountered: