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

Ships in two shapes from one core: an embeddable library, which is deny-by-default, and the standalone CLI (esrun), which grants all capabilities.

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

Principles

  • ESM only. There is no CommonJS interop. Modules are real ES Modules and packages must expose an ESM entry point.

  • 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

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