wasmtime
A WebAssembly runtime powered by Wasmtime
What it is and what it does
Wasmtime is a Python binding to the Wasmtime WebAssembly runtime, a Bytecode Alliance project that lets you load, compile, and execute WebAssembly modules and components from within Python. It exposes a high-level API for creating stores, modules, instances, and calling exported functions, as well as importing Python functions into WebAssembly. The package ships as a precompiled wheel with no external runtime dependencies, making installation straightforward.
The runtime is actively maintained and follows Wasmtime's versioning scheme, releasing a new major version monthly. This means dependency specifications need regular updates to stay current. It supports modern Python versions (3.9 through 3.14) and PyPy on 64-bit Windows, macOS, and Linux systems. The package is suitable for embedding WebAssembly execution in Python applications, whether for sandboxed computation, plugin systems, or interoperability with WebAssembly-based libraries.
Use it for:
- Execute untrusted or sandboxed WebAssembly code from Python without spawning a separate process.
- Integrate WebAssembly modules compiled from other languages into Python applications.
- Build plugin systems where plugins are distributed as WebAssembly components.
- Call Python functions from within WebAssembly modules via the import interface.
- Prototype or test WebAssembly modules interactively in Python before deployment.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Embeds the Wasmtime WebAssembly runtime in Python, allowing you to compile, instantiate, and execute WebAssembly modules and components directly from Python code.
Yes. Wasmtime is a mature, actively maintained runtime with low install friction, no runtime dependencies, and broad platform support. The monthly major-version release cycle requires discipline in dependency management, but the package is well-documented and widely used. Install it if you need to execute WebAssembly from Python; verify the license terms for your use case first.
Install
wasmtime on PyPI
pip
pip install wasmtimeuv
uv add wasmtimepoetry
poetry add wasmtimeInstalling wasmtime
Before you install
Low friction: pure wheel distribution with no runtime dependencies. Actively maintained with releases every month; last commit 2026-07-20. Supports Python 3.9+ on Windows, macOS, and Linux for x86_64 and arm64.
License in practice
Licensed under Apache-2.0 WITH LLVM-exception. License treatment is marked unclear in the metadata, so verify the dual-license terms apply as expected for your use case before relying on it in proprietary or restricted contexts.
Quickstart
pip install wasmtime
from wasmtime import Store, Module, Instance
store = Store()
module = Module(store.engine, "(module (func (export \"test\")))")
instance = Instance(store, module, [])
test = instance.exports(store)["test"]
test(store)
Requires Python 3.9 or later; 64-bit builds only on Windows, macOS, or Linux with x86_64 or arm64 architecture.
Verify before relying
- Exact scope and stability guarantees of the monthly major-version release cycle for production use.
- Whether the Apache-2.0 WITH LLVM-exception dual-license composition is compatible with your project's license requirements.
- Performance characteristics and memory overhead when executing WebAssembly modules from Python.
Package facts
| License | Apache-2.0 WITH LLVM-exception (unclear) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 25 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,897,257/month — #3,449 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: wasmtime-47.0.1-py3-none-any.whl
Tags
More Compilers packages
pyparsing provides a library for building text…
permissive · top 1,000 on PyPI
CythonCython is a source code translator that…
permissive · top 1,000 on PyPI
asttokensAnnotates Python abstract syntax trees with the…
permissive · top 1,000 on PyPI
numbaNumba is a just-in-time compiler that…
permissive · top 1,000 on PyPI
tree-sitterPython bindings to the tree-sitter parsing…
permissive · top 1,000 on PyPI
llvmlitellvmlite provides a lightweight Python binding…
permissive · top 1,000 on PyPI
wasmerExecutes WebAssembly modules from Python with a…
permissive · top 15,000 on PyPI
wasmer-compiler-craneliftProvides the Cranelift compiler backend for…
permissive · top 15,000 on PyPI
qwasmDecodes and disassembles WebAssembly binary…
permissive · top 15,000 on PyPI
itkwasmProvides a Python interface to run itk-wasm…
permissive · top 15,000 on PyPI
quickjs-rsExecutes JavaScript code inside a WebAssembly…
permissive · top 15,000 on PyPI
pyodide-pyProvides core interpreter functionality for…
copyleft · top 15,000 on PyPI
hyperlight-sandbox-backend-wasmProvides a WebAssembly backend implementation…
permissive · top 15,000 on PyPI
mini-racerEmbeds Google's V8 JavaScript engine in Python,…
permissive · top 5,000 on PyPI
py-mini-racerEmbeds a modern V8 JavaScript engine in Python,…
permissive · top 5,000 on PyPI
hyperlight-sandbox-python-guestProvides a Python guest runtime for the…
permissive · top 15,000 on PyPI