What is WebAssembly?


The Language of the Web

Javascript has been the most commonly used language over the last 5 years and its popularity is growing. Javascript was originally created for designers in about 10 days way back in 1996 as a compliment to HTML, allowing for a bit of interactivity, but not meant for the responsibilities it has today. The basis for modern day javascript was released in 1999, long before people could even conceive of it’s usefulness. Check out this video about the Life and Death of Javascript (1995–2035).


Open Source Resurgence of Javascript

JavaScript is powerful enough to solve most problems people have on the Web today but falls short for more intensive use cases like 3D games, Virtual and Augmented Reality, image/video editing, and a number of other domains that demand native performance.

This is where frameworks, compilers, engines, and other solutions to make a program web compatible come in to play but these solutions have lead to features that do not fit the Javascript language or ideology. Open source communities and projects led to expansion of javascript’s capabilities as needed.

  • Engine (translation) — a program or interpreter that takes Javascript code and optimizes/converts it, basically it “implements a version of ECMAScript, of which JavaScript is a dialect”.
  • Compiler (transformation) — takes the source code written in one language and transforms it to another target language (list of language that compile to javascript ).

AJAX was introduced in 2005 and with it came the ability for web apps that heavily utilized Javascript to load data in the background without the need for a full page refresh.

JQuery (2006) simplifies Javascript so much so that a developer doesn’t really need a working knowledge of javascript to utilize. Used to traverse and manipulate the DOM, work with event handlers, and in the creation of animations.

Node.js was introduced by Ryan Dahl in 2009, it created server side capabilities for Javascript allowing developers to utilize a single programming language to build a web application, rather than relying on a different languages for creating their server side and client side scripts. An example of this is AirBnB, their site, launched in 2013, being the first to utilize isomorphic Javascript, with the back-end and front-end sharing the same code.

High-Level Language vs. Assembly Language

Javascript is a high-level language. A high-level language allows programers to write programs that are independent of the machine, they are closer to human languages and further from machine languages. Assembly languages are considered low-level because they are very close to machine languages.

Each type of machine has it’s language and it’s assembly language. Programmers can still use assembly language when speed is essential or when they need to perform an operation that isn’t possible in a high-level language.

Is Javascript the web’s assembly language?

Javascript is high-level so transforming something to Javascript still requires bringing it back down, so speed is an issue. Parsing, Compiling, and Executing scripts are things a JavaScript engine spends significant time in during start-up, time spent in Parse/Compile can often be 2–5x longer on phones than on a desktop.

Asm.js is an example of an extraordinarily optimizable, low-level subset of JavaScript (not a new language) which makes the process faster, but it still runs in the browser so its performance is greatly dependent on the browser and hardware and leaves much to be desired.


What is WebAssembly?

WebAssembly is intended to be the web’s assembly language. It is not going to replace Javascript but rather work with it, expanding on the concepts of Asm.js. It will be faster to parse than Asm.js because the kind of binary format being considered for WebAssembly will be natively decoded much faster than JavaScript can be parsed (experiments show more than 20× faster), while also having a design that allows (though does not require) a browser to implement WebAssembly inside its existing JavaScript engine, so a browser will no longer exclusively run Javascript, it will also run WebAssembly.

The current focus for the MVP (Minimum Viable Product) has been on C/C++ but ultimately WebAssembly will give us an alternative compile target — One specifically designed for that purpose and where Javascript is not an ideal or appropriate solution. Not only does this make the web more inclusive of our programming languages but it can be a base foundation for the creation of a new language, one that isn’t whipped up in 10 days in the 90s, one that can take into account all of today’s programming needs.



about 1 year ago

Hi, Ashlee Crusco-san. Thank you for writing your first article. I am looking forward to sharing your knowledge.


Boostlog is an online community for developers
who want to share ideas and grow each other.

Delete an article

Deleted articles are gone forever. Are you sure?