Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon

Wasmer introduces WebAssembly Interfaces for validating the imports and exports of a Wasm module

Save for later
  • 2 min read
  • 18 Jul 2019

article-image

Yesterday, Syrus Akbary, the founder and CEO of Wasmer, introduced WebAssembly interfaces. It provides a convenient s-expression (symbolic expression) text format that can be used to validate the imports and exports of a Wasm module.

Why WebAssembly Interfaces are needed?


The Wasmer runtime initially supported only running Emscripten-generated modules and later on added support for other ABIs including WASI and Wascap. WebAssembly runtimes like Wasmer have to do a lot of checks before starting an instance. It does that to ensure a WebAssembly module is compliant with a certain Application Binary Interface (Emscripten or WASI). It checks whether the module imports and exports are what the runtime expects, namely the function signatures and global types match.

These checks are important for:

  • Making sure a module is going to work with a certain runtime.
  • Assuring a module is compatible with a certain ABI.
  • Creating a plugin ecosystem for any program that uses WebAssembly as part of its plugin system.
  • Unlock access to the largest independent learning library in Tech for FREE!
    Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
    Renews at €18.99/month. Cancel anytime


The team behind Wasmer introduced WebAssembly Interfaces to ease this process by providing a way to validate imports and exports are as expected. This is how a WebAssembly Interface for WASI looks like:

wasmer-introduces-webassembly-interfaces-for-validating-the-imports-and-exports-of-a-wasm-module-img-0

Source: Wasmer


WebAssembly Interfaces allow you to run various programs with each ABI, such as Nginx (Emscripten) and Cowsay (WASI). When used together with WAPM (WebAssembly Package Manager), you will also be able to make use of the entire WAPM ecosystem to create, verify, and distribute plugins. They have also proposed it as a standard for defining a specific set of imports and exports that a module must have, in a way that is statically analyzable.

Read the official announcement by Wasmer.

Fastly CTO Tyler McMullen on Lucet and the future of WebAssembly and Rust [Interview]

LLVM WebAssembly backend will soon become Emscripten’s default backend, V8 announces

Qt 5.13 releases with a fully-supported WebAssembly module, Chromium 73 support, and more