Skip to main content
A runtime is a sandboxed execution environment. You give it code, it runs that code in isolation, and returns the result. Runtimes enforce resource limits (CPU time, memory) and prevent untrusted code from accessing the host system directly. Every runtime exposes two methods for executing code:
  • exec(code): run code for its side effects (console output, file writes). Returns an exit code.
  • run(code): run code and get a value back (the default export in Node, or an evaluated expression in Python).
Console output is not buffered by default. Use the onStdio hook to capture it.

Node

Sandboxed JavaScript in a V8 isolate with memory limits, CPU budgets, and timing mitigation.

Python

Sandboxed Python via Pyodide in a Worker thread with CPU budgets and globals exchange.