Skip to content
Standalone JIT-style runtime for WebAsssembly, using Cranelift
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs fix fsync -> fcntl Apr 18, 2019
lightbeam @ 762cd3f Integrate Lightbeam (#51) Apr 5, 2019
spec_testsuite @ b280064
src Integrate Lightbeam (#51) Apr 5, 2019
tests Generate debug info for LLDB/GDB (#50) Mar 7, 2019
wasmtime-debug WASI prototype design, implementation, and documentation. Mar 27, 2019
wasmtime-environ Tidy up unused import warnings. Apr 5, 2019
wasmtime-jit Tidy up unused import warnings. Apr 5, 2019
wasmtime-obj Integrate Lightbeam (#51) Apr 5, 2019
wasmtime-wasi Fix a trace logging message. Apr 23, 2019
wasmtime-wast update cranelift deps to 0.30.0 Mar 27, 2019
.gitignore Add Emacs backup and autosave files to .gitignore. Dec 5, 2018
.travis.yml Update Travis from trusty to xenial. (#84) Mar 31, 2019 Add a CODE_OF_CONDUCT.nd and Dec 5, 2018 Add a CODE_OF_CONDUCT.nd and Dec 5, 2018
Cargo.toml Integrate Lightbeam (#51) Apr 5, 2019
LICENSE Adjust whitespace to match the upstream exception text. Oct 30, 2018 Document using wasmtime as a dependency in the README Apr 19, 2019
appveyor.yml Tidy up trap-handling code. Dec 19, 2018
clippy.toml More code reorganization and cleanups. Aug 3, 2018 Update to cranelift's formatting and testing scripts. Jul 21, 2018 Lightbeam requires nightly, so don't use cargo test --all. Apr 5, 2019

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

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 They may be included as a git dependency, like this:

wasmtime-environ = { git = "", rev = "somecommithash" }
wasmtime-runtime = { git = "", rev = "somecommithash" }
wasmtime-jit = { git = "", rev = "somecommithash" }

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

It's Wasmtime.

You can’t perform that action at this time.