Wasmer is a runtime that enables super lightweight containers based on WebAssembly to run anywhere: from Desktop to the Cloud and IoT devices, and also embedded in numerous programming language.
This document is also available in: 🇨🇳 中 文 -Chinese, 🇪🇸 Español-Spanish, 🇫🇷 Français-French, 🇯🇵 日本 語 -Japanese.
-
Fast & Safe. Wasmer runs WebAssembly at near-native speed in a fully sandboxed environment.
-
Pluggable. To best suit your needs, Wasmer supports different compilation strategies (aka the compilers — based on LLVM, based on Cranelift, or Singlepass) and artifact strategies (aka the engines — Universal, Dylib, Staticlib).
-
Universal. You can run Wasmer in any platform (Linux, macOS and Windows) and chipset.
-
Standards compliant. The runtime passes official WebAssembly test suite supporting WASI and Emscripten.
The quickest way to get fun with Wasmer is to install its CLI. It ships with no dependency. Let's first start by installing it, then let's see how to execute a WebAssembly file.
Wasmer can be installed from various package managers, scripts, or built from sources… Pick what is best for you:
-
With
curl
curl https://get.wasmer.io -sSfL | sh
-
With PowerShell
iwr https://win.wasmer.io -useb | iex
-
With Homebrew
brew install wasmer
-
With Scoop
scopp install wasmer
-
With Chocolatey
choco install wasmer
-
With Cargo
The following command will install
wasmer-cli
. All the available features are described in thewasmer-cli
documentation.cargo install wasmer-cli
-
From source
Inside the root of this repository (in this case, you're likely to need some dependencies):
make build-wasmer
-
More installation options? See the
wasmer-install
repository to learn more!
After installing Wasmer you should be ready to execute your first WebAssembly file! 🎉
You can start by running
QuickJS, which is a small and
embeddable Javascript engine, compiled as a WebAssembly module,
qjs.wasm
:
$ wasmer qjs.wasm
QuickJS - Type "\h" for help
qjs > const i = 1 + 2;
qjs > console.log("hello " + i);
hello 3
📦 Wasmer runtime can be used as a library embedded in different languages, so you can use WebAssembly anywhere.
Language | Package | Docs | |
---|---|---|---|
Rust | wasmer Rust crate |
Docs | |
C/C++ | wasmer.h headers |
Docs | |
C# | WasmerSharp NuGet package |
Docs | |
D | wasmer Dub package |
Docs | |
Python | wasmer PyPI package |
Docs | |
Javascript | @wasmerio NPM packages |
Docs | |
Go | wasmer Go package |
Docs | |
PHP | wasm PECL package |
Docs | |
Ruby | wasmer Ruby Gem |
Docs | |
Java | wasmer/wasmer-jni Bintray package |
Docs | |
Elixir | wasmex hex package |
Docs | |
R | no published package | Docs | |
Postgres | no published package | Docs | |
Swift | no published package | ||
Zig | no published package |
We welcome any form of contribution, especially from new members of our community 💜
You can check how to build the Wasmer runtime in our awesome docs!
Test you want? The Wasmer docs will show you how.
Wasmer has an amazing community of developers and contributors. Welcome, please join us! 👋