There’s a lot of excitement for WebAssembly’s (WASM) potential on the web. WASM is designed to compile to a highly efficient bytecode format that executes in a VM at near native speed. This provides web developers with a new language to build with and seek out large performance improvements for CPU heavy tasks like browser-based games. Also exciting, languages are increasingly supporting the ability to compile directly to WASM modules. Some languages like Rust already have fantastic support for compiling to WASM, but compiling to WASM is possible for many languages with varying levels of production readiness.

However, the backend applications of WASM are equally, if not more, exciting. It's true that WASM was designed with the web and browsers in mind, but there's no reason that running WASM has to be limited to the runtimes that ship with browsers. There are several projects like wasmer or wasmtime that have written runtimes in many popular programming languages, allowing you to execute WASM in your enviroment of choice. This brings benefits beyond speed to WASM. You could imagine writing reusable WASM modules for any logic that might be shared across your frontend and backend.

Code reuse isn't the only benefit of introducing WASM to the backend. Sometimes we building products that require high amounts of configuration from customers. With sufficient complexity, we may build until we essentially end up defining our own domain specific language for customers to interact with. This is a great time to consider WASM. Executing logic provided by a customer comes with all sorts of concerns like keeping it properly sandboxed and preventing it from consuming too many resources. These are concerns that a WASM runtime may solve.

To find real-world examples of this, we can look to Fastly and Cloudflare who both now offer WASM as an option for edge computation. There is also some interest in supporting WASM to run decentralized apps on blockchains like Ethereum.

Lastly, there's one final project worth mentioning called WASI (WebAssemby System Inteface) which aims to create a standard system interface for running WASM outside of the web. The co-founder of Docker has even commented on its potential impact.