Let us understand WebAssembly!

Image result for webassembly

When it comes to web development, we see the technology stack to run websites is more or less limited to predominantly JavaScript, PHP, or just plain CSS and HTML. People having their apps and services running on C, C++ and other low level languages tend to not take advantage of concept of Webapps whereby their apps could natively on browser.

All this became possible with the introduction of WebAssembly, which I will try to elaborately explain. For part time web developers, web assembly excites them the most due to the underlying reason that they don’t need to learn another language like JavaScript or PHP to get started.

What is Web Assembly?

In simple words, it is essentially the ability to run native speed bytecode inside browsers. So the way we can think of this is – we take a native C program and you compile into a bytecode written for the WASM virtual machine. WASM is nothing but – Web Assembly State Machine and this WASM virtual machine is very small, lightweight, portable and compatible with all major browsers.

Meaning instead of using JS for everything frontend for a lot of heavily looped programs you can now compile C/ C++ programs and get loops running in native speed and thus it is so beneficial for many types of applications.

Remember WASM is not a JS replacement, it’s just an another option for us to do web development. In fact they will grow together side by side.

One of the most popular tools is “emscripten”. This is used to convert C/ C++ code to WASM which was used to convert the popular AutoCAD and brought it to web browser which is a 30 year old C codebase!!

You can learn more about WebAssembly by going through their GitHub repos:

https://github.com/WebAssembly

So when are you compiling your first WebAssembly code?

Happy Coding!

Leave a comment

A WordPress.com Website.

Up ↑

Design a site like this with WordPress.com
Get started