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

ModuleStatusCapability
runtime:processAvailableEnv / Signals
runtime:pathAvailableEnv
runtime:fsAvailableFileRead / FileWrite
runtime:netAvailableNet / NetListen
runtime:httpAvailableNetListen
runtime:websocketAvailableNetListen
runtime:serializationAvailable
runtime:systemAvailableRun
Last updated on
Edit this page