Mozilla, Microsoft and Google form WebAssembly, a new binary web format
Developers from Microsoft, Google and Mozilla are collaborating on a project known as WebAssembly, which aims to become a new intermediate representation for safe code on the Web.
Developers from WebKit are also along for the ride, but the announcement of a cooperation between the three major browser companies has attracted the biggest chunk of attention. The news has been sparking hopes that the end product will eventuate in cross-browser compatibility and adoption.
Behind the bytecode
Unveiled by Luke Wagner and Brendan Eich respectively, the new Web standard will define a “portable, size- and load-time-efficient format and execution model specifically designed to serve as a compilation target for the Web”. Wagner went on to state:
As reflected in the high-level goals, a central requirement for WebAssembly is that it integrate well with the rest of the Web platform and that the initial version run efficiently on current browsers using a client-side polyfill. As demonstrated, the polyfill can leverage asm.js to get great performance.
Mobile developers stand to reap massive rewards from such a performance boost, as the introduction of native decoding is “critical to providing a good cold-load user experience”.
This remains crucial even as JS and asm.js evolve to sprout shared memory threads and SIMD support. Examples of possible longer-term divergence: zero-cost exceptions, dynamic linking, call/cc. Yes, we are aiming to develop the Web’s polyglot-programming-language object-file format.
Wagner shares the “play nice with JS” philosophy, saying it was natural to view WebAssembly as “the next evolutionary step of asm.js”.
WebAssembly can be investigated further over on GitHub.