Vercel Labs released scriptc, an open source compiler that turns TypeScript code into native executables without bundling Node.js, V8 or any JavaScript engine, according to the project's GitHub repository.
The project reports startup times of about 2.4 milliseconds, compared with roughly 47 milliseconds for Node, and binaries in the 170 to 200 kilobyte range, compared with 60 to 100 megabytes for a Node single executable application, the repository says.
Scriptc supports a large share of Node's standard library, including fs, http, https, crypto, streams and fetch, and adds what the project calls checked casts, which insert runtime validation for parsed JSON and other external data, according to the repository. A comptime function can run TypeScript at compile time, and a dedicated flag provides direct C ABI bindings for native code.
Code that cannot compile statically falls back to an embedded QuickJS engine for dynamic execution, or is rejected with diagnostics explaining why, the repository says. A coverage command reports how much of a given program compiles statically versus needing the dynamic path.
The project is released under the Apache 2.0 license and has drawn more than 3,100 GitHub stars. The repository cites more than 800 differential tests against Node's behavior and memory safety verification under AddressSanitizer.
For teams shipping command line tools in TypeScript who don't want to distribute an 80 megabyte Node binary or pay V8 startup cost on a script that runs a thousand times a day in CI, scriptc is a concrete alternative that has already been tested against Node's own behavior rather than one that leaves developers to discover the gaps themselves.