If you are an ambitious person, you will realize that reaching your goals not always implies reaching happiness but sometimes quite the opposite… but why is that?

As an ambitious person myself I used to be driven by a strategy that I believe is also common in people with the same trait:

Imagine where you would like to end and draw a mental map of how to get there

However, over time I realized that this strategy is not the optimal if we intend to maintain a happy life while attempting to reach our goals.

Here’s my story:

I was…

Wasmer 1.0 is now generally available

  • Runtime and compiler performance is out of this world.
  • New features include better error handling, a more powerful API, cross-compilation, headless Wasmer and so much more!

It’s been two years since we published the first line of Wasmer code, the first server-side WebAssembly (Wasm) runtime able to run Nginx server-side.
We believe that WebAssembly will be a crucial component for the future of software execution and containerization (not only inside the browser but also outside).

By leveraging Wasm for software containerization, we create universal binaries that work anywhere without modification, including operating systems like Linux, macOS, Windows, and also web…

In the latest version of Wasmer, 0.16, you might have noticed that we are shipping a new binary: wax.

wax is a tool intended to ease the use of command-line WebAssembly applications on your system. Similarly to wapm, that allows the installation and usage of packages and commands, wax enables use of CLI tools without installing them globally or changing your PATH.

The best thing about wax is that you will always run the commands on their latest version without having to handle updates, and because commands are not anywhere in your globals, you don’t have to worry about pollution…

We started Wasmer with the mission of making programs universally available by leveraging on WebAssembly (Wasm). By enabling the use cases of Wasm outside of the browser we aim to unleash its full power: becoming the lingua franca for running software safely and at native speeds.

Linux and macOS were the first platforms we started supporting for executing Wasm server-side (since Unix support was the easiest to start with), to then add support for Windows just a few months after the initial launch.

Similarly, we focused first on running Wasmer in x86_64 chipset machines, as it was the most popular…

At Wasmer we have been porting a lot of C and C++ projects to WebAssembly and WASI, as we believe WebAssembly will emerge as the standard way to use third-party code from any programming language securely and easily.

WebAssembly System Interfaces (WASI) is an exciting new specification that allows running POSIX-like applications anywhere, safely and securely with WebAssembly.

We realized that compiling already existing C/C++ projects to WASI was much more challenging than we expected. This is because of two main reasons:

  1. It’s not trivial to install and use the WASI SDK
  2. It’s quite hard to port existing projects to…

WebAssembly Interfaces permit static checks on Modules to make sure they stay compliant over time

WebAssembly Interfaces represented as a “cookie cutter”

Wasmer is completely focused on running WebAssembly modules server-side.

We started by running Emscripten-generated modules, but over time we added support for other ABIs (WASI, Wascap, etc).

You can run various programs with each ABI, such as Nginx (Emscripten) and Cowsay (WASI)

Over time we realized that the runtime had to do a lot of checks before starting an instance to verify that the WebAssembly module was compliant with a certain ABI (Emscripten or WASI). That means checking that the module imports and exports are what the runtime expects (namely the function signatures and global types match).

It turns out…

Two weeks ago we released the first version of WAPM (the WebAssembly Package Manager) and since then we got a lot of insight and traction from the community.

One of the features people asked about the most, both on Hacker News and on our internal forums was to be able to install and use packages globally… what a great idea!

So we worked to make it possible in the latest version of Wasmer:

wapm install -g lua  # The -g flag indicates a global install

And… you can run lua anywhere!

wapm run lua

However …could we go one step…

Today, we are releasing a new tool that will help you use WebAssembly anywhere: WAPM (aka WebAssembly Package Manager).

This release includes:

  • A command line application: wapm, included when you install Wasmer
  • A website and package registry: wapm.io

Why: while working on Wasmer, we discovered that the developer ergonomics needed to improve significantly for WebAssembly to be accessible by the general audience. We realized that a Package Manager will help solve common problems like publishing, defining module ABIs, distributing executable binaries and using them.

What: WebAssembly is an abstraction on top of chipset instructions, this enables wasm modules to run…

How we abstracted our API to be independent of the IR, allowing Wasmer to support multiple compiler backends.

Originally, the Wasmer runtime was designed around Cranelift, a compiler framework written in Rust.

Wasmer old API

Over time, we realized that different user-cases needed different compiler characteristics, so we’ve expanded our backend repertoire.

We now support selecting multiple compiler backends while exposing the same, familiar, simple API to the user.

Why would you want multiple compiler backends? Each backend offers a different tradeoff between compilation speed and runtime performance.

We’ve been working steadily to get Wasmer to execute WebAssembly modules on the server-side as fast as possible.

TL;DR — We got 100x improvement on startup time on Wasmer 0.2.0

Before getting into details, it’s essential to understand how Wasmer works under the hood to see what could be improved.

How WebAssembly runtimes work

When a user executes a WebAssembly file with Wasmer, the following happens:

  1. Parsing: Wasmer parses the wasm file, assuring its validity according to the spec.
  2. Function compilation: the function bodies defined in WebAssembly bytecode are compiled to machine code via a compiler framework (Cranelift, LLVM, …), so they can be…

Syrus Akbary

Entrepreneur. Developer. Mathematician

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store