You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Dan Gohman 29c2616484 Update the documentation about C/C++ toolchain limitations. 6 years ago
docs Update the documentation about C/C++ toolchain limitations. 6 years ago
filetests Add more trapping testcases. 6 years ago
fuzz update cranelift deps to 0.30.0 6 years ago
lightbeam@762cd3fb32 Integrate Lightbeam (#51) 6 years ago
misc_testsuite Implement the remaining valid spec tests. 6 years ago
spec_testsuite@b2800641d6 Integrate Lightbeam (#51) 6 years ago
src Integrate Lightbeam (#51) 6 years ago
tests Generate debug info for LLDB/GDB (#50) 6 years ago
wasmtime-debug WASI prototype design, implementation, and documentation. 6 years ago
wasmtime-environ Tidy up unused import warnings. 6 years ago
wasmtime-jit Tidy up unused import warnings. 6 years ago
wasmtime-obj Integrate Lightbeam (#51) 6 years ago
wasmtime-runtime Allow access to memory_index and grow on Instance (#105) 6 years ago
wasmtime-wasi Add Rust impl of wasmtime_ssp_proc_exit 6 years ago
wasmtime-wast update cranelift deps to 0.30.0 6 years ago
.gitignore Add Emacs backup and autosave files to .gitignore. 6 years ago
.gitmodules Integrate Lightbeam (#51) 6 years ago
.rustfmt.toml Update to cranelift's formatting and testing scripts. 6 years ago
.travis.yml Update Travis from trusty to xenial. (#84) 6 years ago
CODE_OF_CONDUCT.md Add a CODE_OF_CONDUCT.nd and CONTRIBUTING.md. 6 years ago
CONTRIBUTING.md Add a CODE_OF_CONDUCT.nd and CONTRIBUTING.md. 6 years ago
Cargo.toml Integrate Lightbeam (#51) 6 years ago
LICENSE Adjust whitespace to match the upstream exception text. 6 years ago
README.md Document using wasmtime as a dependency in the README 6 years ago
appveyor.yml Tidy up trap-handling code. 6 years ago
build.rs Refactor the compilation and instantiation pipeline. 6 years ago
clippy.toml More code reorganization and cleanups. 6 years ago
format-all.sh Update to cranelift's formatting and testing scripts. 6 years ago
publish-all.sh Move the wasmtime crate directories form lib/* to wasmtime-*. 6 years ago
test-all.sh Lightbeam requires nightly, so don't use cargo test --all. 6 years ago

README.md

Wasmtime: a WebAssembly Runtime.

Wasmtime is a standalone wasm-only runtime for WebAssembly, using the Cranelift JIT.

It runs WebAssembly code outside of the Web, and can be used both as a command-line utility or as a library embedded in a larger application.

Travis Status Appveyor Status Gitter chat Minimum rustc 1.32

Wasmtime passes the WebAssembly spec testsuite, and supports a new system API proposal called WebAssembly System Interface, or WASI.

Wasmtime includes a git submodule; in order to build it, it's necessary to obtain a full checkout, like this:

git clone --recurse-submodules https://github.com/CraneStation/wasmtime.git.

To build Wasmtime, install cmake and clang, and then build with cargo, such as with "cargo build --release". For information on installing clang, see rust-bindgen's documentation.

There are Rust, C, and C++ toolchains that can compile programs with WASI. See here for more information, and here for a tutorial on compiling and running programs using WASI and wasmtime, as well as an overview of the filesystem sandboxing system.

Wasmtime does not yet implement Spectre mitigations, such as those being pioneered by wasmjit, however this is a subject of ongoing research.

Additional goals for Wasmtime include:

  • Support a variety of host APIs (not just WASI Core), with fast calling sequences, and develop proposals for additional API modules to be part of WASI. Reference Sysroot.
  • Implement the proposed WebAssembly C API.
  • Facilitate testing, experimentation, and development around the Cranelift and Lightbeam JITs.
  • Develop a native ABI used for compiling WebAssembly suitable for use in both JIT and AOT to native object files.

Including Wasmtime in your project

Wasmtime exposes an API for JIT compilation through the wasmtime-jit subcrate, which depends on wasmtime-environ and wasmtime-runtime for the ABI and runtime support respectively. However, this API is not documented and subject to change. Please use at your own risk!

Build the individual crates as such:

cargo build --package wasmtime-jit

Wasmtime does not currently publish these crates on crates.io. They may be included as a git dependency, like this:

[dependencies]
wasmtime-environ = { git = "https://github.com/CraneStation/wasmtime", rev = "somecommithash" }
wasmtime-runtime = { git = "https://github.com/CraneStation/wasmtime", rev = "somecommithash" }
wasmtime-jit = { git = "https://github.com/CraneStation/wasmtime", rev = "somecommithash" }

All three crates must be specified as dependencies for wasmtime-jit to build correctly, at the moment.

It's Wasmtime.