Embed a WebAssembly runtime into a microcontroller project to run portable sandboxed code with under 60 KB of flash usage.
Compile a C or Rust program to WebAssembly and run it on Linux, an RTOS like Zephyr, or an ARM device using WAMR.
Use wamrc to pre-compile WebAssembly to native machine code for maximum performance on constrained hardware.
Cross-compilation for embedded targets like Zephyr or FreeRTOS requires platform-specific toolchains and can take several hours to set up.
WebAssembly Micro Runtime (WAMR) is a lightweight system for running WebAssembly programs outside of a web browser, on everything from tiny IoT sensors to cloud servers. WebAssembly is a portable code format that lets programs compiled from C, C++, Rust, or other languages run in a sandboxed environment on almost any device. WAMR provides the engine that loads, verifies, and executes those programs. The runtime is designed to stay very small. The core components can take as little as 21 to 59 kilobytes of binary space depending on configuration, which makes it practical for microcontrollers and embedded hardware where memory is tight. It supports three execution modes: a classic interpreter that steps through code instruction by instruction, an Ahead-of-Time compiler (AOT) that converts WebAssembly to native machine code before running it, and a Just-in-Time compiler (JIT) that converts code on the fly at runtime. AOT mode is typically the fastest and most memory-efficient option for constrained devices. WAMR runs on a wide range of hardware architectures including X86, ARM, AArch64, and RISC-V, and supports operating systems from Linux and Windows to real-time embedded systems like Zephyr, FreeRTOS (via ESP-IDF), and NuttX. The project also includes security-relevant targets such as Intel SGX, which is a protected execution environment. Developers can embed WAMR into their own applications using C APIs, or use language bindings for Go, Python, and Rust. A companion tool called wamrc compiles WebAssembly files into AOT format ahead of time. There is also an experimental VS Code extension for writing and debugging WebAssembly applications. Samples and benchmarks are included to help measure performance and tune memory use on specific hardware targets.
← bytecodealliance on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.