The Christmas season brings with it the annual Advent of Code, a fun and popular coding challenge. For the first time, I decided to join the game, and of course opted for WebAssembly. I toyed with the idea of writing WAT by hand, but instead opted for the more practical AssemblyScript + WASI.
It has certainly proven a useful exercise, two days in and I’ve already unearthed a couple of bugs, both of which were fixed within hours. Kudos to the teams behind these open source projects.
In-browser transcoding of video files with FFmpeg and WebAssembly
After seeing the release of FFmpeg.wasm a few weeks ago I was keen to give it a go. In this blog post I demonstrate the creation of a simple client-side transcoder that streams data into a video element, with a bit of RxJS thrown in for good measure.
The FFmpeg.wasm API is interesting, you interact with a command-line tool via a virtual file-system. It feels a little like interacting with a Docker container.
Lunatic is a platform for building actor systems that use WebAssembly instances as actors, another innovative project that capitalises on WebAssembly’s isolation model, giving a much more lightweight runtime than Docker or other VM-style approaches.
The project was heavily inspired by Erlang actor model, as described in a blog post that outlines the motivations behind this project. It’s also worth reading the recent post Writing Rust the Elixir way, from the project’s author.
Apple Vs The Web
This blog post isn’t strictly about WebAssembly, but tells an interesting story nonetheless. Apple is a company that likes to be in control, from hardware, through software, they like to own the full ecosystem. This is both a blessing, giving users a user experience of unparalleled quality; and a curse, giving Apple an unhealthy amount of control which it wields for its own benefit.
WebAssembly Summit 2021
WebAssembly Summit, the first conference dedicated to WebAssembly, is back in 2021 - in April-ish! Given the present environment, this event will be virtual, which means anyone can attend. The conference is taking talk submissions, why not watch last year’s talks for inspiration?
I must admit, I’m not entirely sure what this is - but it starts with a ‘K’ so must be something to do with Kubernetes!
The project description confirms this …
A Kubernetes dynamic admission controller that uses WebAssembly policies to validate incoming requests