Most of us use WebAssembly as a compilation target, writing our code in Rust, C#, Go, or other languages, leaving it to the compiler to convert this into the underlying WebAssembly instruction set. However, writing WebAssembly ‘by hand’ is actually quite straightforward and can be rewarding.
If you’re interested in learning how to WebAssembly directly, via the WebAssembly Text Format (WAT), this looks like a very useful project, with many exercises for you to try out. As the author notes, the goal here is to “learn by doing”.
WebAssebly supports a great many languages, but there’s always room for more. Haskell? Why not!
Unix was built with a philosophy of “everything is a file”, which results in a common set of APIs, allowing the re-use and composability. This blog post and video draw some interesting comparisons between WebAssembly and one of the defining Unix philosophies.
NGINX Unit is a lightweight web app server, that can server static content, or dynamic applications through various language runtimes. The latest release of NGINX Unit adds WebAssembly as one of these runtimes. The fast start-up times and sandboxing make it a very natural fit for this application.
This blog post shares details of how to run WebAssemmbly modules. Notably the WASI-HTTP standard isn’t sufficiently mature for NGINX to adopt it, as a result, they’ve created their own APIs for exposing HTTP requests to wasm modules.
This talk, from PyCon 2023, gives a great intro to the history of WebAssembly and how it works in the browser. The talk is focussed on Python developers, with examples using CPython and Emscripten.