JavaScript creator Eich's latest project: KILL JAVASCRIPT

Someday you'll code for the web in any language, and it'll run at near-native speed

Brendan Eich, the former CEO of Mozilla, has announced a new project that could not only speed up web applications but could eventually see the end of JavaScript as the lingua franca of web development.

Dubbed WebAssembly, the new effort is a kind of successor to Asm.js, the stripped-down JavaScript dialect that backers describe as an "assembly language for the web." Like Asm.js, it executes via a JavaScript engine. The difference is that WebAssembly is a new, low-level binary format, like a bytecode, which allows it to load and run even faster than Asm.js.

The long-term goal, Eich said, is for WebAssembly to become a kind of binary object format for the web, one that can be used as a compiler target for all kinds of languages - including but not limited to JavaScript.

"Bottom line: with co-evolution of [JavaScript and WebAssembly], in a few years I believe all the top browsers will sport JS engines that have become truly polyglot virtual machines," Eich said in a Wednesday blog post.

WebAssembly has apparently been underway as a skunkworks project for some time and has already gained the support of developers at Google, Microsoft, and Mozilla, all three of which have previously built Asm.js optimizations into their respective browsers.

"I'm happy to report that we at Mozilla have started working with Chromium, Edge and WebKit engineers on creating a new standard, WebAssembly, that defines a portable, size- and load-time-efficient format and execution model specifically designed to serve as a compilation target for the Web," Mozilla developer Luke Wagner blogged.

Microsoft's Mike Holman was more subdued in his support for the project, saying Redmond and the other browser vendors have "come to a general agreement on a shared set of goals."

One of those goals is "interoperability with JavaScript." In keeping with that, one deliverable for the project is a "polyfill" that implements WebAssembly in JavaScript, so that today's browsers will be able to execute WebAssembly code once the spec is finalized - albeit with slightly degraded performance.

What's more, although WebAssembly is itself a binary format, the specification will include a text format that can be rendered when anyone does a View Source, preserving (at least in part) the openness of the web.

As far as language support, the initial focus will be on compiling C/C++ to WebAssembly. Once a viable backend for the LLVM compiler has been developed, work on other languages will commence – although you can expect that to be some way down the road.

Expect the concept itself to change radically from these early days, too. There isn't even a draft spec yet, although high-level design documents and prototype source code for compilers, the WebAssembly polyfill, and a modified version of Google's V8 JavaScript engine that can execute WebAssembly natively have already been posted to the project's GitHub page.

To oversee the project, a new WebAssembly Community Group has been formed under the auspices of the World Wide Web Consortium (W3G), and is open for anyone to join. There's also a FAQ that gives more details on the groups plans – such as they are for now. ®

Sponsored: Your Guide to Becoming Truly Data-Driven with Unrivalled Data Analytics Performance


More from The Register

Firefox Preview, a new browser for Android from Mozilla

Firefox Preview for Android: Mozilla has another go at a mobile browser

Firefox Focus frozen as Mozilla redirects Android effort ... despite small market share

Today in tortured tech analogies: Mozilla lets Firefox loose in the hen house, and by hen house, we mean the tracking cookie jar, er...

Remember when people didn't use browsers from the one of world's biggest adtech giants?
Image by elroyspelbos

DoH! Mozilla assures UK minister that DNS-over-HTTPS won't be default in Firefox for Britons

As Reg readers will know, you'll have to click a few buttons first
red fox. pic by Shutterstock

This Free software ain't free to make, pal, it's expensive: Mozilla to bankroll Firefox with paid-for premium extras

Browser will remain gratis, optional $$-per-month services to be offered later this year

Mozilla Firefox to begin slow rollout of DNS-over-HTTPS by default at the end of the month

To protect query privacy, browser maker will run everything through Cloudflare
Chrome vs. Firefox

Mozilla says Firefox won't defang ad blockers – unlike a certain ad-giant browser

Extensions still free to use uber-powerful webRequest API to filter crap out of webpages
Google, photo by lightpoet via Shutterstock

Mozilla returns crypto-signed website packaging spec to sender – yes, it's Google

Ad giant's site slurping tech complicates web security model, could give more power to search engines and social networks, Firefox maker warns
Well done, everyone

Finally. Thanks so much, nerds. Google, Apple, Mozilla end government* internet spying for good

* Terms and conditions apply. Offer not valid outside Kazakhstan. Your home may be repossessed if you do not keep up payments

Biting the hand that feeds IT © 1998–2019