A WebAssembly runtime and CLI for running apps and AI agent code in fast, lightweight, sandboxed environments.
bytecodealliance/wasmtime
A standalone WebAssembly runtime built on the Cranelift code generator, with WASI support and embeddings for multiple languages.
- Stars
- 18,744
- Forks
- 1,879
- Open issues
- 888
- Last commit
- 5 hours ago
What is it?
Wasmtime is a standalone runtime for WebAssembly, the portable binary format for code that runs in browsers and outside them. It can run WebAssembly components from the command line with the wasmtime CLI, or be embedded into applications through its Rust crate and bindings for C, C++, Python, .NET, Go, and Ruby.
It compiles modules with the Cranelift code generator, either just-in-time at runtime or ahead of time. The project exposes configuration options for CPU and memory use, and provides WASI APIs so guest programs can interact with the host environment such as files and system resources. The project states that it passes the official WebAssembly test suite and implements the official wasm C API.
Wasmtime is maintained under the Bytecode Alliance and is written in Rust.
Key features
- 01Compiles WebAssembly with the Cranelift code generator, either at runtime or ahead of time.
- 02Provides WASI APIs for guest programs to access host resources.
- 03Offers configuration controls for CPU and memory consumption.
- 04Includes a CLI for running WebAssembly components directly.
- 05Offers embedding bindings for Rust, C, C++, Python, .NET, Go, and Ruby.
Use cases
- Running WebAssembly components from the command line.
- Embedding a sandboxed WebAssembly runtime inside a Rust or C application.
- Executing untrusted plugin code with WASI-based host access.
Quick start
- 1
Install the Wasmtime CLI with the official install script or from the releases page
- 2
Add the WebAssembly WASI target to Rust
rustup target add wasm32-wasip2 - 3
Compile a Rust hello-world program into a WebAssembly component
rustc hello.rs --target wasm32-wasip2 - 4
Run the compiled component with Wasmtime
wasmtime hello.wasm
Things to know
- The one-line install script is documented only for Linux and macOS; Windows users must use the releases page.
Topics
FAQ
- What is wasmtime?
- A standalone WebAssembly runtime built on the Cranelift code generator, with WASI support and embeddings for multiple languages. Wasmtime is a standalone runtime for WebAssembly, the portable binary format for code that runs in browsers and outside them. It can run WebAssembly components from the command line with the wasmtime CLI, or be embedded into applications through its Rust crate and bindings for C, C++, Python, .NET, Go, and Ruby.
- Is wasmtime free to use? What license does it have?
- wasmtime is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is wasmtime still maintained?
- Actively maintained. The last commit to wasmtime was on Oct 21, 2026.
- What can I use wasmtime for?
- Running WebAssembly components from the command line. Embedding a sandboxed WebAssembly runtime inside a Rust or C application. Executing untrusted plugin code with WASI-based host access.
- How do I install wasmtime?
- Install the Wasmtime CLI with the official install script or from the releases page Add the WebAssembly WASI target to Rust: rustup target add wasm32-wasip2 Compile a Rust hello-world program into a WebAssembly component: rustc hello.rs --target wasm32-wasip2 Run the compiled component with Wasmtime: wasmtime hello.wasm
- Where can I get wasmtime?
- The source code and installation instructions are on GitHub: https://github.com/bytecodealliance/wasmtime
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A Python 3 interpreter written in Rust, able to run Python code without CPython bindings, with WebAssembly and embedding support.
A Go compiler built on LLVM that targets microcontrollers, WebAssembly (WASM/WASI), and command-line tools.
A experimental TypeScript and JavaScript compiler that turns programs into native executables or WebAssembly, without requiring Node.js at runtime.
A compiler toolchain that turns C and C++ code into WebAssembly so it can run in browsers, Node.js and other Wasm runtimes.
A TypeScript-like language and compiler that turns a typed subset of TypeScript into WebAssembly modules.