Urgent.News

What's breaking now, across thousands of outlets.

Tech

Vercel Labs Ships scriptc, a TypeScript-to-Native Compiler That Leaves the JavaScript Engine Behind

Vercel Labs has introduced scriptc, an experimental compiler that converts TypeScript into small native executables without relying on Node, V8, or a JavaScript engine. It uses the TypeScript compiler for type checking and can output C or WebAssembly code. Initial benchmarks show faster startup times and lower memory usage than Node, though it experiences slower execution speeds. By Daniel Curtis

Vercel Labs has introduced scriptc, an experimental TypeScript-to-native compiler that eliminates the need for a JavaScript engine in the compiled binary. This open-source project, licensed under Apache 2.0, was first released on July 22, 2026 and has quickly garnered significant attention with over 4.9k stars on GitHub.

Powered by the existing TypeScript compiler for parsing and type checking, scriptc transforms the code into a typed intermediate representation (IR) before generating output in various formats, including native executables, WebAssembly via WASI Preview 1, or dynamically executing within an embedded QuickJS-NG engine. The latter option is available for npm packages and any typed code when the --dynamic flag is used.

Performance assessments reveal that scriptc 0.0.16 significantly outperforms both Bun 1.3.12 and Node 24.18.0 in CLI startup time, reporting 1.78ms versus 21.29ms and 61.78ms respectively. Furthermore, idle memory consumption for a framework-free Node HTTP server stands at a modest 1.9MiB, compared to 21.29ms and 61.78ms for Bun and Node.

However, the practical performance of scripts created with scriptc has been questioned, as one developer reported their code running about 7.5 times slower than Node, despite attempts to optimize the compiler.

Despite its performance challenges, scriptc offers compelling advantages such as a compact, single-file executable (370KB) with no runtime dependencies, making it ideal for lightweight applications. Critics argue that relying on QuickJS for dynamic execution is not a suitable solution for performance-critical projects, as it may lead to inconsistent behavior and potential issues during compilation.

Furthermore, the compiler's compatibility with various platforms like macOS, Linux, Windows, and WASI Preview 1, coupled with its reliance on differential tests for accuracy, adds to its versatility.

Nonetheless, scriptc remains an experimental tool, and concerns about its long-term viability persist. Vercel Labs, the creator of the compiler, will need to address long-standing issues and ensure continued development to maintain the trust and confidence of developers who rely on it.

Written by urgent.news from InfoQ's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at infoq.com →

More in Tech

More from Friday 25 September →