January 1, 2026

VMs inside VMs, what could go wrong?

WebAssembly as a Python Extension Platform

Python gets a WebAssembly add‑on: speed thrills, API spills, and an 18MB side‑quest

TLDR: Python can ship portable WebAssembly add-ons via wasmtime-py, bringing speed without a compiler. The comments question skipping WASI, gripe about an 18MB dependency and frequent API breakage, and joke about “VMs inside VMs,” while fans cheer the convenience for cross-platform extensions.

Python invited WebAssembly into the house, promising faster add‑ons without the usual “compile it yourself” drama. The pitch: ship a tiny Wasm program inside a Python package and run it with wasmtime-py, which comes with ready‑to‑go binaries for Windows, macOS, and Linux. In tests, it beats wasm3 by 3x–10x and needs only Python on the host. But it’s a sandbox—great for speed and portable math bits, not for talking to files, networks, or devices.

Commenters showed up. The top call‑out from mkoubaa: Why pick a non‑WASI runtime? WASI (a standard way for Wasm to access the system) feels like the obvious path, so the silence triggered side‑eye. Then came the bloat jokes: a ~18MiB install and a “monthly API break” had people quipping about a boss fight every update. Some argued, “If you’re okay with that size, just ship native wheels,” while others loved the no‑toolchain simplicity. The awkward “pass the store into everything” pattern became meme fodder—“VMs inside VMs inside Python,” a Matryoshka you can’t free one doll from. Big mood: hype for portable speed, mixed with fear of churn, and a lingering what problem is this solving thread. Everyone agrees it’s cool; not everyone agrees it’s practical.

Key Points

  • Wasm can be used to ship architecture-independent modules in Python libraries, avoiding native toolchains.
  • Wasm’s sandbox prevents external interface access; it suits performance gains and embeddable capabilities without external access.
  • wasm3 (non-WASI, C-based) is easy to embed, but its Python bindings (pywasm3) are source-only and require a C toolchain.
  • wasmtime-py offers cross-platform binary wheels (Windows, macOS, Linux on x86-64/ARM64) and is 3x–10x faster than wasm3 in tests.
  • Trade-offs of wasmtime-py include ~18 MiB install size and frequent API breaks (around version 40), plus a verbose Store-centric API.

Hottest takes

"Why go non‑WASI? Is there any advantage?" — mkoubaa
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.