explaingit

bytecodealliance/wasm-micro-runtime

5,923CAudience · developerComplexity · 4/5Setup · hard

TLDR

A tiny engine for running WebAssembly programs on anything from small IoT sensors to cloud servers, with a core as small as 21 KB and support for interpreter, AOT, and JIT execution modes.

Mindmap

mindmap
  root((repo))
    What it does
      Runs WebAssembly
      Outside the browser
      21 to 59 KB footprint
    Execution modes
      Interpreter
      AOT compiler
      JIT compiler
    Platform support
      Linux and Windows
      ARM and RISC-V
      RTOS and embedded
    Language bindings
      C API
      Go Python Rust
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Embed a WebAssembly runtime into a microcontroller project to run portable sandboxed code with under 60 KB of flash usage.

USE CASE 2

Compile a C or Rust program to WebAssembly and run it on Linux, an RTOS like Zephyr, or an ARM device using WAMR.

USE CASE 3

Use wamrc to pre-compile WebAssembly to native machine code for maximum performance on constrained hardware.

Tech stack

CWebAssemblyCMakeRustPythonGo

Getting it running

Difficulty · hard Time to first run · 1h+

Cross-compilation for embedded targets like Zephyr or FreeRTOS requires platform-specific toolchains and can take several hours to set up.

In plain English

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.

Copy-paste prompts

Prompt 1
I want to run a WebAssembly module on an ESP32 microcontroller using WAMR via FreeRTOS and ESP-IDF. Walk me through the build steps and show me a minimal C host example.
Prompt 2
Show me how to compile a Rust function to WebAssembly and then use the WAMR C API to load and call it from a host app on Linux.
Prompt 3
I want to use wamrc to compile a .wasm file into AOT format for ARM. Walk me through the wamrc flags and how to load the resulting file at runtime with WAMR.
Open on GitHub → Explain another repo

← bytecodealliance on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.