BT

WebAssembly Preview Functionality Arrives in Browsers

by David Iffland on Mar 16, 2016 |

In a coordinated announcement, Microsoft, Google, and Mozilla each published a blog post showing off WebAssembly functionality in their respective browsers.

This collaboration represents an essential step in standardizing the WebAssembly binary format. The work that each vendor has done allows them to have a better conversation about the format and how to move forward.

The vendors' WebAssembly work builds on their asm.js implementations. Like asm.js, WebAssembly offers a "memory-safe, sandboxed execution environment". Unlike asm.js, an equivalent WebAssembly binary is much smaller, and eliminates the need to parse JavaScript. The browsers can natively parse the binary representation much faster. In his Fluent 2016 Conference Keynote, Brendan Eich described it as "safe, quick, self-verifying code that can do things that JavaScript can't. At some point, WebAssembly becomes the safe, native format for the web."

On Google's V8 announcement, Seth Thompson says that:

the WebAssembly implementation in V8 is designed to reuse much of the existing JavaScript virtual machine infrastructure, specifically the TurboFan compiler. The decoder produces a TurboFan graph which is processed by various optimization passes and finally turned into machine code by the same backend which generates machine code for optimized JavaScript and asm.js.

From the Mozilla camp, Luke Wagner, Chair of the WebAssembly W3C Community Group says:

Within Firefox, we refactored our existing asm.js optimization pipeline to use WebAssembly’s binary format as the representation of asm.js code sent from the main parsing thread to the background compiler threads.

A demo WebAssembly app is available at http://webassembly.github.io/demo/; below, a video of the game play inside Edge:

To enable the experimental features:

  • In Chrome: Using Chrome Canary 51.0.2677.0 or higher, turn on the chrome://flags#enable-webassembly flag
  • In Firefox: using the latest nightly build, set the javascript.options.wasm to true

Edge support for WebAssembly is currently only available in an Microsoft internal build and WebKit's implementation is still in development.

Rate this Article

Relevance
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss
General Feedback
Bugs
Advertising
Editorial
Marketing
InfoQ.com and all content copyright © 2006-2016 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT

We notice you’re using an ad blocker

We understand why you use ad blockers. However to keep InfoQ free we need your support. InfoQ will not provide your data to third parties without individual opt-in consent. We only work with advertisers relevant to our readers. Please consider whitelisting us.