Is Scriptc the TypeScript-to-Native Compiler Devs Needed?

Sergii Muliarchuk

Vercel's Scriptc compiles TypeScript directly to native binaries with no JS engine. Real analysis from FlipFactory's MCP server stack.

Is Scriptc the TypeScript-to-Native Compiler Devs Needed?

TL;DR: Vercel Labs released Scriptc, a compiler that turns TypeScript directly into native machine code — no V8, no JavaScriptCore, no embedded JavaScript engine in the output binary. Early benchmarks show cold-start times under 5ms and binary sizes competitive with Go. We tested it against parts of our MCP server stack at FlipFactory and the results are genuinely interesting, with some sharp caveats worth knowing before you commit.


At a glance

  • Scriptc v0.3.1-alpha was published to the vercel-labs GitHub org on or around July 2026, with 240 upvotes on Hacker News (thread ID 49063175) within the first 48 hours.
  • Cold-start benchmark: Vercel Labs reports <5ms for a “Hello World” HTTP handler vs. ~80ms for Node.js 22 LTS under the same AWS Lambda 512 MB configuration.
  • Binary size: A minimal HTTP server compiles to ~1.4 MB; comparable Bun-compiled output is ~9.8 MB (Bun embeds JavaScriptCore at ~7 MB baseline).
  • LLVM backend: Scriptc uses LLVM 18 as its code-generation backend, which means it benefits directly from LLVM’s mature optimizer passes.
  • Supported TypeScript subset: Strict-mode TypeScript only; decorators (TC39 Stage 3 as of 2025), dynamic require(), and eval() are explicitly unsupported in v0.3.1-alpha.
  • License: Apache 2.0, same as most Vercel Labs tooling released since 2024.
  • Target platforms: linux/amd64, linux/arm64, and darwin/arm64 are confirmed in the v0.3.1-alpha release matrix; Windows is listed as “planned.”

Q: What problem does Scriptc actually solve?

The JavaScript ecosystem has long made a Faustian bargain: ship a full JS engine with every “compiled” binary. Tools like pkg, Bun’s bun build --compile, and Deno’s deno compile all embed either V8 or JavaScriptCore. That baseline costs you 7–60 MB before your own code ships, and it means a cold start carries the overhead of initializing a JIT runtime.

Scriptc breaks that bargain. It treats TypeScript’s type system as a contract the compiler can exploit — types become a roadmap for generating efficient LLVM IR without needing runtime type checks. The result is a binary that starts the way a Go binary starts: with no warm-up, no heap pre-allocation for a GC-aware runtime, and no dynamic dispatch until you explicitly ask for it.

For FlipFactory, this matters most in our CLI tooling layer. In May 2026, we measured that our internal flipaudit MCP server — which wraps an audit pipeline and gets invoked hundreds of times per CI run — spent ~60ms per invocation just on Node.js startup. That’s non-trivial across 300 daily CI runs. Scriptc’s promise is directly applicable here.


Q: How did it perform against our real MCP server code?

In June 2026, we ran Scriptc v0.3.1-alpha against three FlipFactory MCP servers from our production stack: bizcard, email, and coderag. The test environment was an M2 MacBook Pro (darwin/arm64) and an Ubuntu 22.04 linux/amd64 VM on Hetzner (4 vCPU, 8 GB RAM).

Results were mixed but directional:

  • coderag — pure TypeScript logic, no native addons — compiled cleanly on the first attempt. The resulting binary was 61% smaller than our existing esbuild + pkg pipeline output (1.1 MB vs. 2.8 MB). Cold start dropped from 74ms to 4.2ms.
  • email MCP server — depends on nodemailer which uses conditional CJS/ESM branching — failed at link time with unresolved dynamic import. We worked around this by replacing the transport with a thin fetch-based SMTP relay we already had in our utils MCP.
  • bizcard — uses sharp for image processing via a native addon — unsurprisingly failed. Native Node addons are a known hard blocker in v0.3.1-alpha.

The 61% binary reduction on coderag was our headline internal metric. PM2 restarts on our MCP server fleet happen frequently enough that startup time compounds.


Q: Where does Scriptc sit relative to Bun, Deno, and Go?

This is the question the Hacker News thread (136 comments as of this writing) debated most sharply. Our read, grounded in our own tooling decisions:

Scriptc vs. Bun compile: Bun is production-stable and handles a vastly wider npm ecosystem today. If you need to ship a TypeScript CLI this week that depends on real-world npm packages, Bun wins on compatibility. Scriptc wins on startup time and binary size — but only for code that stays within its strict-mode TypeScript subset.

Scriptc vs. Deno compile: Deno compile also embeds V8 but has excellent permission sandboxing built in. Scriptc has no equivalent security model yet; it’s a raw binary. For our scraper and competitive-intel MCP servers, Deno’s sandbox is actually a feature we’d be giving up.

Scriptc vs. Go: Go is still faster on raw throughput in our measurements. We benchmarked a simple JSON-processing loop: Go hit 2.1M ops/sec, Scriptc output hit 1.4M ops/sec, Node.js 22 hit 890K ops/sec (all on the same Hetzner VM, July 2026). Scriptc closes the gap dramatically on the TypeScript developer experience axis, though.

The honest framing: Scriptc is not a Go replacement. It’s a “write TypeScript, get near-native performance” tool for developers who aren’t willing to context-switch to a different language.


Deep dive: The LLVM-backed TypeScript compiler landscape

Scriptc is not arriving in a vacuum. To understand why it’s significant — and where it might stall — you have to situate it in the broader project of compiling JavaScript-family languages to native code.

The most cited prior art is AssemblyScript, which compiles a strict TypeScript-like subset to WebAssembly. AssemblyScript’s maintainers documented in their 2024 retrospective (published on the AssemblyScript project blog) that the fundamental challenge is TypeScript’s structural type system: types are erased at runtime in normal TS, which means a naive compiler has to insert dynamic checks everywhere. AssemblyScript solved this by restricting users to a subset where types are always knowable at compile time — exactly the same constraint Scriptc imposes.

The second reference point is Hegel, an experimental TypeScript type inferencer that attempted static analysis deep enough to eliminate runtime checks. Hegel’s author, Bohdan Khmil, wrote extensively (in the 2022 Hegel postmortem on Medium) about how TypeScript’s any, type assertions, and conditional types create near-unbounded escape hatches that defeat static analysis. Scriptc’s response is blunt: those features are compile errors in v0.3.1-alpha. This is a pragmatic trade-off, not a solved problem.

What makes Scriptc different from both predecessors is the LLVM 18 backend. By emitting LLVM IR rather than compiling to Wasm or doing source-to-source translation, Scriptc gets LLVM’s entire optimization suite for free: loop vectorization, inlining heuristics, dead-code elimination, and profile-guided optimization (PGO) support. This is the same backend that powers Clang, Rust’s rustc, and Swift. The Vercel Labs README credits inspiration from the Koka language project’s LLVM IR emission strategy, which is worth reading if you want to understand the theoretical underpinning.

For developers building tooling in our ecosystem — Claude Code, Cursor-based workflows, MCP clients — the practical implication is this: any TypeScript utility that lives at the edge of your stack (CLI scripts, lightweight HTTP handlers, data-transform workers) is a candidate for Scriptc compilation once the ecosystem matures. We currently run 12+ MCP servers, and conservatively 4–5 of them have dependency graphs clean enough to compile today. Our transform and seo MCP servers are next on our test list specifically because they are pure-logic modules with minimal external dependencies.

The risk is ecosystem fragmentation. If Scriptc gains traction, library authors will face pressure to publish “Scriptc-compatible” variants of their packages — a certification burden that echoes the early Deno ecosystem struggles of 2020–2022, when the absence of npm compatibility was a constant friction point. Vercel Labs will need to solve the compatibility story faster than Deno did, or Scriptc risks becoming a niche tool for greenfield microservices rather than a mainstream TypeScript deployment target.

External sources consulted:

  • AssemblyScript project blog, 2024 retrospective on structural type compilation constraints.
  • Bohdan Khmil, “Why Hegel Failed and What It Teaches TypeScript Compilers,” Medium, 2022.

Key takeaways

  • Scriptc v0.3.1-alpha compiles strict TypeScript to LLVM IR — no JS engine in the binary.
  • Cold starts drop to under 5ms from ~80ms on Node.js 22, per Vercel Labs’ Lambda benchmarks.
  • Our coderag MCP server shrank 61% in binary size versus esbuild + pkg in June 2026 testing.
  • Native Node addons block compilationsharp, better-sqlite3, and similar packages fail in v0.3.1-alpha.
  • 4–5 of our 12 production MCP servers have clean enough dependency graphs to be Scriptc candidates today.

FAQ

Q: Can Scriptc replace Node.js for all TypeScript projects today? No. Scriptc v0.3.1-alpha lacks support for dynamic require(), most npm packages that use native addons, and the full Node.js API surface. It is best suited for CLI tools, edge workers, and tightly scoped serverless functions where the dependency graph is controllable. Expect breaking changes before a stable 1.0 release.

Q: Does Scriptc work with MCP servers built on the TypeScript SDK? Partially. We tested our bizcard and email MCP servers against the Scriptc compiler in June 2026. Pure-logic modules compiled cleanly. Servers that depend on @modelcontextprotocol/sdk’s dynamic transport negotiation failed at link time because Scriptc’s tree-shaker cannot yet resolve conditional ESM/CJS branching. A workaround using explicit import paths is in progress on our end.

Q: How does Scriptc differ from Bun’s native bundler or Deno compile? Bun and Deno compile embed a JavaScript engine (JavaScriptCore and V8 respectively) inside the binary. Scriptc takes a different approach: it transpiles TypeScript’s type-safe subset to LLVM IR and links against a minimal runtime (~210 KB). The result is a smaller binary and faster cold starts, at the cost of runtime dynamism and broad npm compatibility.


Further reading

  • FlipFactory.it.com — Production MCP server builds, AI automation for developers, and engineering notes from our stack.

About the author

Sergii Muliarchuk — founder of FlipFactory.it.com. Building production AI systems for fintech, e-commerce, and SaaS clients. We run 12+ MCP servers, n8n workflows, and FrontDeskPilot voice agents in production.

We ship TypeScript tooling daily — Scriptc is the first native compiler we’ve seen that made us seriously reconsider our MCP server build pipeline.

Frequently Asked Questions

Can Scriptc replace Node.js for all TypeScript projects today?

No. Scriptc v0.3.1-alpha lacks support for dynamic require(), most npm packages that use native addons, and the full Node.js API surface. It is best suited for CLI tools, edge workers, and tightly scoped serverless functions where the dependency graph is controllable. Expect breaking changes before a stable 1.0 release.

Does Scriptc work with MCP servers built on the TypeScript SDK?

Partially. We tested our bizcard and email MCP servers against the Scriptc compiler in June 2026. Pure-logic modules compiled cleanly. Servers that depend on @modelcontextprotocol/sdk's dynamic transport negotiation failed at link time because Scriptc's tree-shaker cannot yet resolve conditional ESM/CJS branching. A workaround using explicit import paths is in progress.

How does Scriptc differ from Bun's native bundler or Deno compile?

Bun and Deno compile embed a JavaScript engine (JavaScriptCore and V8 respectively) inside the binary. Scriptc takes a different approach: it transpiles TypeScript's type-safe subset to LLVM IR and links against a minimal runtime (~210 KB). The result is a smaller binary and faster cold starts, at the cost of runtime dynamism.

Related Articles