12 releases (6 breaking)
✓ Uses Rust 2018 edition
|0.8.0||Oct 2, 2019|
|0.7.0||Sep 12, 2019|
|0.6.0||Aug 1, 2019|
|0.5.7||Jul 23, 2019|
|0.2.1||Feb 28, 2019|
147 downloads per month
Install the Wasmer CLI with:
curl https://get.wasmer.io -sSfL | sh
Note: Wasmer is also available on Windows
Wasmer runtime can be used as a library embedded in different languages, so you can use WebAssembly anywhere:
|C#/.Net||Miguel de Icaza||actively developed|
|R||Dirk Schumacher||actively developed|
|Swift||Mark Malström||passively maintained|
|❓||your language is missing?|
Wasmer can execute both the standard binary format (
.wasm) and the text
format defined by the WebAssembly reference interpreter (
Once installed, you will be able to run any WebAssembly files (including Lua, PHP, SQLite and nginx!):
# Run Lua wasmer run examples/lua.wasm
You can find more
wasm/wat examples in the examples directory.
wapm allows you to easily download, run, and distribute WebAssembly binaries.
# Install cowsay globally wapm install -g cowsay # Run cowsay wapm run cowsay "Hello, world!"
Wasmer is structured into different directories:
src: code related to the Wasmer executable itself
lib: modularized libraries that Wasmer uses under the hood
examples: some useful examples for getting started with Wasmer
Building Wasmer requires rustup.
To build Wasmer on Windows, download and run
then follow the onscreen instructions.
To build on other systems, run:
curl https://sh.rustup.rs -sSf | sh
Please select your operating system:
If you have Homebrew installed:
brew install cmake
Or, if you have MacPorts:
sudo port install cmake
Windows support is experimental. WASI is fully supported, but Emscripten support is in the works (this means nginx and Lua do not work on Windows - you can track the progress on this issue).
Install Visual Studio
Install Rust for Windows
Install Python for Windows. The Windows x86-64 MSI installer is fine. Make sure to enable "Add python.exe to Path" during installation.
Install Git for Windows. Allow it to add
git.exeto your PATH (default settings for the installer are fine).
Install CMake. Ensure CMake is in your PATH.
Install LLVM 8.0
Wasmer is built with Cargo, the Rust package manager.
The Singlepass backend requires nightly, so if you want to use it,
Set Rust Nightly:
rustup default nightly
Otherwise an up to date (see badge above) version of stable Rust will work.
And install Wasmer
# checkout code git clone https://github.com/wasmerio/wasmer.git cd wasmer # install tools make release-clif # To build with cranelift (default) make release-llvm # To build with llvm support make release-singlepass # To build with singlepass support # or make release # To build with singlepass, cranelift and llvm support
Thanks to spec tests we can ensure 100% compatibility with the WebAssembly spec test suite.
You can run all the tests with:
rustup default nightly make test
Each backend can be tested separately:
Each integration can be tested separately:
- Spec tests:
- C API:
Benchmarks can be run with:
make bench-[backend] # for example make bench-singlepass
Wasmer is an open project guided by strong principles, aiming to be modular, flexible and fast. It is open to the community to help set its direction.
Below are some of the goals of this project (in order of priority):
- It should be 100% compatible with the WebAssembly spec tests
- It should be fast (partially achieved)
- Support WASI - released in 0.3.0
- Support Emscripten calls (in the works)
- Support Go JS ABI calls
If you would like to know how Wasmer works under the hood, please see docs/architecture.md.