Version 3.0 of Wasmer, an open source runtime for running WebAssembly on a server, is available. It brings simplification in the operation of engines

The Wasmer development team released version 3.0 of the WebAssembly server-side runtime (Wasm) capable of running Nginx on November 23rd. Today we are very excited to release Wasmer 3.0, after three months of work since our first alpha,” said Syrus Akbary, Founder and CEO of Wasmer.

Akbary and his team are united in a company of the same name, Wasmer, and believe that the raison d’être of their Wasmer tool is that WebAssembly is on its way to becoming an indispensable tool in development.

WebAssembly (Wasm) is a binary instruction format for a stack-based virtual machine. Wasm is designed as a portable build target for programming languages, allowing web-based deployment for client and server applications. Wasmer is an open source runtime for running WebAssembly on the server. According to Akbary’s explanation, it allows the use of super lightweight containers based on WebAssembly that can run anywhere: from the desktop to cloud and IoT devices, and also integrated into any programming language.

We believe that WebAssembly will be crucial for the future of running and containerizing software (not only inside the browser, but also outside it), explained Akbary, justifying the utility of his tool. According to him, by leveraging Wasm for software containerization, he and his team are creating universal binaries that can run anywhere without any modification, including on operating systems such as Linux, macOS, Windows, and also in web browsers.

Here are the new features of version 3.0 Wasmer below:

wasmer is now able to run WAPM packages directly via wash run

It is now possible to pass any package published on to wasmer cli. For example, wasmer run python/python will directly download and run the python package from the package registry.

API and memory management

Wasmer’s Rust API has been rebuilt from the ground up. Thanks to the new API and new style of memory management, Wasmer objects can now be safely stored in the Store.

Store instructions are used to store a number in memory. For integers, it is also possible to store a wide-type number as a narrower number in memory, for example, to store a 32-bit number in an 8-bit slot (i32.store8). If the number does not fit into the narrowest number type, it will be wrapped.

In a programming context, the term wrapping refers to programs or code that literally wrap other program components. One of the major changes in version 3.0 is that the Store now owns all WebAssembly objects; so exports like Memory are simply handles to the actual memory object in the Store. To read/write such a value, we will always need a Store reference.

A new MemoryView (JS-like) has also been introduced and wasmer-js (which runs Wasmer in the browser with wasm-bindgen) has been upgraded to the same level of functionality as wasmer-sys (which runs Wasmer natively).

Enabling multiple values ​​in the singlepass compiler

The singlepass compiler has received further improvements:

  • support for multi-valued functions;
  • improved compiler stability;
  • added support for exception handling frameworks.

Simplified engines

Akbary’s team has simplified the operation of the engines. Now only one engine is needed (although the engine may use different objects to load/store the code).

Akbary had simplified all the engines into one to allow easier code reuse. Wasmer previously used the concept of different engines: dylib, universal and more.

Support for creating executables for any platform

The subcommand create-exe of Wasmer has been revamped allowing Wasmer to turn a WebAssembly file into a native Windows, Linux, or Mac OS executable. This makes it possible to distribute executable files to users without having to install Wasmer themselves. This feature is implemented on top of Zig’s interleaving capabilities.

Source: Wasmer

And you?

What do you think of Wasmer?

What improvement are you interested in in version 3.0?

What are your expectations for such a runtime?

See also:

The WebAssembly 2022 Development Status Report reveals that Rust is the most used and requested language, and web applications are the top use case

Wasmer: an open source runtime for running WebAssembly on a server, while supporting the Wasm-C API

Leave a Comment