Introducing wax: a WebAssembly package runner

Syrus Akbary
Wasmer
Published in
2 min readMar 11, 2020

--

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 in the long term.

Note: the wax tool is greatly inspired by npx. NPM did great work on the developer experience for Node.js and we wanted to bring that same experience to the WebAssembly ecosystem.

Extra: easily use any WebAssembly runtime!

We’ve begun updating wapm to be less reliant on Wasmer-specific features by default and have introduced an environment variable WAPM_RUNTIME to easily configure the WebAssembly runtime that wapm will use.

Now, you can also use wasmer-js, wasm3 or any other WASI runtime with wapm and wax 🎉

Creating new commands

Do you want to create a new command for wax ?

The process is simple: just upload a new package to wapm.io with the desired command. It will become automatically available for everyone! 🎉

Here you can find some instructions into how to publish a package into wapm:
https://docs.wasmer.io/ecosystem/wapm/publishing-your-package

Want to try it yourself?

Install the latest version of Wasmer!

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

Note: Windows users can download the Wasmer binary here

And try using quickjs (or cowsay, wasm2wat, python, jq…)

$ wax quickjs
QuickJS - Type "\h" for help
qjs >

Hope you enjoy this release as much as we enjoyed working on it!

Happy hacking!

--

--