A pure Rust implementation of a WebAssembly runtime supporting both the core WebAssembly specification and the WebAssembly Component Model.
- Core WebAssembly Support: Full WebAssembly 1.0 specification implementation
- Component Model: WebAssembly Component Model for language-agnostic interoperability
no_std
Compatible: Works in embedded and bare-metal environments- Memory Safety: Safe memory management with ASIL-B compliance features
- Stackless Execution: Configurable execution engine for constrained environments
- Control Flow Integrity: Hardware and software CFI protection
- Rust 1.86.0 or newer
- just command runner
# Build everything
just build
# Run tests
just ci-test
# Run example
just test-wrtd-example
Add WRT to your Cargo.toml
:
[dependencies]
wrt = { path = "wrt" } # Use appropriate version/path
Basic usage:
use wrt::prelude::*;
// Load and run a WebAssembly module
let module = Module::from_bytes(&wasm_bytes)?;
let mut instance = ModuleInstance::new(module, imports)?;
let result = instance.invoke("function_name", &args)?;
This is a multi-crate workspace:
wrt/
- Main library facadewrt-foundation/
- Core types and bounded collectionswrt-runtime/
- Execution enginewrt-component/
- Component Model implementationwrt-decoder/
- Binary format parsingwrtd/
- Standalone runtime daemonexample/
- Example WebAssembly component
- API Documentation - Complete API reference and specifications
- Architecture Guide - System design and components
- Developer Guide - Contributing and development setup
Generate documentation:
# Build comprehensive documentation
just docs
# API documentation only
cargo doc --workspace --open
See the Developer Guide for detailed development instructions.
Common commands:
just --list # Show all available commands
just fmt # Format code
just ci-main # Run main CI checks
just ci-full # Run complete CI suite
MIT License - see LICENSE file for details.