API reference
ES Runtime is ESM-only; the embeddable library is deny-by-default (the esrun CLI grants all capabilities). Host functionality is exposed as ES modules under the runtime: scheme — never as ambient globals — and every operation is gated on an explicit capability.
The runtime: scheme
Built-in modules are imported with a runtime: specifier. They are served from a baked, in-binary registry before any injected loader runs, and never touch the filesystem. The security boundary is the op, not the module: importing always succeeds, but an operation throws unless its capability has been granted.
JavaScript
import { env, args } from "runtime:process";
Built-in modules
| Module | Status | Capability |
|---|---|---|
runtime:process | Available | Env / Signals |
runtime:path | Available | Env |
runtime:fs | Available | FileRead / FileWrite |
runtime:net | Available | Net / NetListen |
runtime:http | Available | NetListen |
runtime:websocket | Available | NetListen |
runtime:serialization | Available | — |
runtime:system | Available | Run |