Go to file
2019-04-02 12:06:35 -07:00
.circleci Merge branch 'master' into feature/vfs 2019-03-26 17:00:40 -07:00
.github/ISSUE_TEMPLATE fix(github) Remove a duplicate issue template 2019-03-07 10:17:15 +01:00
examples Merge branch 'master' into feature/dynasm-backend 2019-03-12 20:58:22 -05:00
integration_tests Change nginx integration just to test it it starts 2019-03-06 13:28:07 -08:00
lib implement fd_write for files 2019-04-02 12:06:35 -07:00
scripts run the script and sudo 2019-03-23 17:20:43 -07:00
src call wasi files correctly 2019-03-29 10:58:56 -07:00
.appveyor.yml Merge branch 'master' into bors 2019-03-08 14:38:18 -08:00
.gitattributes Fixed spectests ignored by git attributes 2019-01-31 13:43:04 -08:00
.gitignore Merge branch 'master' into feature/llvm-backend 2019-03-07 13:25:24 -08:00
ARCHITECTURE.md Fix formatting and grammar in documentation 2019-02-19 17:01:44 -07:00
ATTRIBUTIONS.md Fix formatting and grammar in documentation 2019-02-19 17:01:44 -07:00
binary-name.sh Trying to autoplublish releases 2018-11-13 10:38:09 -08:00
bors.toml feat(bors) Set up Bors. 2019-03-08 10:20:46 +01:00
Cargo.lock update wasi Cargo.toml 2019-04-01 17:21:48 -07:00
Cargo.toml Merge branch 'master' into feature/wasi-fs 2019-03-29 11:09:04 -07:00
install.sh bugfix: Replace echo with printf so "\n" renders. 2019-02-26 13:19:57 -08:00
LICENSE Fix formatting and grammar in documentation 2019-02-19 17:01:44 -07:00
logo.png Updated logo 2018-11-12 18:50:58 -08:00
Makefile revert changes to emscripten 2019-03-28 11:55:01 -07:00
README.md Added WASI 2019-03-27 15:23:43 -07:00
rustfmt.toml Added support for 0 or 2 params in main emscripten function 2018-12-15 22:51:10 -08:00
sqlite.wasm build on windows 2019-03-27 16:07:59 -07:00

Wasmer logo

Build Status License Join the Wasmer Community

Introduction

Wasmer is a standalone JIT WebAssembly runtime, aiming to be fully compatible with WASI and Emscripten.

Install Wasmer with:

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

NEW : You can now embed Wasmer in your Rust application, check our example repo to see how!

Usage

Wasmer can execute both the standard binary format (.wasm) and the text format defined by the WebAssembly reference interpreter (.wat).

Once installed, you will be able to run any WebAssembly files (including nginx and Lua!):

# Run Lua
wasmer run examples/lua.wasm

# Run nginx
wasmer run examples/nginx/nginx.wasm -- -p examples/nginx -c nginx.conf

Code Structure

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

Dependencies

Building Wasmer requires rustup.

To build on Windows, download and run rustup-init.exe then follow the onscreen instructions.

To build on other systems, run:

curl https://sh.rustup.rs -sSf | sh

Other dependencies

Please select your operating system:

macOS

If you have Homebrew installed:

brew install cmake

Or, in case you have MacPorts:

sudo port install cmake

Debian-based Linuxes

sudo apt install cmake

Windows (MSVC)

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.

  1. Install Visual Studio

  2. Install Rust for Windows

  3. Install Python for Windows. The Windows x86-64 MSI installer is fine. Make sure to enable "Add python.exe to Path" during installation.

  4. Install Git for Windows. Allow it to add git.exe to your PATH (default settings for the installer are fine).

  5. Install CMake. Ensure CMake is in your PATH.

  6. Install LLVM 7.0

Building

Wasmer is built with Cargo, the Rust package manager.

# checkout code
git clone https://github.com/wasmerio/wasmer.git
cd wasmer

# install tools
# make sure that `python` is accessible.
cargo install --path .

Testing

Thanks to spec tests we can ensure 100% compatibility with the WebAssembly spec test suite.

Tests can be run with:

make test

If you need to regenerate the Rust tests from the spec tests you can run:

make spectests

You can also run integration tests with:

make integration-tests

Benchmarking

Benchmarks can be run with:

cargo bench --all

Roadmap

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 (in the works)
  • Support Emscripten calls (in the works)
  • Support Rust ABI calls
  • Support Go ABI calls

Architecture

If you would like to know how Wasmer works under the hood, please see ARCHITECTURE.md.

License

Wasmer is primarily distributed under the terms of the MIT license (LICENSE).

ATTRIBUTIONS