Holding the promise of faster web applications, the WebAssembly portable code format is moving beyond its initial implementation, with its backers at the World Wide Web Consortium, ready to fit WebAssembly with more language accommodations and performance improvements.
Browser vendors back WebAssembly
Support for WebAssembly in browsers is critical. And all four major browser vendors—Apple, Google, Microsoft, and Mozilla—have been on board with WebAssembly.
There is now broad agreement within the W3C WebAssembly group on the initial version’s draft, said Luke Wagner, a Mozilla engineer on the WebAssembly team. WebAssembly reached MVP (minimum viable product) status in March. Implementations are shipping in the Firefox and Chrome browsers. Microsoft supports the WebAssembly MVP with the Insider program’s beta builds of Edge without a flag. The browser engine in Apple’s Safari, WebKit, provided a full implementation of WebAssembly in June.
Already, a 3D library called Dracohas been released by Google that uses WebAssembly. Used for compressing and decompressing 3D geometric meshes and clouds, Draco features a WebAssembly decoder for better performance.
WebAssembly will gain more language support
It is technically possible now to use other languages with WebAssembly, and there have been experimental implementations to work with the format. However, these languages cannot currently achieve the ideal performance, memory utilization, or DOM integration, Wagner said.
As a result, WebAssembly will likely be enhanced to support languages using higher level garbage collection, such as Java, C#, and Python. “We’ve been discussing adding direct support for WebAssemby in a way that plugs into the garbage collector that’s already in the browser,” Wagner said. This could enable a new wave of applications using WebAssembly. But it could take a couple years to accomplish this.
Managed languages such as Java require extra additions to WebAssembly that are being worked on, said Alex Komoroske, group product manager for the web platform at Google.
Other enhancements being considered for WebAssembly include:
- Shared memory and multithreading. This is probably the top request from C++ users, Wagner said. A proposal is making the rounds and is be finalized by 2018.
- Internal optimizations among browsers
- Exception handling and SIMD capabilities, to enable compiled code to run faster.