8 unstable releases (3 breaking)
✓ Uses Rust 2018 edition
|new 0.5.6||Jul 16, 2019|
|0.5.5||Jul 10, 2019|
|0.4.2||May 16, 2019|
|0.4.0||Apr 29, 2019|
|0.2.1||Feb 28, 2019|
#40 in WebAssembly
73 downloads per month
Install Wasmer with:
curl https://get.wasmer.io -sSfL | sh
Wasmer runtime can also be embedded in different languages, so you can use WebAssembly anywhere ✨:
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 # Run PHP wasmer run examples/php.wasm # Run SQLite wasmer run examples/sqlite.wasm # Run nginx wasmer run examples/nginx/nginx.wasm -- -p examples/nginx -c nginx.conf
Installing Wasmer through
wapm, the WebAssembly package manager.
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 to getting started with Wasmer
Building Wasmer requires rustup.
To build 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, in case you have MacPorts:
sudo port install cmake
sudo apt install cmake pkg-config libssl-dev
pkg install cmake
Windows support is highly experimental. Only simple Wasm programs may be run, and no syscalls are allowed. This means nginx and Lua do not work on Windows. See this issue regarding Emscripten syscall polyfills for Windows.
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 7.0
Wasmer is built with Cargo, the Rust package manager.
Set Rust Nightly:
rustup default nightly
And install Wasmer
# checkout code git clone https://github.com/wasmerio/wasmer.git cd wasmer # install tools # make sure that `python` is accessible. make install
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:
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 Rust ABI calls
- Support Go ABI calls
If you would like to know how Wasmer works under the hood, please see ARCHITECTURE.md.