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 TypeScript install and a runnable
example.
Runtime output uses the normal
Workspace.shell() result: stdout and
stderr are Uint8Array; stdoutText and stderrText decode them.
Differences from the Python SDK
- Monty: each run executes in a crash-isolated worker, from one pool of
four that every workspace in the process shares.
os.chdir()raisesRuntimeError; usecdin the shell or the run’sctx.cwd.os.stat()has only the named fields (st.st_size). - QuickJS: a
stdandosshim with the calls the QuickJS table lists. A write shows to other commands once the file is flushed or closed, or the run ends. A timeout stops the run, and the engine caps a run at 64 MiB of memory and 1 MiB of stack. - Pyodide is in the TypeScript SDK only; WASI is in the Python SDK only.