WebAssembly: A Universal Binary and Text Format for the Web
Mozilla, Google, Microsoft and Apple have decided to develop a binary format for the web. Called WebAssembly, this format could be a compilation target for any programming language, enabling applications to run in the browser or other agents.
A couple of years ago, we discussed here on InfoQ the merits of a universal bytecode for the web (see Debate: Do We Need a Universal Web Bytecode?), outlining the difficulties in creating one. The main problem mentioned was the disagreement between the major browser makers: Mozilla was pushing asm.js, Google was behind PNaCl, Apple was working on FLTJIT, while Microsoft were not showing interest in any of them. But that has changed. All four major browser vendors have agreed on creating WebAssembly or WASM/wasm, a binary format for the web. Some call this a bytecode, but wasm is not a bytecode in the traditional sense, as Brendan Eich noted: “And WebAssembly is indeed a compressed AST encoding, not a stack bytecode. Shhh, don't tell anyone. You can still call it bytecode if you like.”
A first temporary step in implementing WebAssembly has been made: translating the format into corresponding asm.js code so it can already run on supporting browsers: Firefox, Edge, Chrome. There is already a polyfill prototype built for this purpose, and initial results show that the gzipped binary format is 20-30% smaller than the corresponding gzipped asm.js, and that wasm decoding is about 23× faster than parsing the corresponding asm.js source. WASM will later be natively supported by the browser’ VM.
WebAssembly will benefit from lessons learned developing asm.js and PNaCl, since the respective teams from Mozilla and Google are involved in creating it. Having Microsoft and Apple supporting it is very promising for the project. The only problem remaining is time: usually projects developed by multiple large corporations take a lot of time. The standardization process is slow in such cases.
the most common sense initiative
So ActionScript and Applets all over again?