Rust React Compiler Now Native in Vite — 17.6x Speedup
The React Compiler — the auto-memoization layer that was supposed to make useMemo and useCallback mostly obsolete — just crossed a threshold that matters more than any feature addition. It's now native Rust in Vite, no Babel required. And the numbers are not theoretical: a real 1,036-file React Router codebase went from 14.3 seconds to 0.81 seconds on the compiler portion. That's 17.6× faster.
Here's what shipped, why it matters, and how to switch today.
What Shipped
Two things landed that make this possible:
@vitejs/plugin-reactv6.1.0 (August 20) added experimental native React Compiler support via thecompiler: trueoption. Instead of piping your JSX through Babel and then throughbabel-plugin-react-compiler, it usesoxc-transform-react— the Rust-based transformer from the oxc project — directly.@acusti/vite-plugin-react-compilerprovides the same native support for codebases using React Router in framework mode, where@vitejs/plugin-reactisn't used directly.
Both rely on oxc-transform-react, the Rust crate that implements the React Compiler transform. The oxc team released official support for it on August 4, and the Vite plugin ecosystem caught up within weeks.
The Benchmark
Andrew Patton published a detailed writeup of switching his 1,036-file codebase (Outlyne, a website builder built on React Router) to the native compiler. The results:
| Metric | Babel-based | Rust-native | Speedup |
|---|---|---|---|
| Compiler portion | 14.3s | 0.81s | 17.6× |
| Total build | 22.1s | 9.3s | 2.4× |
The compiler portion is the part that actually runs the React Compiler transform. The total build includes bundling, minification, asset processing — so your mileage varies. But shaving 12+ seconds off every CI build compounds fast when agents are generating commits every few minutes.
Per Boshen, the oxc project lead: "It is more than 10 times faster than Babel in our preliminary benchmark." The real-world result exceeded even that estimate.
Beyond Speed: Bug Fixes and Consistency
The speed is the headline, but the Rust compiler isn't just a faster reimplementation — it fixes real bugs that the Babel-based v1.0 compiler never addressed:
- Conditional logic in try/catch blocks — previously caused the compiler to bail out entirely. Now fully supported.
- Destructured prop reassignment in nested closures — a common pattern where you assign a default to a prop and then use it in an event handler. Skipped before, compiled now.
- Computed object property keys — e.g.,
{[`items-${count}`]: count > 0}. Supported in the Rust compiler, not in the Babel version.
These aren't edge cases. They're patterns that appear in real codebases and forced developers to either work around the compiler or accept that certain components wouldn't be memoized. In Patton's codebase, these fixes brought seven additional functions under compiler coverage.
There are still gaps — throw from inside a try block, and logical assignment operators (??=, &&=, ||=) — but the Rust compiler is actively developed. The Babel-based compiler is essentially a dead end.
There's also a toolchain consistency win: Oxlint and the build now use the exact same React Compiler version. No more situations where the linter says a component is fine but the build silently skips it.
How to Switch
If you're using @vitejs/plugin-react (Vite 8+):
npm install -D oxc-transform-react
Then simplify your vite.config.js:
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react({ compiler: true })],
})
That's it. Remove @rolldown/plugin-babel from your devDependencies — you don't need it anymore.
For React Router framework mode, install the standalone plugin:
npm install -D @acusti/vite-plugin-react-compiler
import { defineConfig } from 'vite'
import reactCompiler from '@acusti/vite-plugin-react-compiler'
import { reactRouter } from '@react-router/dev/vite'
export default defineConfig({
plugins: [reactRouter(), reactCompiler()],
})
No more vite-plugin-babel, babel-plugin-react-compiler, or @babel/preset-typescript.
Bottom Line
The Rust React Compiler going native in Vite is the kind of infrastructure improvement that doesn't make splashy headlines but changes the day-to-day experience of everyone building with React. Faster builds, fewer silent bailouts, consistent tooling. The migration path is trivial — install one package, toggle one config flag — and the upside is a 17.6× speedup on the compiler portion and real bug fixes that expand compiler coverage.
If you're on React and Vite, switch today. The old Babel path is a dead end, and the Rust path only gets faster from here.