3 ms·
Could we combine ASM.js and "native web libraries?" (see https://github.com/samsquire/ideas#51-native-web-libraries https://github.com/samsquire/ideas#51-native
by samsquire 13y ago
Could we combine ASM.js and "native web libraries?" (see https://github.com/samsquire/ideas#51-native-web-libraries https://github.com/samsquire/ideas#51-native-web-libraries)
Compile some non-Javascript code.
Create a package containing the native code.
Serve ASM.js and the native web library.
This package is then installed in the browser and the browser switches to it when it detects code that is about to be used that matches the installed web library signature.
If the browser supports native web libraries, it uses that.
Otherwise it falls back to ASM.js.
Either way, we gain performance and we can compile code natively AND to ASM.js.