📣 Pay attention to WebAssembly

SHETH.IO

WebAssembly feels like it is hitting an inflection point. When I first started writing this newsletter, most people were considering how and where this technology might be used on the web. However, in the last year, most of the articles I have been sharing around about out-of-browser WebAssembly; it’s use for ‘cloud functions’, as a plug-in model and various other standalone runtime applications.

As we hit this inflection point, we should ask ourselves where is this technology going in the long term?

This article does a great job of describing all of the interesting places where ebAssembly is having an impact, but goes even further, and looks to the future. the author makes some interesting and well-informed predictions. Here are just a few:

One potential outcome is that Docker will integrate a Wasm runtime. While plausible, I expect Wasm will be sufficiently differentiated to warrant a separate tooling entirely. Instead, the unification of Docker and Wasm containers will happen at the orchestration layer

We’ll probably see a new application architecture that takes advantage of WebAssembly’s unique capabilities.

While microservices have decomposed monolithic applications into several small independent services, WebAssembly makes it easier to decompose microservices into even smaller components

Now go away and read the article in full. Don’t come back here until you have done it!

How Prime Video updates its app for more than 8,000 device types

AMAZON.SCIENCE

Streaming services naturally want to embed their players into the widest range of consumer hardware as possible (computers, phones, tablets, set-top boxes, etc …). For Amazon Prime this means targeting 8,000 device types!

Amazon Prime have been using JavaScript within their player for a while now, it allows them to ship a thin device-specific layer, whilst having as much of the application as possible written as a portable JavaScript application. The team have been experimenting with shipping a WebAssembly runtime, running modules written in Rust, as an alternative - and as expected they have found this code is more compact and runs faster.

You might recall that I mentioned Disney using wasm in issue #157, and the BBC back in issue #145. Looks like WebAssembly is the future of video distribution too 😀

WebVM: server-less x86 virtual machines in the browser

MEDIUM.COM

If you want to port a ‘legacy’ C++ application to run within WebAssembly, you’ll likely use Emscripten to compile your code into a WebAssembly module, deploy that to the runtime and execute it. This makes sense, WebAssembly is just a different compilation target after-all. However, this isn’t the only way …

The team at Leaning Tech aim to run existing applications without modifications; without recompilation; and fully client-side, in other words, without re-compiling to a WebAssembly target. To achieve this they have created a Just In Time (JIT) x86 to WebAssembly compiler, and a whole host of other tech that provides the various APIs the application requires to run.

WebVM

The results. You can load up their WebVM and do things like compile Python or C++ code directly within your browser.

Containerless! How to Run WebAssembly Workloads on Kubernetes with Rust

OKTA.COM

You’ll likely have heard that you can run WebAssembly workloads on Kubernetes via Krustlet. This blog post gives a good practical guide.

WebAssembly feature detection

WEB.DEV

The initial release of WebAssembly was an MVP, it included a minimal featureset which was just enough for the earliest WebAssembly applications. Since then the team have added new features such as SIMD, threads, multi-value returns etc … This useful post outlines how to perform feature detection.

And finally …

Is this WebAssembly running on a BBC Micro?!