React Compiler is being rewritten in Rust — 10x faster, and it keeps Babel's AST

The React team merged a full Rust port of the compiler: ~3x faster as a Babel plugin, ~10x faster on the transform itself, with all 1,725 fixtures passing. The surprise design choice — it still speaks Babel's AST as its public API.

In brief

Production users showed up to confirm the compiler itself has quietly been working for a year — useMemo and useCallback deleted, performance up.

The sharpest critique: why freeze the Babel AST as the contract instead of going native with Oxc? The maintainers answered — Oxc isn't the only consumer.

What got merged, and the numbers

React Compiler Rust port
React Compiler Rust port

The pull request, opened by Joseph Savona of the React Core Team and merged after 435 commits, lands a complete Rust port of React Compiler. The early benchmarks: "3x faster when operating as a Babel plugin," with the transformation logic itself "approximately 10x faster" (the author flags these as needing validation). Correctness is the headline reassurance — "All 1,725 fixtures pass when comparing generated code output with the TypeScript version," with snapshots matching after every compiler pass.

The architecture is preserved from the TS version: source converts into an intermediate representation (HIR) over a control-flow graph in single-static-assignment form. The notable decision is the public boundary — the port uses "a Rust representation of the Babel AST as our 'public API'," with converters to and from Babel, OXC and SWC.

"It just works" — the production testimonials

The thread answered a quiet doubt — is anyone actually using the compiler? — with operators who've run it for a year:

"We have used React Compiler in production for a large ecom / media website for about a year. … we haven't ran into any major bugs attributable to it in that time." — paavohtl

"all useMemo and useCallback can be removed and you get the same runtime performance and then some, at the cost of only a slight increase in code size." — molf

One engineer named a shipped product and the result: "We started using it for unifi.ui.com and the render performance gain has been massive."

The design fight: why keep Babel's AST?

The most substantive critique questioned the entire public-API choice — if you're paying to go native, why anchor to a JavaScript-era parser?

"Why are they porting the Babel-isms? They should be using Oxc tooling directly … isn't the benefit of porting to Rust that you can use fast native code? It seems backwards that they are freezing the Babel AST into the interoperability contract." — LoganDark

The answer came from a production user quoting the PR's own reasoning — Oxc is one consumer among several, and the conversion into HIR can only be maintained once:

"OXC is not the only consumer, so using the OXC AST wouldn't particularly make sense? … 'we've aligned on using a Babel-like AST as our public API. … for now we require that the scope data be serialized.'" — molf

The honest caveat, and why the rewrite matters

It isn't universal: one team reverted the compiler because "it's not compatible with mobx and we didn't notice any perf gains on an existing codebase." That's the right expectation-setter — the wins are real on render-heavy apps and absent on others. The strategic point of the Rust port is dependency, not speed alone: cutting the Babel requirement removes the slowest, heaviest piece of the build, which is exactly the friction that kept the compiler off by default. As one user put it, the reason you haven't heard much about it is that "it just works."

Get breakdowns like this every day

The top Hacker News stories, unpacked — by email, Telegram, or RSS.

Next story · 7 of 22 Read more
🚀Tech

Claude Desktop quietly spins up a 1.8GB VM on launch — with no off switch

Open the app to send one chat message and it boots a Hyper-V virtual machine. Users report it eating 12GB of disk for a Cowork sandbox they never enabled and can't remove. The AI company that sells craft, shipping a clunker.

★ 348 · 💬 243 · github.com · 3 min