Skip to main content
A runtime is an interpreter built into Mirage. It runs python3 or node inside the Mirage process, on a machine with provider: in_process. Hosts, containers and sandboxes use their own installed python3 instead. Runtimes explains the split; each page here has the Python install and an example.

Differences from the TypeScript SDK

  • Monty: os.chdir() works and lasts for the run, and os.stat() returns a real named tuple, so st[6] and len(st) work. Runs execute on Monty’s worker pool, so the event loop stays free and cancelling a run halts the interpreter. Every workspace in the process shares one pool of four workers; a run waiting on workspace I/O holds one, and a run past the four waits for one to free up.
  • QuickJS: the real quickjs-ng std and os. The first run compiles qjs-wasi.wasm and caches qjs-wasi.cwasm beside it. A write shows to other commands once the file is closed or the run ends, and a timeout stops the run.
  • WASI is in the Python SDK only; Pyodide is in the TypeScript SDK only.