2018-10-24 12:07:52 +02:00
# wasmer - WebAssembly Runtime
2018-10-11 21:29:36 +02:00
2018-10-17 17:21:11 +02:00
[](https://travis-ci.com/WAFoundation/wasmer)
[](https://crates.io/crates/wasmer)
[](https://github.com/WAFoundation/wasmer)
2018-10-11 21:29:36 +02:00
`wasmer` is a Standalone JIT-style runtime for WebAsssembly code.
The [Cranelift ](https://github.com/CraneStation/cranelift ) compiler is used to compile WebAssembly to native machine code. Once compiled, there are no complex interactions between the application and the runtime (unlike jit compilers, like v8) to reduce surface area for vulnerabilities.
[Documentation (crates.io) ](https://docs.rs/wasmer ).
## Usage
It can load both the standard binary format (`.wasm` ), and the text format
defined by the WebAssembly reference interpreter (`.wat` ).
2018-10-14 23:49:10 +02:00
Once installed, you will be able to run:
```sh
wasmer run my_wasm_file.wasm
```
2018-10-11 21:29:36 +02:00
## Building & Running
To build this project you will need Rust and Cargo.
```sh
# checkout code and associated submodules
2018-10-17 11:31:21 +02:00
git clone https://github.com/wafoundation/wasmer.git
2018-10-11 21:29:36 +02:00
cd wasmer
# install tools
# make sure that `python` is accessible.
cargo install
```
2018-10-14 23:49:10 +02:00
## Testing
2018-10-24 12:07:52 +02:00
This library should be always fully tested.
Thanks to [spectests ](spectests/ ) we can assure 100% compatibility with the WebAssembly spec test suite.
2018-10-14 23:49:10 +02:00
Tests can be run with:
```sh
cargo test
```
2018-10-24 12:07:52 +02:00
If you need to re-generate the Rust tests from the spectests
you can run:
```sh
make spectests
```
## Roadmap
2018-10-14 23:54:28 +02:00
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.
2018-10-24 12:07:52 +02:00
Below are some of the goals (written with order) of this project:
- [ ] It should be 100% compatible with the WebAssembly Spectest (on the works)
- [ ] It should be fast. We can achieve this by caching the function compilations
- [ ] Support Emscripten calls
- [ ] Support Rust ABI calls
2018-10-14 23:54:28 +02:00
2018-10-11 21:29:36 +02:00
## License
MIT/Apache-2.0