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.
| Host | Status | Route |
|---|---|---|
| C / C++ | Official | ports/embed in the MicroPython tree |
| JavaScript | Official | ports/webassembly — loadMicroPython() |
| PyScript | Official consumer | <script type="mpy"> |
| Rust, Go, Zig | DIY today | cc the embed port, or run the WASM build |
| PHP | Planned kit | WASM host or a C extension wrapping embed |
Minimal C shape
/* ports/embed — initialise a heap, then exec strings or .mpy */
mp_embed_init(heap, sizeof heap);
mp_embed_exec_str("print('from the host')");
mp_embed_deinit();