Skip to main content

Google, Microsoft, Mozilla And Others Team Up To Launch WebAssembly, A New Binary Format For The Web


Google, Microsoft, Mozilla and the engineers on the WebKit project today announced that they have teamed up to launch WebAssembly, a new binary format for compiling applications for the web.
The web thrives on standards and, for better or worse, JavaScript is its programming language. Over the years, however, we’ve seen more and more efforts that allow developers to work around some of the limitations of JavaScript by building compilers that transpile code in other languages to JavaScript. Some of these projects focus on adding new features to the language (like Microsoft’s TypeScript) or speeding up JavaScript (like Mozilla’s asm.jsproject). Now, many of these projects are starting to come together in the form of WebAssmbly.
The new format is meant to allow programmers to compile their code for the browser (currently the focus is on C/C++, with other languages to follow), where it is then executed inside the JavaScript engine. Instead of having to parse the full code, though, which can often take quite a while (especially on mobile), WebAssembly can be decoded significantly faster
The idea is that WebAssembly will provide developers with a single compilation target for the web that will, eventually, become a web standard that’s implemented in all browsers.
By default, JavaScript files are simple text files that are downloaded from the server and then parsed and compiled by the JavaScript engine in the browser. The WebAssembly team decided to go with a binary format because that code can be compressed even more than the standard JavaScript text files and because it’s much faster for the engine to decode the binary format (up to 23x faster in the current prototype) than parsing asm.js code, for example.
Mozilla’s asm.js has long aimed to bring near-native speeds to the web. Google’s Native Client project for running native code in the browser had similar aims, but got relatively little traction. It looks like WebAssemly may be able to bring the best of these projects to the browser now.
As a first step, the WebAssembly team aims to offer about the same functionality as asm.js (and developers will be able to use the same Emscripten tool for Web Assembly as they use for compiling asm.js code today).
In this early stage, the team also plans to launch a so-called polyfill library that will translate WebAssembly code into JavaScript so that it can run in any browser — even those without native WebAssembly support (that’s obviously a bit absurd, but that last step won’t be needed once browsers can run this code natively). Over time then, the teams will build more tools (compilers, debuggers, etc.) and add support for more languages (Rust, Go and C#, for example).
As JavaScript inventor (and short-term Mozilla CEO) Brendan Eich points out today, once the main browsers support the new format natively, JavaScript and WebAssembly will be able to diverge again.
The team notes that the idea here is not to replace JavaScript, by the way, but to allow many more languages to be compiled for the Web. Indeed, chances are that both JavaScript and WebAssembly will be used side-by-side and some parts of the application may use WebAssembly modules (animation, visualization, compression, etc.), while the user interface will still be mostly written in JavaScript, for example.
It’s not often that we see all the major browser vendors work together on a project like this, so this is definitely something worth watching in the months and years ahead.

Comments

Popular posts from this blog

SoftBank Lands $236M From Alibaba And Foxconn To Bring Its Pepper Robot To The World

Remember Pepper,  the intelligent robot that SoftBank unveiled last year ? Pepper goes on sale in Japan this coming weekend, but in advance of that launch  SoftBank has revealed  that Alibaba and manufacturer Foxconn have invested $118 million each in its robotics division. That deal will give Alibaba and Foxconn 20 percent shares in SoftBank Robotics Holdings (known as SBRH), with SoftBank retaining a dominant 60 percent stake. “SoftBank, Alibaba and Foxconn will build a structure to bring Pepper and other robotics businesses to global markets, and cooperate with the aim of spreading and developing the robotics industry on a worldwide scale,” SoftBank said in its announcement. SoftBank isn’t short on money, of course — it is building up quite a portfolio of e-commerce investments across Asia — but its two partners bring know-how, strategy and global networks to the table. So, it looks like Pepper has eventual world domination plans. Or, at least, ...

LeafLink Raises $750K To Become Salesforce For The Cannabis Industry

LeafLink , an NY-based wholesale management platform for the cannabis industry, has closed a $750k seed round led by group of NY angel investors. The software platform is designed to support participants in a B2B supply chain, providing basic tools designed to save money for retailers and allow producers to get better pricing for their product. These tools will include a centralized location to view correspondence between buyers and suppliers, inventory and order tracking tools, and a portal to discover new products and services so users can source leads and close deals from within the platform. Founders Ryan Smith and Zach Silverman explained that they “believe cannabis regulation and distribution is moving toward mimicking the alcohol industry with regional distributors and nonsensical supply chain participants”. By focusing on creating a supply chain similar to the alcohol industry, the company hopes to eventually be the universally accepted way for buyer...

Apple to release new small phone before iPhone 7

Apple to release new small phone before iPhone 7 Apple is to create a smaller, cheap version of the iPhone, persistent to the 4 inch size of the iPhone 5. Apple is testing 5 different iPhone 7 models. It will sell next to Apple’s existing phones however mark the first time that Apple has ready a latest phone smaller than the one it locate on sale before. There will be the choice of 2 or three colours likely the  gold, space grey  and silver options that mainly Apple products now coming up. Other than inside there will be very much better components. The flagship improve will be the addition of the A9 chip that powers the iPhone 6S. There may also be a number of changes to the outside. The most able to be seen is apt to be the addition of the somewhat curved edges that are found on the iPhone 6 and 6S. careinfo.in Apple  dropped the iPhone 5C previous this year. A number of hoped that it would be replaced by a 6C, though reports at the time made clear that we...