Wasmer 3.0 revamps API, memory management

Server-side WebAssembly runtime also simplifies the way engines work, supports running WAPM packages from the CLI, and supports creating native executables for any platform.

command line
Thinkstock

Version 3.0 of the Wasmer server-side runtime for WebAssembly (Wasm) has just been released, with improved API and memory management and the ability to run WAPM (WebAssembly Package Manager) packages directly.

Launched November 23, open source Wasmer 3.0 features a Rust API that has been rebuilt. With this new API and memory management style, developers can safely store Wasm objects in the Store. Wasmer 3.0 also introduces a new MemoryView and brings wasmer-js, which runs Wasmer in the browser with wasmer-bindgen, to feature parity with wasmer-sys, which runs Wasmer natively. A beefed up wasmer run command now allows any package published to wapm.io to be run directly from the Wasmer CLI.

Wasmer is positioned as a fast, secure WebAssembly runtime that enables lightweight Wasm containers to run on the desktop, in the cloud, at the edge, and on IoT devices. Wasmer is accessible via the following command:

curl https://get.wasmer.io -sSfL | sh

The project has published instructions for migrating from Wasmer 2x to Wasmer 3.0. Other changes featured in Wasmer 3.0 include:

  • The Wasmer API overall has been made more safe and ergonomic.
  • The various Wasmer engines including dylib, universal, and others have been simplified into one, to better enable code reuse.
  • The create-exe subcommand has been revamped. Wasmer now can turn a WebAssembly file into a native Windows, Linux, or macOS executable. This enables distribution of executables to users without them having to install Wasmer themselves.
  • Startup performance has been improved through use of the rykv framework, for zero-copy deserialization of build artifacts.
  • Single-pass compiler improvements include support for multi-value functions, added support for exception handling frames, and performance improvements.
  • For the Wasmer WASI (WebAssembly System Interface) implementation, multiple bugs have been fixed. The file system and inner types have been reworked with WebAssembly interfaces.

Copyright © 2022 IDG Communications, Inc.