Web assembly looks like the next best thing in web technologies. Even though the first release happened fairly recently, namely in early 2017, there were rumors and anticipation long ago. With a quick google searching, I found this HackerNews article, almost 3 years ago, for example.
So what is all the hype about WebAssembly? As with all new (and promising) technologies, there is information overload in the air, I made a compact FAQ to help you get up to speed with this new kid in the town
Without further ado, let’s start:
What is web assembly?
Javascript is not the best choice when you want to do things fast and every pico-second counts(hello parallelism). If you have managed to make a javascript application which is resource hoggy like real-time video editing, let me know:)
WebAssembly’s first motivation was speed, as it promises to achieve a near-native performance of the language the binary is written to.
The binary of what?
As mentioned, javascript is not proud of its extreme performance metrics. But other languages like C++ or Rust, are. Web assembly can load the executable of any of the supported languages and execute it in the browser, with near-native performance. Awesome, right? Would you like to see your favorite game, being played in the browser one day, with whatever pros this might have? This day might be closer than you might think. Of course, that means that the relevant libraries(yes, Unity as well) can be ported to WebAssembly.
For completeness sake, here is the complete list of supported languages.
Awesome, will this thingy kill javascript?
Quoting the FAQ of the official repository
No! WebAssembly is designed to be a complement to, not a replacement of, JavaScript. While WebAssembly will, over time, allow many languages to be compiled to the Web, JavaScript has an incredible amount of momentum and will remain the single, privileged (as described above) dynamic language of the Web.
Great, can’t wait to use it. Could you please give me an example?
Thank you for being so polite. :) You can find an example in the last section of the article.
When will it be released?
I can answer in two words. ALREADY THERE. Please check the roadmap for more information.
What if my browser is not supported?
All the major browsers support at this very moment(78.64% of the users at the time of writing this). If you are one of the 22% that is not in the club, I am afraid I have not read something related to this case. You may have to switch browsers.
Oh, I have heard something about Blazor.Net recently and it looks very similar. What’s the case?
Blazor is a recently released framework from Microsoft and allows you to do full stack development with C#, with the precious help of WebAssembly. As Microsoft claims, at the time this article was written, the framework is not ready to be used on production apps, but it looks like a great Node.js competitor.
How will node.js be affected, by the WASM rise?
We cannot be sure at this very moment, but here are my thoughts.
As mentioned in the Blazor point above, it looks like Node.js will start having some serious competition. I don’t mean to say that there are no great web frameworks out there. There are tons of them. But until now, only javascript can be used both at the backend and the frontend of a web application. For reasons that are out of the scope of this article, this is considered a great benefit. And competition can usually make us better.
Conclusion
Thank you for taking the time to read this article. I hope that I provided a clean and clear primer on WebAssembly, that lay the groundwork just fine.
Below are some sites to visit, if you want to enhance your knowledge to this technology
Originally published at perigk.github.io.
Top comments (0)