# React Compiler in Rust

It’s official. React has merged its long-awaited Rust port of the **React Compiler** (formerly known as React Forget) into the main repository.

What started as an experimental research project by Joseph Savona and his team at Meta is now an absolute reality. If you’ve been tracking the frontend tooling space, you knew this day was coming—but seeing it land as a stable **v1.0 release** is a massive milestone for the entire ecosystem.

## The Core from Typescript to Rust

The original TypeScript version of the React Compiler was already incredibly impressive. Its main selling point? **Automatic memoization**. It eliminates the need for manual optimization hooks like `useMemo` and `useCallback` by automatically figuring out what to cache during the build process. It completely removes the developer overhead of tracking dependency arrays.

But scaling that logic across Meta’s monstrous codebase demanded a level of speed and rock-solid reliability that TS just couldn't sustain.

So, the team did the smart thing: they kept the exact same high-level architecture (including the High-Level Intermediate Representation (HIR), control-flow graphs, and Static Single Assignment (SSA) form) and **rewrote the core in Rust**.

### The Mind-Boggling Stats

The engineering discipline behind this rewrite is exceptional. By utilizing arena allocation and index-based data structures, the team achieved incredible results

*   **Production-Ready (v1.0):** This isn't beta tech. It has been battle-tested in massive production environments like Meta’s Instagram and the Meta Quest Store, yielding up to **12% faster initial loads** and drastically reduced render times.
    
*   **Insane Speed:** It runs **3x faster** even when used as a Babel plugin, with the core transformation logic hitting up to **10x speedups**.
    
*   **Precision:** All 1,725 test fixtures pass seamlessly, and the intermediate states match the TypeScript version almost byte-for-byte.
    
*   **AI-Assisted Engineering:** Moving a codebase this size is no joke. The massive port of over **123,000 lines of code** was executed primarily using **AI**, with human engineers firmly in the driver's seat overseeing architecture, testing strategies, and strict code quality verification.
    

> **Don't Panic: Rust is for the Tooling, TypeScript is for You.** To be absolutely clear

Rust isn't replacing TypeScript for application development. The shift to Rust applies *only* to the compiler tooling under the hood. You will continue to write your React components in TS or JS. They work together synergistically TS handles your type safety, and Rust handles your build speed

## The Rust Rollout: Ecosystem Integration

The integration has already started landing in mainstream libraries and build tools. By building native integrations for **SWC** and **OXC**, the compiler can bypass Babel entirely, allowing modern bundlers to run at maximum velocity.

Here is where the ecosystem stands right now

<table style="min-width: 75px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><td colspan="1" rowspan="1"><p><strong>Tool / Ecosystem</strong></p></td><td colspan="1" rowspan="1"><p><strong>Update Status</strong></p></td><td colspan="1" rowspan="1"><p><strong>What's New?</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Oxlint 1.70</strong></p></td><td colspan="1" rowspan="1"><p><strong>Released</strong></p></td><td colspan="1" rowspan="1"><p>Adds a <code>react/react-compiler</code> rule. This experimental rule leverages the Rust port to surface the same diagnostics as <code>eslint-plugin-react-compiler</code>. Early adopters like <em>React Spectrum</em> and <em>Sanity</em> are already reporting <strong>5–6x performance improvements</strong>.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>SWC</strong></p></td><td colspan="1" rowspan="1"><p><strong>Released</strong></p></td><td colspan="1" rowspan="1"><p>Merged and released in Rust crate <code>v68.1</code>, exposing a brand new <code>jsc.transform.reactCompiler</code> configuration option.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Rspack</strong></p></td><td colspan="1" rowspan="1"><p><strong>Beta Dropping</strong></p></td><td colspan="1" rowspan="1"><p>The upcoming <code>v2.1</code> release bumps SWC to support the compiler. The <code>builtin:swc-loader</code> will support the compiler natively in Rust. The Rspack team noted the Rust version runs <strong>7–13x faster</strong> than Babel.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Rolldown / Vite</strong></p></td><td colspan="1" rowspan="1"><p><strong>PR Merged</strong></p></td><td colspan="1" rowspan="1"><p>Options are now exposed! Vite and Rolldown users will soon be able to natively toggle the <code>transform.reactCompiler</code> option.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Next.js</strong></p></td><td colspan="1" rowspan="1"><p><strong>In Canary</strong></p></td><td colspan="1" rowspan="1"><p>A new PR adds experimental Turbopack React Compiler support via the <code>experimental.turbopackRustReactCompiler</code> flag. It's live in <code>v16.3.0-canary.52</code> and expected to hit stable in Next.js 16.4.</p></td></tr></tbody></table>

The React team kept the public API nice, clean, and pragmatic for the ecosystem, making adoption as painless as possible. If you're shipping React at any real scale, your build pipelines are about to get a lot lighter, and your users are going to get a snappier experience.

Rust is officially eating the frontend tooling world, and honestly? We are completely here for it.

Here is the PR for react compiler

%[https://github.com/react/react/pull/36173]
