WebAssembly needs a better definition
Why the current definition could hurt WebAssembly adoption
I still remember my first encounter with WebAssembly a few years ago. Some called it a low-level bytecode for the web, others a sandboxed environment for execution, and others yet an instruction format for a stack-based virtual machine.
At the time, I had mostly done web development so I was quite puzzled by those definitions. In fact, here is actual footage of me hearing about WebAssembly for the first time:
The following quote about teaching new concepts perfectly captures why I felt that way:
“Most beginners aren’t in a place where thorough explanation is helpful — mostly just annoying.” — Lyzi Diamond
While technically correct, none of the official definitions made any sense to me. I found myself thinking “Ok….. but what is it though?”. It wasn’t until I deconstructed the definition word-for-word and read Lin Clark’s blog posts that it finally started to make sense.
And I’m sure I’m not the only one.
Part of the problem is that many definitions try to condense the complexity of WebAssembly into just a few sentences, and end up with something that only makes sense to those who already know what WebAssembly is!
Which is unfortunate, given that a key demographic for WebAssembly is web developers, many of whom — like myself — have been actively avoiding phrases like “stack-based virtual machine” ever since their undergraduate years.
What do we do about it?
Unfortunately, the current WebAssembly definition looks a little too much like what you’d find on Wikipedia:
WebAssembly (abbreviated Wasm) is a binary instruction format for a stack-based virtual machine. Wasm is designed as a portable target for compilation of high-level languages like C/C++/Rust, enabling deployment on the web for client and server applications — WebAssembly.org
While this definition contains a lot of technical words that describe WebAssembly, it still leaves beginners wondering: “No really, what is it?”, “What is it good for?”, and “How do I use it?”.
Let’s change that.
Is there a better alternative?
It would be helpful to feature two definitions on WebAssembly.org: one for folks who know what a stack-based virtual machine is (i.e. the current definition), and perhaps a more prominent one for newcomers—especially web developers—who just want to know whether it can be useful to them in their work.
In other words, a definition doesn’t have to be all-encompassing from the very first sentence for it to be both useful and correct. It’s okay to start simple, and build up in complexity as we welcome WebAssembly newcomers to the dark side 😉.
What do you think?
I’d love to hear your thoughts: What was your first encounter with WebAssembly like? Do you agree that WebAssembly needs a more welcoming definition? If so, what would that definition look like, and what do you think of my attempt above?
Thanks to Maria Nattestad and Aaron Turner for their feedback on this article.