python3 and node on the
in_process machine, where a line runs inside the Mirage process and there is
no installed interpreter to call. On a host, container or sandbox, the
python3 installed there runs instead. Runtimes
explains the split; each page here has the Python install and a runnable
example.
Differences from the TypeScript SDK
- Monty:
os.chdir()works and lasts for the run, andos.stat()returns a real named tuple, sost[6]andlen(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
stdandos. The first run compilesqjs-wasi.wasmand cachesqjs-wasi.cwasmbeside 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.