Overview

ES-Runtime is a secure, standards-based JavaScript runtime for the server, built on V8 in Rust. It runs standard ES Modules with a sandboxed module system.

Info

Two binaries. esrun runs your service and is deny-by-default — it reaches only what the command line names. esdev carries the development toolchain — TypeScript, bundling, tests, watch, a debugger — grants everything so the inner loop needs no flags, and never reaches production.

Warning

It is not Node.js-compatible — see Scope & non-goals and the runtime comparison.

Development

Development with esdev

Build, watch, test, and debug your projects.

Open Development docs →

Principles

  • ESM only. There is no CommonJS interop at runtime; modules are real ES Modules. A CommonJS dependency is converted at build time by esdev build, so what runs in production is the text that was reviewed.

  • Capabilities are explicit. Host powers — environment, filesystem, network — are granted one at a time. Nothing is ambient.

  • Standard surface. Host functionality is exposed through runtime: module imports rather than magic globals.

Install

Download a prebuilt, checksum-verified binary for your platform:

shTerminal
curl -fsSL https://raw.githubusercontent.com/Open-Tech-Foundation/ES-Runtime/main/install.sh | bash
powershellPowerShell
irm https://raw.githubusercontent.com/Open-Tech-Foundation/ES-Runtime/main/install.ps1 | iex

Prefer to build from source? See the README.

Run a script

Shell
# Run a module file
esrun app.js

# Evaluate an inline snippet (top-level await is supported)
esrun -e='console.log(await Promise.resolve(42))'

# Pass arguments through to the script
esrun app.js --name Ada

On your own machine, esdev takes the same file and the same flags — plus TypeScript, --watch, tests, bundling and a debugger. See esdev.

Two rules cover every flag:

--flag or --flag=valueA value is never a separate word — --timeout=500, not --timeout 500
esrun's flags come firstEverything after the script belongs to the script

Both are enforced, not conventions: a value arriving as a separate word would be indistinguishable from the script path, and a flag written after the script would silently do nothing. Details: esrun CLI.

Last updated on
Edit this page