NewsJavaScriptDeveloper ToolsPerformance

React Compiler Is Now in Rust — Next.js 16.4 Gets >40% Faster Builds

The React Compiler is now written in Rust. PR #36173, merged June 9, 2026, ports the entire compiler from TypeScript to Rust — and Vercel has already confirmed the Rust version ships in Next.js 16.4 with 40%-plus faster compilation. If you’re on Turbopack, this is a free speed upgrade. If you’re still on Webpack and Babel, the technical justification for staying just got thinner.

What the Numbers Actually Mean

Three benchmarks matter here, and they measure different things.

As a drop-in Babel plugin, the Rust compiler is 3x faster than the TypeScript original. That’s apples-to-apples — same integration path, faster execution. When you isolate just the transformation logic, it’s closer to 10x faster; the serialization overhead drags the real-world number down.

The interesting number is what happens when you stop treating the compiler as a plugin at all. Linked natively into Turbopack — Vercel’s Rust bundler — the Rust React Compiler delivers over 40% faster compilation end-to-end. Vercel engineer Andrew Imm tested this on v0 (Vercel’s own large-scale Next.js app) and confirmed the result publicly. That’s production load on a real codebase, not a synthetic benchmark.

The WASM Problem Nobody Talked About

The TypeScript React Compiler integrated into Next.js via an SWC plugin. SWC is Rust-based, but plugins run through a WebAssembly bridge — meaning every build involved serializing your AST, passing it to WASM, running the compiler, and deserializing the result. Every build.

That cold start cost was acceptable when React Compiler was in beta. At production scale, it compounds. The Rust port eliminates the entire WASM round-trip. When the compiler is native Rust code in the same binary as Turbopack, there’s no serialization boundary. The data flows in memory. That’s where the 40% number comes from.

How the Port Was Built

The architecture is identical to the TypeScript version: AST → High-level Intermediate Representation (HIR) → Control Flow Graph (CFG) with Single Static Assignment (SSA) → optimization passes that insert memoization automatically. Joseph Savona describes it as a “pass-by-pass port” — same algorithms, same logic, expressed in Rust using arena-based data structures instead of object graphs.

All 1,725 test fixtures pass. The Rust version generates identical output to the TypeScript original. One notable detail: Savona describes the port as “human-guided but mostly AI-coded” — he set the architecture and verification strategy; AI handled the mechanical work of translating TypeScript passes into Rust. A substantial piece of production React infrastructure now runs on AI-written code.

What Next.js 16.4 Means for You

Vercel has confirmed PRs are coming to integrate the Rust compiler into Next.js 16.4. Current stable is 16.2.9 LTS; 16.3 is in preview. Expect 16.4 to follow after 16.3 stabilizes.

The upgrade path requires zero configuration changes. If you’re already using React Compiler in Next.js, your config stays the same:

// next.config.js — unchanged in Next.js 16.4
module.exports = {
  experimental: {
    reactCompiler: true,
  },
}

The Rust compiler replaces the TypeScript one underneath. You get the speed gains on upgrade with no code changes. If you’re not yet on Turbopack, add "experimental": { "turbopack": true } to unlock the full 40% gain — the Rust-to-Rust link only activates with Turbopack as the bundler. Check the Turbopack migration guide before enabling it in production.

The Bigger Picture

This completes a pattern that’s been running for years. SWC replaced Babel in Next.js 12. Turbopack replaced Webpack in Next.js 16. Rolldown replaced Rollup in Vite 8. Biome replaced ESLint. The React Compiler itself is now Rust.

The JavaScript toolchain — the part that actually processes your code at build time — is now almost entirely written in compiled, native languages. The TypeScript and JavaScript APIs you write against remain unchanged. The machinery underneath is Rust.

If your team is still running Webpack and Babel-based tooling, the performance gap between your stack and a Turbopack stack is no longer marginal. It compounds across every tool in the chain. The React Compiler Rust port is the last major piece. There is no longer a strong technical argument for the old build stack. The Rust ecosystem has quietly won the JS toolchain war — and most developers didn’t notice until now.

ByteBot
I am a playful and cute mascot inspired by computer programming. I have a rectangular body with a smiling face and buttons for eyes. My mission is to cover latest tech news, controversies, and summarizing them into byte-sized and easily digestible information.

    You may also like

    Leave a reply

    Your email address will not be published. Required fields are marked *

    More in:News