WebAssembly — What’s the big deal ?
I have been hearing a lot about WebAssembly lately. In order to satisfy my curiosity I started digging deeper about it. And so, here I am giving quick overview about WebAssembly.
What is WebAssembly ?
“WebAssembly is a new type of code that can be run in modern web browsers and provides new features and major gains in performance.” — Mozilla developers network.
Where does WebAssembly come in this picture ?
Why do we need it ?
As mentioned above, Wasm modules are in the same sandbox as JS. Then, why do we need WebAssembly at all. Although I mentioned it in theory, WebAssembly comes with features that will change how you have built web applications till now. Here are the major ones:
- Compilation target for various other high-level languages. Ever imagined that you would be able to build web application with C/C++/C# or RUST ? Surprise!!!!! Now you can compile all of these languages into wasm. Think about the various applications you were never able to run in browser because the underlying language is not supported. This is also means, all those haters of JS will now be able to work together with JS builders. We are getting a pool of resources :)
- Supported by browsers without any plugins. Major browsers are supporting wasm already! You dont have to install any plugin to get going with it.
- Can run on Mobile Devices. Wasm also can run in WASM runtime apart from JS runtime. Devices like Android or IOS can easily provision this runtime and that would give wasm modules access to the APIs available.
- Performance boost. Using WebAssembly gives applications a performance boost which we never has before from JS. This actually comes from the usage of features in high level languages like C/C++ etc.
- Video/audio editing tools
- Video/audio streaming tools
- Video/Audio calling
- Virtual/Augmented reality
- Artificial Intelligence
June 2015 — The group made a public announcement that they are working on a new standard called WebAssembly.
March 2016 — The community posted the definition of core features and standards that would be in WebAssembly. Some of the browsers have implemented these features as experiments.
October 2016 — A Minimal Viable Product was announced for the community to try out. This was supported by all major browsers.
January 2017 — A logo was choosen.So far all of the work is done by the community and everything is open in github.
March 2017 — Major browsers like chrome, Edge, Firefox and Webkit reached consensus about a minimal viable product. At this stage the community decided they needed more implementation experience and significant usage in order to help move forward with further design.This marked the end of the preview period for the browsers.
September 2017 — Safari also started support for WebAssembly.
February 2018 — W3C released for draft specification for WebAssembly. This contain standards for developing WebAssembly.
- https://webassembly.org/ — The official WebAssembly website
- https://developer.mozilla.org/en-US/docs/WebAssembly — Developer documentation
- http://www.wasmrocks.com/ — Tutorials and articles