Awesome FOSS Logo
Discover awesome open source software
Launched 🚀🧑‍🚀

WebAssembly, and the rise of transpilation


Recently (a few weeks ago?) WebAssembly was annouced.

I glossed over the announcement the first time I saw it, but after a few weeks and some time to digest (along with being distracted by other things, like starting a new job, and being funemployed), this story has landed on my doorstep again. This time through, however, The words are jumping off the page and it finally makes great sense to me.

To over-editorialize: The web is going back to basics, so it can be built up again, more flexibly this time.

Up until now, if you’ve wanted to add interesting functionality, you’ve used javascript to do it. There are some languages that have rammed themselves into the JS browser runtime (clojurescript, pyjs, and many others), but that’s been sort of a hack. A hack well known as “transpiling”.

A super colloquial/subjective/possibly incorrect definition of transpiling:

Converting code in one programming language to another, with the goal of increasing portability or modifying (usually attempting to improve) the programming experience on a given platform (i.e. if you’re nuts about Python, you might want to use it where you might be forced to use Javascript, hence pyjs).

Fast forward to now, and we’ve got this proposal to do something truly amazing (obvious?) — to echo the system/levels of hierarchy that native software uses, and produce a browser-equivalent. This means that now, instead of browsers requiring strictly *javascript*, they can require any valid *wasm*, with minimal hacks from you. This model is already extremely familiar — see assembly and just about every other native programming language (C, Java, C#, Python). It’s just how stuff works.

Sometime in the near future, all the people who hate JS can just stop using it, and write/port their own languages to outputting wasm. Also, I’m sure before long (or even before it comes out), someone throw LLVM compatibility into the mix. This is also awesome because whether people like it or not, the web is the largest, most global software platform/distribution system that’s ever existed (up until now).

The group that’s working on this is somewhat of a synergy fever-dream: key devs from Mozilla, Google, and Microsoft have all gotten together with Brendan Eich and they seem to be going full steam ahead.

The web is about to get even more awesome.