WebAssembly – The next BIG thing!

Very soon, JavaScript would not be the lingua franca for the web. As some of the big players like Google, Microsoft, Mozilla, Apple etc along with W3C have teamed up to create a brand new standard called WebAssembly. The good thing, It will be supported by all browsers.

So, What WebAssembly stands for?
Officially, WebAssembly or wasm is a new portable, size- and load-time-efficient format suitable for compilation to the web. It is new binary format for web.

Why WebAssembly is needed?
JavaScript is robust and useful. Like any other language, it is not a suitable fit for solving all problems.

For many years, many companies were trying to fix up the shortcoming of JavaScript in their own ways by extending it such as asm.js(Mozilla), typescript(Microsoft), NACL(Google). Now these projects and companies have come together along with W3C to provide a solution called WebAssembly. With Emscripten, other languages can be compiled or transpiled to JavaScript but still JavaScript is the main target of these not VM. With WebAssembly, the need to transpile to JavaScript is removed but goes down low level of system equivalent to bytecode.

Web development is itself a challenging part where things are rapidly evolving and WebAssembly will be a new addition. With this we may see web used in lot of new application which is not possible in today’s scenario. WebAssembly will open more doors by freeing up from the shackles of today’s web.

Benefits of WebAssembly over JavaScript –

  1. Write performance critical code using other language like c/c++.
  2. WebAssembly can be natively decoded much faster than JavaScript can be parsed.
  3. It loads significantly faster in mobile devices.
  4. Sharing of code between applications.

Is this the end of JavaScript?
A BIG NO! JavaScript have enough inertia to drive the web for next decades. While WebAssembly will allow more languages to be compiled to web, JavaScript is here to stay. WebAssembly will boost JavaScript by complementing it, applications written in WebAssembly will also be able to integrate with JavaScript. The fact that JavaScript is giving enough competition to established back-end languages with Node.js, proves that JavaScript is still strong and will continue. Meanwhile it is best to stay with JavaScript and learn about it’s new features. JavaScript also have got new exciting features in the pipeline like pthreads, simd.

WebAssembly is still in its infancy. Only time could tell us how it will evolve. For some time being wasm and asm.js will stay equivalent to support polyfilling of wasm via JS. After that wasm and JS may diverge. To bring new standard into the web will be as tough as exciting it sounds. But the upside is that we now have an open, vendor-neutral, cross-browser, experience based standard, commitment and involvement to major open source implementation on the web.

My blog post

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :

Be the First to upvote.

Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.