Go to file
bors[bot] ec94d366b0
Merge #785
785: Copy the spectest repository license from the official WebAssembly testsuite. These tests are under that license. r=nlewycky a=nlewycky

Remove our own license statements on a few files since they're now redundant. They were all referencing this license.


Co-authored-by: Nick Lewycky <nick@wasmer.io>
2019-09-13 20:38:57 +00:00
.azure Trying to improve local cache dir 2019-09-03 15:32:32 -07:00
.github Merge pull request #778 from wasmerio/create-pr-template 2019-09-11 22:40:32 -03:00
docs Merge pull request #491 from wasmerio/add-debugging-doc 2019-09-02 10:22:17 -07:00
examples Introduce some breaking changes to WasiFS API for next release 2019-09-10 13:52:02 -07:00
fuzz fix typo 2019-09-09 11:50:30 +02:00
integration_tests Added WASI integration tests 2019-04-22 17:06:42 -07:00
lib Copy the spectest repository license from the official WebAssembly testsuite. These tests are under that license. 2019-09-13 13:37:48 -07:00
scripts Prepare for 0.7.0 release 2019-09-12 12:44:38 -07:00
src Wasmer run can run text wat files, not webassembly spectest files. 2019-09-12 20:56:11 -07:00
wapm-cli@b157153568 Updated wapm-cli to 0.3.7 2019-07-31 10:34:53 -07:00
.dockerignore Add Dockerfile and documentation 2019-04-09 01:35:48 -05:00
.gitattributes Fixed spectests ignored by git attributes 2019-01-31 13:43:04 -08:00
.gitignore Improved install script 2019-04-11 15:05:14 -07:00
.gitmodules rm clif submodule; fix master 2019-07-10 10:38:38 -07:00
ATTRIBUTIONS.md Fix formatting and grammar in documentation 2019-02-19 17:01:44 -07:00
azure-pipelines.yml Don't redefine "variables". 2019-09-03 16:13:50 -07:00
bors.toml Use azure-pipelines in bors 2019-08-31 23:17:31 -07:00
build Add a Docker sandbox for building Wasmer 2019-07-29 21:18:04 +03:00
Cargo.lock Implement atomic load and store instructions with actual atomics in the LLVM backend. 2019-09-13 12:05:55 -07:00
Cargo.toml Prepare for 0.7.0 release 2019-09-12 12:44:38 -07:00
CHANGELOG.md Add changelog entry. 2019-09-13 13:38:11 -07:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2019-08-22 16:16:34 -05:00
CONTRIBUTING.md Initial commit of contributing document 2019-08-15 20:58:52 -06:00
Dockerfile Updated LLVM to 8.0 2019-07-22 14:04:17 -07:00
Dockerfile.build Add a Docker sandbox for building Wasmer 2019-07-29 21:18:04 +03:00
install.sh Update install script to use the more potable = instead of == 2019-08-22 17:10:17 -07:00
LICENSE Update LICENSE author 2019-04-16 12:11:00 -07:00
logo.png Updated logo 2019-08-17 21:41:09 -07:00
Makefile Merge branch 'master' into feature/serialization-of-wasi-state 2019-09-04 14:36:25 -07:00
README.md Improved Readme 2019-09-01 02:28:59 -07:00
rustfmt.toml update rustfmt.toml to ignore and fmt 2019-07-15 10:43:30 -07:00
SECURITY.md Fix security contact 2019-05-27 14:41:18 -07:00

Wasmer logo

Build Status License Join the Wasmer Community Follow @wasmerio on Twitter

Introduction

Wasmer is a standalone WebAssembly runtime, for running WebAssembly outside of the Browser, supporting WASI and Emscripten.

Install the Wasmer CLI with:

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

Note: Wasmer is also available on Windows

Languages

Wasmer runtime can be used as a library embedded in different languages, so you can use WebAssembly anywhere:

  Language Author(s) Maintenance Release Stars
Rust logo Rust Wasmer actively developed last release number of Github stars
C logo C/C++ Wasmer actively developed last release number of Github stars
Python logo Python Wasmer actively developed last release number of Github stars
Go logo Go Wasmer actively developed last release number of Github stars
PHP logo PHP Wasmer actively developed last release number of Github stars
Ruby logo Ruby Wasmer actively developed last release number of Github stars
Postgres logo Postgres Wasmer actively developed last release number of Github stars
C# logo C#/.Net Miguel de Icaza actively developed last release number of Github stars
R logo R Dirk Schumacher actively developed number of Github stars
Swift logo Swift Mark Malström passively maintened number of Github stars
your language is missing?

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 Lua, PHP, SQLite and nginx!):

# Run Lua
wasmer run examples/lua.wasm

You can find more wasm/wat examples in the examples directory.

With WAPM

Installing Wasmer through wasmer.io includes 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!"

For more information about wapm, check out the website and this example program.

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 Wasmer 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

macOS

If you have Homebrew installed:

brew install cmake

Or, in case you have MacPorts:

sudo port install cmake

Debian-based Linuxes

Debian-based Linuxes

sudo apt install cmake pkg-config libssl-dev

FreeBSD

FreeBSD

pkg install cmake

Windows

Windows (MSVC)

Windows support is experimental. WASI is fully supported, but Emscripten support is on the works (this means nginx and Lua do not work on Windows - you can track the progress on this issue).

  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 8.0

Building

Rustc Version 1.36+

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) verison 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

Testing

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

Testing backends

Each backend can be tested separately:

  • Singlepass: make singlepass
  • Cranelift: make cranelift
  • LLVM: make llvm

Testing integrations

Each integration can be tested separately:

  • Spec tests: make spectests
  • Emscripten: make emtests
  • WASI: make wasi
  • Middleware: make middleware
  • C API: make capi

Benchmarking

Benchmarks can be run with:

make bench-[backend]

# for example
make bench-singlepass

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

Architecture

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

License

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

ATTRIBUTIONS