Migo Developer Docs
An embeddable Canvas/WebGL mini-game runtime with a single C ABI across Android, Linux, Windows, and OpenHarmony
Migo is an embeddable Canvas/WebGL mini-game container. The host app provides the surface, input, and storage; Migo provides a V8 JavaScript runtime and a Skia rendering pipeline, across Android, Linux, Windows, and OpenHarmony. There is no DOM or CSS — Migo is not a general-purpose WebView replacement.
flowchart TB Bundle[mini-game bundle] --> Adapter[standalone adapter (optional)] Adapter --> Boundary[migo.* capability boundary] Boundary --> Core[Rust core] Core --> V8[V8 JavaScript runtime] Core --> Render[Skia / Canvas / WebGL] Host[host app] <--> SDK[C ABI (language facade above Android)] SDK <--> Core Host --> Services[surface · input · storage · network · ads]
- The mini-game bundle accesses runtime capabilities only through the
migo.*capability boundary; an optional standalone adapter sits outside the engine. - The Rust core orchestrates the V8 JavaScript runtime and the Skia rendering backend, producing Canvas/WebGL output.
- The host app creates and manages sessions through the C ABI — the single interface shared across
all four platforms. The Java facade (
MigoRuntime/MigoGameView) used on Android is purely a language wrapper above this ABI. Services such as surface, input, storage, network, and ads are provided by the host. - Migo provides no DOM, CSS, page layout, or browser document object model.
API Reference Overview
Section titled “API Reference Overview”The C ABI consists of 8 header files with a consistent interface across all four platforms,
negotiated via abi_version. One page per header:
| Page | Summary |
|---|---|
| C ABI Overview | Header relationships, call ordering, handle model, error codes, and compile-time selection |
| Base Types and Export Macros | Handles / error codes / export macros, MIGO_ABI_* constants, and struct_size evolution rules |
| Engine Initialization | migo_engine_* lifecycle: creation, ICU data, and the destruction thread-completion barrier |
| Session | Session handle, MigoHostCallbacks, the host dispatcher, and shutdown ordering |
| Surface Interface | migo_surface_attach, platform descriptors, frame_info, and back-pressure |
| Input Events | The migo_session_send_* family: validation, FIFO, coordinate units, and per-event payloads |
| External Frame Injection | readPixels/getImageData-compatible path — ingress, sync-barrier, and resource lanes |
| Runtime Capability Query | migo_query_capabilities: runtime query of ABI version range and platform bitmask |
Semantic details (architecture, lifecycle, threading model) are in the Core Concepts section.