A good two years after starting the project, the team behind WebAssembly runtime Wasmer has released version 1.0 in a bid to offer production-ready performance to those looking to have a go at the containerisation approach.
Wasmer looks to provide a runtime for executing WebAssembly on the server and opening it up to a larger variety of use-cases like IoT devices or in desktop applications. It also promises to run WebAssembly “at near-native speed in a fully sandboxed environment”, similar to a Linux container, on “any platform and chipset”.
According to its developers, the release of Wasmer 1.0 signals full stability of the project’s new API and leaves the runtime “better, easier to use, and more stable than ever before”. Reworking the API was deemed necessary to future-proof the project. The current iteration follows the structures of the standard Wasm-C-API more closely and is meant to benefit those not too familiar with advanced WebAssembly concepts through better usability.
However the new API means users of older versions will have to learn about a couple of new calls and behaviours, since fundamental things like instantiating modules, accessing the environment, or the passing of host functions have changed quite a bit. Migration instructions and the reasoning behind the replacements can be found in the project’s documentation.
But it’s not just the new API that should help the project gather more supporters in years to come. Orienting itself towards IoT and edge computing use cases, the Wasmer team has also added support for ahead of time compilation. Like that it isn’t necessary to ship WebAssembly applications with Wasmer and all the compilers attached anymore, but there’s the option to run precompiled binaries on a headless Wasmer version instead. The latter only needs a “few hundred kilobytes” space, so it’s more suited to edge workloads.
To get a precompiled file, developers can use the new command wasmer compile which turns WebAssembly modules into object files compatible with the tool’s CLI or various language embeddings. It also includes a target option for cross-compilation, so that the Wasms can be run on architecture different from the one used for precompiling. This again comes in handy for IoT use-cases which often run on some sort of Arm machine.
In other infrastructure news, Wasmer 1.0 has been adjusted to work out of the box with compiler infrastructure LLVM, Cranelift, and Singlepass to provide a better user experience for different scenarios like development and production. The new version compiles functions in parallel, which the team claims could speed up the process up to 9 times. Wasmer also learned to work with different pluggable engines, and currently supports a native and a JIT variant.