Wasmtime

A fast and secure runtime for WebAssembly

A Bytecode Alliance project

Install

It looks like you’re running macOS or Linux. To download and install Wasmtime, run the following in your terminal, then follow the on-screen instructions.

curl https://wasmtime.dev/install.sh -sSf | bash

You can also download binaries directly from the GitHub Releases page.

It looks like you’re running Windows. To install Wasmtime, download and run the following, and then follow the onscreen instructions.

Wasmtime Installer

If you’re a Windows Subsystem for Linux user run the following in your terminal, then follow the on-screen instructions to install Wasmtime.

curl https://wasmtime.dev/install.sh -sSf | bash

If you’re running macOS or Linux, download and install Wasmtime by running the following in your terminal and following the on-screen instructions.

curl https://wasmtime.dev/install.sh -sSf | bash

If you are running Windows, download and run the Wasmtime Installer then follow the on-screen instructions.


Alternatively, you can download releases for all supported platforms from the Wasmtime GitHub page.

Example

If you've got the Rust compiler installed then you can take some Rust source code:

fn main() {
    println!("Hello, world!");
}

and compile/run it with:

$ rustup target add wasm32-wasi
$ rustc hello.rs --target wasm32-wasi
$ wasmtime hello.wasm
Hello, world!

Features

  • Fast. Wasmtime is built on the optimizing Cranelift code generator to quickly generate high-quality machine code either at runtime or ahead-of-time. Wasmtime is optimized for efficient instantiation, low-overhead calls between the embedder and wasm, and scalability of concurrent instances.

  • Secure. Wasmtime's development is strongly focused on correctness and security. Building on top of Rust's runtime safety guarantees, each Wasmtime feature goes through careful review and consideration via an RFC process. Once features are designed and implemented, they undergo 24/7 fuzzing donated by Google's OSS Fuzz. As features stabilize they become part of a release, and when things go wrong we have a well-defined security policy in place to quickly mitigate and patch any issues. We follow best practices for defense-in-depth and integrate protections and mitigations for issues like Spectre. Finally, we're working to push the state-of-the-art by collaborating with academic researchers to formally verify critical parts of Wasmtime and Cranelift.

  • Configurable. Wasmtime uses sensible defaults, but can also be configured to provide more fine-grained control over things like CPU and memory consumption. Whether you want to run Wasmtime in a tiny environment or on massive servers with many concurrent instances, we've got you covered.

  • WASI. Wasmtime supports a rich set of APIs for interacting with the host environment through the WASI standard.

  • Standards Compliant. Wasmtime passes the official WebAssembly test suite, implements the official C API of wasm, and implements future proposals to WebAssembly as well. Wasmtime developers are intimately engaged with the WebAssembly standards process all along the way too.

Language Support

You can use Wasmtime from a variety of different languages through embeddings of the implementation:

Documentation

The wasmtime guide is the best starting point to learn about what Wasmtime can do for you or help answer your questions about Wasmtime. If you're interested in contributing to Wasmtime, it can also help you do that!