Vercel's scriptc: TypeScript-to-Native Compiler with No JS Engine

Original: Scriptc by Vercel: TypeScript-to-Native compiler, no JavaScript engine in binary

Why This Matters

A no-runtime TypeScript compiler could significantly reduce deployment size and cold-start latency for serverless and edge workloads.

Vercel Labs released scriptc, an open-source TypeScript-to-native compiler that produces self-contained native binaries with no Node.js, V8, or JavaScript engine included. The tool compiles ordinary TypeScript directly into small, fast executables, as demonstrated by a 178KB binary built in ~2ms.

Vercel Labs has published scriptc, a TypeScript-to-native compiler available on GitHub under the Apache-2.0 license. The project, which has already attracted over 1,200 stars, takes a fundamentally different approach from existing TypeScript runtimes: it compiles TypeScript source files directly into native machine code with no JavaScript engine bundled in the output binary.

The tool offers two primary commands: `scriptc run` for immediate execution of a TypeScript file, and `scriptc build` to produce a standalone native executable. In the repository's example, a recursive Fibonacci function compiles to a 178KB self-contained binary that runs in approximately 2ms.

The project is housed under the vercel-labs GitHub organization, indicating it is an experimental or early-stage initiative from Vercel. The repository includes a monorepo structure with packages, tests, documentation, and a changelog, suggesting active development across 286 commits. No Node.js or V8 dependency is required at runtime, distinguishing scriptc from tools like `pkg` or Bun that bundle a JavaScript engine within the output.

Source

github.com — Read original →