Scriptc by Vercel: TypeScript-to-Native compiler, no JavaScript engine in binary(github.com)
276 points by maxloh 1 day ago | 153 comments
tl;dr: Scriptc is a Vercel tool that compiles standard TypeScript into small native binaries (170KB–3MB) with ~2ms startup, no bundled JS engine by default, using clang and a custom C runtime. It uses the real TypeScript compiler for type-checking and covers most of the language plus Node APIs (fs, http, tls, fetch, etc.); code that can't be statically compiled is either rejected with diagnostics or run via an embedded QuickJS engine in an opt-in `--dynamic` mode. Correctness is enforced via differential testing against Node (byte-for-byte stdout/stderr matching) and AddressSanitizer runs.
HN Discussion:
  • Vercel is chasing hype with a vibecoded, unmaintained project that solves no real problem
  • TypeScript's value comes from the npm ecosystem, making native compilation impractical for real projects
  • Skepticism about progress speed compared to similar serious projects like Porffor
  • ~Benchmarks confirm tradeoffs: slower runtime but much better startup, memory, and binary size
  • Promising approach that enables TypeScript-to-native workflows and potential mobile/embedding use cases