WebAssembly (shortened to WASM) is supported by all major browsers. It is a binary file that runs on the web. The latter sentence is a huge understatement and disguises the true value and innovational strides made by WebAssembly.
But if we are able to write web code in Rust and C does that not open up some security concerns? Will I now have to worry about WebAssembly poking around in my file system? No. WebAssembly still runs in the browsers secure sandbox. So far we have trusted browsers with this responsibility. This is another benefit of WebAssembly. Lightweight sandboxing.
Wow this sounds like an awesome security benefit. Isn’t this something we need in our other apps. (foreshadowing much)
What I see as the most important aspect of what WebAssembly brings to the table has nothing to do with the Web. Languages such as C, Rust, C++, Pascal don’t require a runtime. They are compiled languages. They are compiled to a single binary file that can just be run. However, if you want to run it on Linux instead of Mac the binary have to be compiled twice, once for Mac and a second time for Linux. If you want to support all the popular systems out there you end up with a binary for each system architecture and a sizeable hole in your disk space.
With WebAssembly you just need one binary to rule them all.
Enter WASI. WASI is WebAssembly’s modular system interface. Simply put it’s a specification. Any system that implements WASI will be able to run WebAssembly.
One of the most exciting aspects of this is not only will we be able run native apps anywhere with native level performance (picture Photoshop running in the web) but we will be able to run all those with a lightweight secure sandbox. This is great news for security, we no longer have to trust the application developer not to delete all your files or set your browser homepage to Yahoo.
WebAssembly has a seriously bright future. We are currently only scratching the surface. I suggest you jump on this train as it certainly doesn’t feel like fad that will go away anytime soon.