API reference
ES-Runtime is ESM-only and deny-by-default: a run reaches what the command line that started it named, and nothing else. 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:context | Available | — |
runtime:diagnostics | Available | DiagnosticsObserve / DiagnosticsDetail |
runtime:process | Available | Env / Signals |
runtime:path | Available | Env (only to read cwd()) |
runtime:fs | Available | FileRead / FileWrite |
runtime:net | Available | Net / NetListen |
runtime:http | Available | NetListen |
runtime:websocket | Available | NetListen |
runtime:serialization | Available | — |
runtime:hashing | Available | — (Entropy for password.hash) |
runtime:system | Available | Run |
runtime:workers | Available | FileRead / FileWrite |
runtime:wasi | Available | — to construct; its file calls need FileRead / FileWrite |
runtime:build | Available — esdev only | FileRead (FileWrite to write()) |
runtime:test | Available — esdev only | — |
runtime:watch | Available — esdev only | FileRead |