Wasmrun is a powerful WebAssembly runtime that simplifies development, compilation, and deployment of WebAssembly applications.
- 🚀 Multi-Language Support - Rust, Go, Python, C/C++, and AssemblyScript
- 🔌 Plugin Architecture - Extensible system with built-in and external plugins
- 🔥 Live Reload - Instant development feedback with file watching
- 🌐 Zero-Config Web Server - Built-in HTTP server for WASM and web apps
- 📦 Smart Project Detection - Automatically detects and configures project types
- 🏃 Native WASM Execution - Run WASM files directly with argument passing
- 🤖 Agent Sandboxes - A REST API that gives AI agents isolated environments to run code in, without Docker
cargo install wasmrunOn Arch Linux, install from the AUR (community-maintained):
yay -S wasmrun-binFor other installation methods (DEB, RPM, from source), see the Installation Guide.
# Run a WASM file with dev server
wasmrun myfile.wasm
# Run a project directory
wasmrun ./my-wasm-project
# Compile a project
wasmrun compile ./my-project
# Execute WASM natively
wasmrun exec myfile.wasm
# Install language plugins
wasmrun plugin install wasmrust
wasmrun plugin install wasmgoSee the Quick Start Guide for a complete tutorial.
| Mode | Command | What it does |
|---|---|---|
| Server | wasmrun ./my-project |
Compile and serve a project with a dev server, live reload, and browser-based module inspection |
| Exec | wasmrun exec ./program.wasm |
Run a WASM file natively through the built-in interpreter with WASI. No browser, no server |
| Agent | wasmrun agent |
A REST sandbox API for AI agents. No Docker, no daemon |
| OS | wasmrun os ./my-project |
Browser-based VM with a virtual filesystem and multi-language runtimes |
Run a .wasm file directly. Arguments after the file go to the program, and --call picks an exported function instead of the entry point:
wasmrun exec ./program.wasm arg1 arg2
wasmrun exec ./math.wasm --call add 2 3The interpreter implements WASI Preview 1, so file I/O, environment variables, arguments, clocks, and randomness all work.
Start a sandbox server for AI agents:
wasmrun agent --port 8430Create a session, then execute code in it:
SID=$(curl -sX POST http://localhost:8430/api/v1/sessions | jq -r .session_id)
curl -X POST http://localhost:8430/api/v1/sessions/$SID/exec \
-H 'Content-Type: application/json' \
-d '{"source": "const _ = require(\"lodash\"); console.log(_.chunk([1,2,3,4], 2));",
"dependencies": {"lodash": "^4.17.21"}}'- JavaScript and TypeScript run from source, with npm dependencies vendored into the sandbox (it has no network of its own) and lockfiles for reproducible installs
- Pre-compiled
.wasmmodules run through the same interpreter as exec mode GET /api/v1/toolsreturns OpenAI/Anthropic-compatible tool schemas, so an LLM can drive the sandbox through function calling- Per-session limits on memory, fuel, output, file size, and disk; optional API-key auth with tenant isolation
- Binds loopback only by default;
GET /healthandGET /readyare unauthenticated probes for orchestrators - Running it for other people: the deployment guide covers the reverse proxy, systemd and container units, sizing, and monitoring
Wasmrun uses a plugin architecture for language support:
Built-in:
- C/C++ (Emscripten)
External Plugins:
- Rust:
wasmrun plugin install wasmrust - Go:
wasmrun plugin install wasmgo - Python:
wasmrun plugin install waspy - AssemblyScript:
wasmrun plugin install wasmasc
Learn more in the Plugin Documentation.
We welcome contributions! See our Contributing Guide.
- Community Page - Talks, demos, and contributors
- GitHub Issues
- GitHub Discussions
Wasmrun is built with love using:
- tiny_http - Lightweight HTTP server
- clap - Command line argument parsing
- notify - File system watching for live reload
- wasm-bindgen - Web integration
- Font used for logo is Pixeled by OmegaPC777
- And the amazing Rust and WebAssembly communities ❤️
Made with ❤️ for the WebAssembly community
⭐ If you find Wasmrun useful, please consider starring the repository!
