Three main browsers added support for low-level WebAssembly binary format
Google, Microsoft and Mozilla this week synchronously released experimental browser builds with support for WebAssembly (wasm), an effective low-level programming language running in a browser with a performance much higher than that of the most modern and high-speed JavaScript compilers.
Mozilla developer Luke Wagner talked about the advantages of WebAssembly on Mozilla Hacks , and also reported on porting the sci-fi shooter Angry Bots to WebAssembly. The demo runs in browsers with WebAssembly support - these are the latest versions of Chrome Canary , Firefox Nightly and Microsoft Edge . Safari will join them soon on WebKit .
AngryBots demo on WebAssembly in Microsoft Edge browser :
')
WebAssembly is a new format for native web applications. It supports all the functionality of a subset of JavaScript asm.js , which itself had to eliminate the negative impact of frameworks and interpreters on performance, so that application instructions are executed at the lowest possible level.
WebAssembly is not designed to replace JavaScript, but to supplement it, while simultaneously giving more general programs direct access to processor instruction sets — without the overhead of garbage collection, among other things.
Luke Wagner emphasizes that Wasm applications have access to Web APIs and are tightly integrated with JavaScript, including allowing calls between WebAssembly and JavaScript. Unlike classic models, it allows WebAssembly to more easily integrate into applications and JavaScript libraries, as asm.js did.
The W3C Web Assembly Group was formed last year, with the leading participation of Google, Microsoft, Apple and Mozilla, joined by another 540 individuals and organizations.
Joint development is carried out within the framework of the GithHub Organization WebAssembly project on the github.
In his own announcement of WebAssembly support in the Microsoft Edge browser, Chakra project manager Limin Zhu noted that the WebAssembly code is processed in the same way as the asm.js code, while the demo version of AngryBots runs much faster because the WebAssembly binaries have a smaller size compared to asm.js and parse faster than pure javascript in the case of asm.js.
The developers of the V8 JavaScript Engine also announced a collaboration with the W3C Web Assembly Group:
“Two upcoming changes will especially help web developers. The standard text representation of WebAssembly allows you to view the source code of a WebAssembly binary like any other script or resource. In addition, the current Wasm placeholder will be redone to provide a more complete idiomatic set of methods and properties to illustrate and analyze WebAssembly modules from JavaScript.