Mozilla developer Luke Wagner aggregated the various browser announcements at Mozilla Hacks today, and announced also the availability of a WebAssembly port of Unity’s Angry Bots sci-fi shooter, which can now be played on WA-enabled versions of Chrome, Firefox and Microsoft Edge – with Apple’s WebKit-based Safari browser soon to follow. Microsoft posted a YouTube Video (embedded below) of Angry Bots running on the Chakra rendering engine via WebAssembly in Edge:
(Important: the links to browser downloads above are to experimental and unstable builds. Please don’t download them unless you know what you’re doing.)
The W3C Web Assembly Group was formed last year, with lead participants Google, Microsoft, Apple and Mozilla leading a concerted effort of over 540 other individuals and organisations.
Close to the machine
No code runs faster than machine code, since it corresponds directly to and addresses instructions at a hardware level on the processor, executing directly from the CPU. However it is painful to write and more painful yet to edit, as its files read out as straight binary code – zeroes and ones. Assembly code is text-based and human-readable, with near-native correlation to machine instructions. But a great deal of the code we use – native as well as web programs – relies instead on interpreters, libraries or other intercedents, either at the OS level or via third-party technologies, with concomitant delays varying from lag to outright processing bottlenecks.
The benefit of getting program performance closer to the level of machine code or assembly code performance is the lack of obstructing middle-entities, and many projects have been undertaken, usually as browser plugins, to attempt to make web-content performance ‘code-native’.
Luke Wagner emphasises in his post that WebAssembly has come to unite and not divide:
* My first choice was Firefox Nightly Build, but for some insane reason the developers still let its app ID conflict with standard RTM releases, making it impossible to run your standard Firefox and the Nightly Build at the same time.