« All posts

Scriptc by Vercel compiles TypeScript straight to native, no JS engine

Vercel's scriptc compiles real TypeScript into native binaries with no JS engine, matching Node byte-for-byte while cutting startup time and memory use.

Vercel has released scriptc, a compiler that turns ordinary TypeScript into self-contained native executables with no Node, V8, or embedded JavaScript engine by default. Type checking runs through the real TypeScript compiler, and compiled output is verified to behave byte-for-byte like Node.

The compiler classifies every statement as statically compilable, dynamically runnable, or rejected, and exposes this via a scriptc coverage command reporting the exact percentage and blockers. Anything that can't compile statically can fall back to an embedded ~620KB quickjs-ng engine with --dynamic; everything else fails with a specific diagnostic rather than being silently miscompiled.

The performance gap is substantial: startup around 2.4ms versus Node's ~47ms, static binaries of 170-200KB versus Node SEA's 60-100MB, and RSS memory of 1-4MB versus Node's 67-116MB, all measured on Apple M-series hardware. Correctness is enforced by a differential test suite of 800+ programs run under both Node and native binaries, plus a separate AddressSanitizer-based memory-safety lane.

For engineers, scriptc supports much of Node's API surface — fs, http/https/tls, crypto, fetch — plus npm dependencies via --dynamic, alongside escape hatches like comptime for build-time execution and native FFI for direct C ABI calls, all with explicit, documented boundaries.

This synthesis was produced from its source by AI; there is no human editor or manual review step. How we work