How bytecodealliance/wasm-micro-runtime works
Main Components Overview
a) Core Runtime Components:
• VMcore (core/iwasm/)
• Interpreter Mode
• AOT (Ahead-of-Time) Compilation Mode
• JIT (Just-in-Time) Compilation Mode (Fast JIT and LLVM JIT)
• iwasm executable (product-mini/)
• wamrc AOT compiler (wamr-compiler/)
b) Supporting Components:
• App Framework
• App Manager
• Development Tools (WAMR-IDE)
Key Architectural Layers
Layer 1: Host Environment Integration
[Host Applications/Systems]
• ↕
[WAMR C/C++/Go/Python/Rust API Layer]
Layer 2: Runtime Core
[WebAssembly Modules]
• ↓
[Module Loading & Validation]
• ↓
[Execution Engines]
• Interpreter (Fast/Classic)
• AOT Compiler
• JIT Compiler (Fast/LLVM)
Layer 3: Memory & Resource Management
[Memory Management]
• Linear Memory
• Stack Management
• Heap Management
Detailed Component Breakdown
VMcore Internal Structure:
[VMcore]
• Common Runtime Services
• Memory Management
• Threading Support
• Exception Handling
• Execution Engines
• Interpreter
• AOT Runtime
• JIT Runtime
• Platform Abstraction Layer
Cross-Cutting Concerns
As vertical bars crossing multiple layers:
• Security Features
• Platform Abstraction
• Debug Support
• Performance Monitoring
Platform Support
A separate section showing supported platforms:
• Linux/Windows/macOS
• IoT/Embedded (Zephyr, RT-Thread, etc.)
• Mobile (Android)
• Cloud/Edge
• SGX Environments
Implementation Notes
Annotations for:
• Performance-critical paths
• Security boundaries
• Platform-specific variations
• Optional features