React Compiler Rust Port: 3x Faster Builds, AI-Powered Migration
Industry Analysis · June 13, 2026

React Compiler Goes Rust:
3x Faster, AI-Powered, and What It Means

PR #36173 landed on June 10 — 435 commits rewriting the React Compiler from TypeScript to Rust. The majority of the code was written by AI. All 1,725 fixtures pass. Here's the full analysis.

Oleg Maximov June 13, 2026 10 min read

The Big Picture: What Happened

On June 10, 2026, Joseph Savona — one of the core React team members at Meta — merged PR #36173 into the main React repository. The pull request represents one of the most significant under-the-hood changes to React's tooling ecosystem: a full port of the React Compiler from TypeScript to Rust.

The React Compiler (formerly known as React Forget) is the automatic memoization tool that eliminates the need for manual useMemo, useCallback, and React.memo calls. If you're not familiar with how it works as a user, I covered that in my React Compiler guide for React 19.2 — this article focuses on the Rust port itself: why it was done, how the architecture works, the performance gains, and what it signals for the future of the React ecosystem.

435
Commits in PR #36173
1,725
Fixtures Passing
3x
Faster as Babel Plugin
~10x
Faster Transformation Logic

AI-Assisted Code Porting at Scale

The majority of the 435 commits were generated by AI. Humans guided the architecture and reviewed the output. This is one of the largest real-world demonstrations of AI-assisted refactoring in core infrastructure software — the entire TS-to-Rust translation of a production-grade compiler with arena-based memory management, Babel/OXC/SWC integration points, and per-pass IR comparison tests. The implications for how we approach framework rewrites are significant.

Why Rust? The Performance Motivation

The React Compiler's TypeScript implementation worked well for small codebases, but as the compiler analyzed larger and larger component trees, the overhead of JavaScript's garbage-collected memory model became apparent. The compiler performs sophisticated static analysis — building intermediate representations, control flow graphs, and SSA form — all of which create and destroy many short-lived objects during compilation.

In JavaScript, this allocation pattern creates pressure on the garbage collector. Even with V8's optimized generational GC, the TypeScript version of the compiler exhibited latency spikes on large files. The Rust port solves this with arena-based allocation — a pattern where objects are allocated in contiguous memory regions and freed all at once when the arena is dropped.

Arena-Based Data Structures

The key architectural difference between the TypeScript and Rust versions is the memory management strategy. The TypeScript version used JavaScript objects and arrays for its internal data structures (HIR nodes, basic blocks, SSA variables). The Rust version replaces these with arena allocators:

// TypeScript version: individual heap allocations
interface BasicBlock {
  id: number;
  statements: Statement[];
  predecessors: number[];
  successors: number[];
}

// Rust version: arena-allocated
struct BasicBlock {
  id: u32,
  statements: ArenaVec<Statement>,
  predecessors: SmallVec<[u32; 4]>,
  successors: SmallVec<[u32; 4]>,
}

struct FunctionArena {
  blocks: Arena<BasicBlock>,
  statements: ArenaVecStore<Statement>,
  // ... all per-function allocations
}

impl Drop for FunctionArena {
  fn drop(&mut self) {
    // All memory freed at once — no per-object GC
  }
}

The difference is dramatic. In the TypeScript version, compiling a large component function creates thousands of individual heap allocations — each tracked by the GC. In the Rust version, all the per-function intermediate data lives in a single arena that is freed atomically when the function is fully processed. No GC overhead, no allocation tracking, no latency spikes.

Architecture: Same Structure, Better Foundation

The Rust port does not change the compiler's architecture. It preserves the same pipeline that the TypeScript version uses:

Every one of the 1,725 test fixtures passes — and the test suite is notably thorough: it checks not just the final output but also the intermediate IR state after each compiler pass. This means correctness is verified at every stage of the pipeline, not just at the end.

Three Integration Targets

One of the important design decisions is that the Rust port ships with three integration targets, giving developers and framework authors flexibility:

1. Babel Integration (JavaScript Wrapper)

The Babel plugin calls into the Rust binary via FFI (Foreign Function Interface). From a user's perspective, nothing changes — you add the same Babel plugin to your config. Under the hood, the plugin compiles the JavaScript file by passing it to the Rust compiler, which processes the AST directly. This is the integration that's 3x faster than the pure-TypeScript version.

2. OXC Integration

OXC is the Rust parser and toolchain from VoidZero (the team behind Vite). The React Compiler can now run directly on OXC's AST without any JavaScript interop. For projects already using OXC (available through Rolldown and future Vite versions), this eliminates the serialization overhead entirely — the parser and compiler share the same memory space.

3. SWC Integration

SWC is another Rust-based compiler toolchain, widely used in Next.js and other frameworks. The React Compiler can consume SWC's parsed AST and emit optimized output. This makes the compiler available to the entire SWC ecosystem without additional JavaScript bridge costs.

The three-target approach is strategically important. It means the React Compiler is not tied to any single build tool — it works in Babel-based projects (the majority of existing React apps), OXC-based projects (the future of the Vite ecosystem), and SWC-based projects (Next.js, Turbopack). This is a bet on ecosystem neutrality.

Performance Benchmarks: What the Numbers Say

The headline numbers are impressive, but let's break down what they mean in practice:

It's worth noting that the "3x Babel plugin" number accounts for the overhead of the JavaScript-to-Rust FFI bridge. The OXC and SWC integrations, which share memory with the parser, should be even faster — though official benchmarks for those paths haven't been published yet.

The AI Angle: Code Porting at Scale

The fact that the majority of the 435 commits were written by AI (with humans guiding the architecture) deserves its own analysis. This is not a toy example — this is a production compiler that runs in thousands of build pipelines, processing millions of lines of React code daily.

The workflow, as described in the PR, followed this pattern:

  1. Humans designed the architecture — Rust module structure, trait definitions, arena allocation strategy
  2. AI generated the translation of individual TypeScript modules to Rust, following the established patterns
  3. Humans reviewed and refined the AI output, catching subtle correctness issues
  4. The comprehensive test suite (1,725 fixtures) validated that the output was functionally identical
  5. Performance benchmarks verified the expected gains

This is a template that will likely be repeated across the JavaScript ecosystem. If a complex compiler can be ported from TypeScript to Rust with AI assistance in a matter of weeks, then many more tools can follow the same path. The VoidZero acquisition by Cloudflare (which I covered in my VoidZero analysis) is part of the same trend — the JavaScript tooling ecosystem is aggressively pursuing native performance.

What This Means for the React Ecosystem

The Rust port completes a broader trend in the React and JavaScript build tooling landscape. Let's connect the dots:

Rust Is Becoming the Standard for Build Tools

Consider the tools that power modern React development:

Every major build performance bottleneck in the React stack is being rewritten in Rust. The React Compiler was the last significant TypeScript-only tool — and now it's Rust-native too.

Improved Developer Experience

For the average React developer, the tangible benefits are:

What Stays the Same

It's important to emphasize what does not change:

For a full understanding of how to use the React Compiler effectively (whether TypeScript or Rust), see my React Compiler usage guide with code examples and migration strategies.

Looking Ahead: What's Next?

The Rust port of the React Compiler opens several interesting possibilities:

Deeper OXC Integration

With VoidZero now part of Cloudflare (and OXC being their parser of choice), the OXC integration path for the React Compiler could become the default for new projects. The combination of OXC's Rust parser + the Rust compiler eliminates all JavaScript interop overhead, making the combined pipeline significantly faster than the current Babel route.

Wider Adoption in Next.js

Next.js already uses SWC for compilation. The SWC integration means the React Compiler can be embedded directly in Next.js's build pipeline without a separate Babel step. This could make the React Compiler enabled by default in future Next.js versions with zero configuration.

Cross-Ecosystem Impact

The success of this AI-assisted port may inspire other projects to attempt similar rewrites. If a compiler as complex as the React Compiler can be ported successfully, then projects like TypeScript's own type checker, ESLint rules, or Prettier plugins could follow the same pattern.

FAQ

What is the React Compiler Rust port?
It's a complete rewrite of the React Compiler from TypeScript to Rust, merged as PR #36173 on June 10, 2026. The port preserves the same architecture (HIR, CFG, SSA) but uses arena-based data structures for memory efficiency. It was primarily written by AI with human-guided architecture, spans 435 commits, and all 1,725 test fixtures pass.
Is the Rust port production-ready?
The Rust port is marked as experimental under the MIT license. While all 1,725 fixtures pass (both output and per-pass IR comparison), it's recommended to test against your specific codebase before full production adoption. The TypeScript version remains available and stable for users who prefer to wait.
Does the Rust port support Babel, SWC, or OXC?
Yes, all three. The compiler ships with integrations for Babel (JavaScript FFI wrapper), OXC (the Rust parser from VoidZero), and SWC (the Rust compiler used by Next.js). This ensures compatibility across the modern build tool ecosystem regardless of which parser your project uses.
How much faster is the Rust version compared to TypeScript?
The Rust port is approximately 3x faster when used as a Babel plugin and roughly 10x faster for the core transformation logic. The speedup comes primarily from arena-based memory management, which eliminates garbage collection overhead during compilation. OXC and SWC integrations are expected to be even faster since they share memory with the parser.
Was the React Compiler Rust port written by AI?
Yes, the majority of the code was generated by AI, with humans guiding the architectural decisions and reviewing the output. This represents one of the largest real-world applications of AI-assisted code porting in core infrastructure software. The approach has proven that complex compilers can be migrated between languages effectively with AI support.
Does this affect how I use the React Compiler?
No — from a user's perspective, nothing changes. Your Babel config, Next.js setup, and Vite plugins work identically. The Rust port outputs the same optimizations. Manual useMemo and useCallback still take precedence. The only difference you'll notice is faster builds. For a complete guide on using the React Compiler effectively, see my React Compiler usage guide. Important security note: If you're running React Server Components, ensure you've patched the critical CVE-2025-55182 (React2Shell) vulnerability — see my React RCE vulnerability guide for details.
What does this mean for the future of React tooling?
The Rust port completes the migration of the React build pipeline to Rust-native performance. Combined with SWC (Next.js), OXC (Vite/VoidZero), Rolldown, and Turbopack, the entire toolchain is now Rust-native. This trend means faster builds, lower memory overhead, and a more sustainable foundation for the React ecosystem. The VoidZero-Cloudflare acquisition and the AI-assisted porting approach both point toward a tooling landscape that is increasingly performance-oriented and AI-enhanced.

Need Expert React Development?

The React ecosystem is evolving rapidly — from the React Compiler's Rust port to VoidZero-Cloudflare, Angular's OnPush-by-default approach, and the expanding Rust tooling landscape. Navigating these changes requires a developer who stays current with the ecosystem and understands how to choose the right tools for your specific project.

I'm a full-stack web developer with 20+ years of experience building production React applications. Whether you're starting a new project, migrating an existing codebase, or need guidance on adopting the React Compiler, I'm happy to help. Reach out to me for a free initial consultation.

I also write in-depth technical articles on the tools and frameworks that matter — follow my articles for the latest in web development.

Contact

Let's discuss your React project

Need a React developer who stays on top of the ecosystem? Tell me about your project — I'll provide honest advice and a preliminary estimate. Free of charge.