Developer tools#Open source#CLI#Compiler#TypeScript#WASM

scriptc: compile TypeScript to native executables

Vercel Labs’ experimental scriptc compiles TS/JS into standalone native executables and WASI modules with no Node runtime, for shipping CLIs and small services.

Project facts

GitHub Ecosystem
Repositorygithub.com/vercel-labs/scriptc
License
Apache-2.0
Language
TypeScript
Stars
5,576
Data checked
2026-09-28

Snapshot figures reflect the check date and may change over time.

Shipping a Node utility to a teammate means they install a runtime first. scriptc, an experimental compiler from Vercel Labs, removes that step: it compiles TypeScript/JavaScript into standalone native executables that need no Node and no JavaScript engine. The pipeline runs TS/JS through a typed IR into readable C, then through LLVM to machine code, with WebAssembly (WASI) as a second target. The repo was created in July and, as of September 28, 2026, sits at about 5,576 stars with commits pushed the same day.

Core features

  • Static compilation: TS/JS → typed IR → C → LLVM IR → assembly → object files → native executable; the output embeds a small native runtime but no Node or JS engine.
  • Diagnostics, not silent failures: code that cannot compile statically is reported as a diagnostic instead of producing a broken binary; for npm packages and any-typed code, --dynamic embeds quickjs-ng explicitly.
  • Node API coverage: a solid slice of Node built-ins (like node:http) works natively, so ordinary server scripts usually compile as-is.
  • WASM output: compiles to WASI Preview 1 modules — a second distribution path for cross-platform delivery.
  • Tiered toolchain needs: --emit=ir|c|llvm requires only Node; assembly and object tiers use platform helpers, and ordinary executable builds skip the full C toolchain.

Typical use cases

  • A useful CLI you want teammates to run with one command, no Node install.
  • A small HTTP service going into containers or edge devices without a 100MB-plus runtime.
  • Internal tools for non-technical colleagues — without the “first install your environment” conversation.

Quick start

Requires Node.js 24 or newer (the compiler itself runs on Node; the output does not):

npm install -g scriptc

Write a hello.ts, then compile and run in one step:

$ scriptc run hello.ts
hello, world

Or produce a standalone executable:

$ scriptc build hello.ts -o hello
$ ./hello ctate
hello, ctate

Summary

For developers who want their JS/TS programs to ship as a single file: CLI authors, full-stack devs writing internal tools, and anyone delivering small services to edge devices. It is not trying to replace Node — long-running apps and code leaning on dynamic features will still fail to compile or fall back to --dynamic. The project is explicitly experimental, Apache-2.0 licensed, and written in TypeScript; before putting it in your build pipeline, run --emit=ir on your real code to see the coverage.