Vercel's Scriptc compiles TypeScript to native, no JS engine

vercel-labs lowers typed TS through C and clang: ~2.4ms starts, sub-200KB binaries. A QuickJS fallback and an AI-written core temper the pitch.

Nowline JUL 29 12:00 AM banner

Top AI stories from the last hour

Top AI stories from the last hour

Copy markdown

  • What it actually does

    Scriptc, from vercel-labs (Apache-2.0), compiles well-typed TypeScript into an internal typed IR, lowers it to C, then hands off to clang for a native binary — no Node, no V8 in the output. Static code lands in 170–200KB with ~2.4ms cold starts versus Node's ~47ms, and single-digit-MB memory versus Node's 70–100MB+.

  • The QuickJS asterisk

    "No JS engine" only holds for code Scriptc can prove safe. Anything it can't — and TypeScript's `any` is everywhere; one figure cited on HN is ~79% of repos — falls back to an embedded ~620KB quickjs-ng interpreter. Pull in typical npm packages that ship untyped JS plus `.d.ts`, and you're back on the interpreted path.

  • Built by AI, and it shows

    The compiler is 900k+ lines generated with heavy AI assistance, and reviewers flagged the tells: doubles instead of integers by default, reference-counting GC, and no credible benchmarks yet. It's openly labeled a young experiment — a spike to watch, not a production toolchain.

  • What you could ship this weekend

    The sweet spot is small, dependency-light CLI tools — including the TS wrappers many builders put around AI APIs, agents, and MCP servers. A ~2.4ms start beats Node's cold start for serverless and edge AI endpoints, and a sub-200KB binary drops into a container or Lambda with almost no weight.

  • Or just reach for Rust or Go

    Several builders pushed back: if you're writing zero-dependency TS for native anyway, Rust, Go, or AssemblyScript already do this with mature toolchains. Scriptc's bet is that staying in TypeScript is worth more than raw maturity — reason enough to try it, not to rewrite on it.