ADVERTISEMENT
ADVERTISEMENT

Google, Mozilla, Microsoft and others team up to launch new binary format for the web

The new format is meant to allow programmers to compile their code for the browser where it is then executed inside the JavaScript engine.

Lines of code used in JavaScript.

Reports reveal that 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.

Over the years, there has been 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.js project). Now, many of these projects are coming 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. Rather than having to parse the full code, though, which can often take quite a while (especially on mobile), WebAssembly can be decoded significantly faster.

ADVERTISEMENT

Sources say the aim 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. Sources reveal that 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.

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.

JOIN OUR PULSE COMMUNITY!

Unblock notifications in browser settings.
ADVERTISEMENT

Eyewitness? Submit your stories now via social or:

Email: eyewitness@pulse.com.gh

ADVERTISEMENT