2 ms·
When new features are added to WASM, how does it all get deployed and how does it fit in with existing browsers and such? Do compilers avoid using the new patte
by chrismorgan 7y ago
When new features are added to WASM, how does it all get deployed and how does it fit in with existing browsers and such? Do compilers avoid using the new pattern unless you say to, put in both and do some kind of runtime feature detection for which they’ll use, or something else altogether?
- azakai 7y agoWhen ready, browsers simply enable new features. Until then, it's usually behind a flag you can test with. Compilers generally require flags to enable features. There hasn't been a post-MVP feature that has widespread enough adoption that it would make sense for us to enable it by default. For developers, the best thing is to make separate builds with the sets of features you want, and pick the right build using something like wasm-feature-detect https://github.com/GoogleChromeLabs/wasm-feature-detect https://github.com/GoogleChromeLabs/wasm-feature-detect There is some discussion on something like "fat binaries" which would contain multiple builds and pick between them, https://github.com/WebAssembly/feature-detection https://github.com/WebAssembly/feature-detection