Embed kits

The language can sit inside another program the way Lua does. Official support is C and JavaScript. Kits for other hosts will appear here; the design is on language / embed.

HostStatusRoute
C / C++Officialports/embed in the MicroPython tree
JavaScriptOfficialports/webassembly — loadMicroPython()
PyScriptOfficial consumer<script type="mpy">
Rust, Go, ZigDIY todaycc the embed port, or run the WASM build
PHPPlanned kitWASM host or a C extension wrapping embed

Minimal C shape

/* ports/embed — initialise a heap, then exec strings or .mpy */
static char heap[8 * 1024];
int stack_top;
mp_embed_init(&heap[0], sizeof(heap), &stack_top);
mp_embed_exec_str("print('from the host')");   /* or mp_embed_exec_mpy(data, len) */
mp_embed_deinit();