Understand WebAssembly in 5 Minutes
jesuisundev.com
jesuisundev.com
It's also interesting to note projects like AssemblyScript which open WASM to a Typescript subset. Very cool work they are doing.
When WASM first appeared, I had deep misgivings. I was picturing a dystopia of unmaintainable bytecode springing up everywhere and the WAT format as a hand-wavy dismissal of those concerns. Credit where credit is due, though, the W3C groups working on this are doing a great job and WAT is actually not terrible to read (or even write, if you have an afternoon to burn and want to take it on just to learn a thing or two about WASM - look for the wabt compiler).
I'm pleased to say I've finally uncovered the incantations to interface with a .wasm binary easily, but I was surprised how much digging it required, even with something as hyped as this. Perhaps I should write my own article on my findings.
Declaring the function as `extern "C"` would turn the symbol name into "add", or maybe "_add". I suspect the author extracted the name from compiler-generated assembly or from a tool to list the symbols a .wasm exports.
Of course you should be able to create really complex algorithms and do really advanced inlining to achieve near native performance. While also working across all platforms that run Chrome/Edge/Safari/Firefox.
I think the question I have is, Figma is one product I know that really takes full advantage of WebAssembly as a full experience. 1Password does another that uses the Chrome extension for it. Would Figma's success have been the same if they had just foregone the hassle of building in WASM and went pure native desktop?
I think Figma’s success can be at least partially attributed to being a web app with good performance. Sharing designs with a URL is a lot quicker than sharing files and importing them into a native desktop app which all users would first need to install. Figma made collaborating on design easier and more accessible than ever.