Pro
Covers React
Explainer Published 15d ago ·

The React Compiler now runs in Rust inside Vite, and it is finally fast enough to leave on

An oxc-based transform runs the React Compiler more than ten times faster than the Babel version, and @vitejs/plugin-react v6.1.0 wires it into Vite behind a single compiler flag. The build-time cost that made auto-memoization hard to justify at scale is now small.

By Stackmaven

The React Compiler, the build-time tool that automatically memoizes components so you stop hand-writing useMemo and useCallback, has always carried a tax: it ran on Babel, and Babel is slow. As of mid-August that tax mostly disappeared. The oxc project shipped oxc-transform-react, a Rust implementation the team clocks at more than ten times faster than babel-plugin-react-compiler, and @vitejs/plugin-react v6.1.0 now turns it on with a single option. The compiler is no longer the thing that makes your build crawl.

What actually shipped

On August 18, oxc announced React Compiler support across both its linter and its transform package. The relevant piece for build performance is oxc-transform-react, which applies the compiler’s memoization pass directly on oxc’s own syntax tree instead of round-tripping through a Babel representation. oxc’s Boshen puts the gain in plain numbers: files that took around 100 milliseconds to compile now take around 10, and the Rust version is roughly twice as fast as the earlier Rust port of the compiler. A day later, @vitejs/plugin-react v6.1.0 merged Boshen’s native integration. You opt in with react({ compiler: true }) and add oxc-transform-react as a peer dependency, and the plugin then handles the compiler, JSX, and Fast Refresh in a single pass. It requires Vite 8.

The number that matters is the one from a real codebase

Vendor benchmarks are one thing. The more useful signal came from an independent migration: developer Andrew Patton moved a 1,036-file React app to the Rust path and measured the compiler stage dropping from 14.3 seconds to 0.81 seconds, with total build time falling from 22.1 to 9.3 seconds. That is the difference between a compiler you leave off because it doubles your build and one you leave on because you stop noticing it. For a team already on Vite 8, the practical decision shifts from “is the memoization worth the build hit” to “why is this not on yet.”

Why auto-memoization was worth waiting for

The React Compiler’s job is to remove a whole category of manual work. Instead of reasoning about referential equality and sprinkling useMemo, useCallback, and React.memo to stop needless re-renders, you let the compiler insert that memoization for you at build time. Adoption stayed cautious for a reason that was never about correctness, it was about cost: running the transform through Babel on a large codebase made an already slow step slower, and plenty of teams decided the runtime win did not pay for the build-time loss. Moving the transform to Rust attacks exactly that objection. When the compiler is nearly free to run, the calculus that kept it in the “maybe later” pile stops holding.

What to watch before you turn it on everywhere

Two caveats keep this from being a blind default. The support is still labeled experimental in the plugin, so it belongs in a branch and a CI run before it goes near production. And it is gated on Vite 8, which not every project has adopted yet, so the upgrade is really two steps rather than one. The larger point stands regardless of your timeline: the React Compiler’s biggest practical barrier was performance, and the toolchain just removed most of it. The teams that dismissed auto-memoization on build-cost grounds have a concrete reason to re-run that test.

Sources cited
  1. React Compiler Support (oxc) oxc.rs
  2. feat(react): add native React Compiler support (vitejs/vite-plugin-react PR #1419) github.com
  3. React Now Rusted All The Way Out (Master.dev) blog.master.dev
esc