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).
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.