Quench.
AGENTSNOVEMBER 2026

quench.run / updated

A JavaScript engine for AI agent Code Mode

Running model-written code inside the harness: embedded, small, no JIT, full JavaScript and TypeScript.

Quench is a JavaScript and TypeScript engine written in Rust that embeds in an agent harness as a library and runs interpreter only, with no JIT. With the JIT off it scores 1.49x to 2.57x the best of Node --jitless and Bun on all 8 V8-v7 benchmarks, and five of them peak at 6.4 to 8.2 MB. Test262: 53,353 passing, 0 failing.

What Code Mode needs

In Code Mode an agent writes a program and the harness runs it, instead of the model calling tools one at a time. A machine can host hundreds of such agents, each running code nobody reviewed. The engine has to live inside the harness, stay small per instance, run without a JIT, and run whatever the model wrote.

The QuickJS slot, with more speed

Today the usual split is QuickJS for simple scripts and V8 for complex ones. Quench aims at QuickJS's place (small, embedded, interpreter only) with an interpreter well ahead of the ones in V8 and JavaScriptCore. Quench has not been benchmarked against QuickJS yet; that comparison is next and will be published either way.

V8-v7, JIT offQuench RSSNode --jitless RSSBun JIT off RSSQuench score vs best
richards6.4 MB43.5 MB15.9 MB1.80x
deltablue6.9 MB45.4 MB24.5 MB1.50x
raytrace7.1 MB50.1 MB25.8 MB2.14x
navier-stokes7.6 MB49.9 MB20.2 MB2.57x
crypto8.2 MB43.6 MB25.4 MB2.06x

Peak RSS per process and score relative to the faster of Node and Bun, interpreter only in every engine (quench --no-jit, node --jitless, Bun with BUN_JSC_useJIT=0), one 4-core Linux machine, 14 November 2026. The other three benchmarks use more memory (earley-boyer 15.8 MB, regexp 16.2 MB, splay 58.7 MB against Bun's 54.9 MB). All rows and method.

Embeddable and Rust-native

quench-runtime is a Rust library. The harness creates a Runtime with its own Host, exposes its tools to the generated code as host functions, and can stop runaway code from another thread with an execution interrupt. Generated code runs in the harness's own process, with no subprocess and no IPC. It is not on crates.io yet and the API will still change.

No JIT required

--no-jit, which is also the library's default mode, runs the interpreter only, WebAssembly included. No machine code is generated while untrusted code runs. That takes JIT compiler bugs off the attack surface and leaves an attacker far less control over the machine code that executes, which Spectre-style attacks rely on. Every speed number on this page is with the JIT off. Quench is still not a sandbox on its own: isolation and resource limits come from your host.

Full JavaScript and TypeScript

Test262 passes 53,353 tests with 0 failing (details). TypeScript runs directly with no build step, and Node-compatible node: APIs are available. Code a model writes just runs, with no "Lua needs a C extension for that" step, and models write JavaScript and TypeScript far better than Lua.

Limits today

Quench is early: no packaged releases, Linux, built from source with Cargo. The embedding API is unstable. The per-instance memory of many runtimes in one process, and a comparison with QuickJS, are not published yet. On the broader JetStream 3 suite with the JIT off, Quench scores 34.3 against Node's 39.7 and Bun's 32.2, at 28.5 MB against 110.1 MB and 47.7 MB.

Questions

What is a good JavaScript engine for AI agent Code Mode?

Code Mode needs an engine that embeds in the harness, stays small per instance, can run without a JIT, and runs full JavaScript and TypeScript. Quench is built for that: a Rust library, interpreter only by default, Test262 53,353 passing and 0 failing. With the JIT off it scores 1.49x to 2.57x the best of Node --jitless and Bun on V8-v7.

Is Quench faster than QuickJS?

Not measured yet. Quench aims at the slot QuickJS fills (small, embedded, interpreter only) with more speed, and its interpreter already beats the interpreters in V8 and JavaScriptCore on all 8 V8-v7 benchmarks. A QuickJS comparison is next and will be published either way.

Why run agent code without a JIT?

A JIT writes new machine code at run time, shaped by the program it runs. Without one, JIT compiler bugs are off the attack surface and an attacker has far less control over the machine code that executes, which Spectre-style attacks rely on. The engine is still not a sandbox on its own: isolation and limits come from the host.

How much memory does each Quench run use?

With the JIT off, five of the eight V8-v7 benchmarks peak at 6.4 to 8.2 MB of RSS per process, against 43 to 50 MB for Node --jitless and 16 to 26 MB for Bun. The per-instance cost of many runtimes embedded in one process has not been published yet.

About Quench

Quench is a JavaScript, TypeScript and WebAssembly runtime written in Rust. Test262: 53,353 passing, 0 failing. Interpreter, two JITs, and AOT to native executables. It is MIT licensed, early, and built from source with Cargo. Source: github.com/butaji/quench. Machine-readable summary: llms.txt.

Related: benchmarks · JavaScript runtime in Rust · low-memory Node.js alternative · compile JavaScript to a native executable · Test262 conformance · JavaScript for AI agents