(no title)
gmitscha | 4 years ago
This is a major step for WebAssembly which I've waited for a long time! Note that Chrome was the last major browser not supporting reference types, so soon we'll be able to use this on real websites: https://webassembly.org/roadmap/
The main contribution is that now arbitrary values can be passed between JS and Wasm modules. These will show up on the Wasm side as opaque `externref` types.
This allows (arbitrarily powerful) Wasm modules that only import JavaScript glue code instead of having to wrap their exports with JS functions. "Modules that import the functionality they need" is, IMO, a much saner model for creating an ecosystem of modules than "modules which are wrapped with functions specific to the functionality they need". I think this will lead to
* more transparent code (= closer correspondence between the code which is compiled to Wasm and the thing that actually runs in your browser)
* a standard interface between functions across the ecosystem => much more potential to just import and use Wasm modules written in other languages
* an easier way to ship only the minimal amount of JS glue code you need
No comments yet.