@evanyou: To answer a common question - why not make React Compiler a plugin? It all comes down to practical trade-offs. Making i…
Summary
Evan You explains why integrating React Compiler directly into OXC (Rust) offers significant performance gains over a plugin approach, while addressing binary size concerns and future plans for AST transfer.
View Cached Full Text
Cached at: 06/24/26, 01:56 AM
To answer a common question - why not make React Compiler a plugin?
It all comes down to practical trade-offs. Making it a rust-based plugin is already significantly faster than the Babel version (up to 15x), but still 50% slower than direct-in-oxc due to the data passing / AST cloning overhead for being a plugin.
This is also different from e.g. Vue or Svelte where there are completely different AST formats; the React Compiler works on a JS/JSX AST that Oxc already supports (with only slight format differences). By integrating it in Oxc we can eliminate a lot of the AST cloning / transforming overhead, which isn’t feasible for other frameworks. It’d be a shame to leave such a big perf opportunity on the table.
We are also fully aware of how integrating it will result in bigger binary size for users who don’t use React Compiler, which is why I personally blocked the version that resulted in a ~5mb increase. We are aiming to get it down to a reasonable level while optimizing binary size across the board to minimize the downside.
For the long run, we are aiming to make raw AST transfer (which is already used in oxlint JS plugins) applicable to transform plugins. This would allow us to ship oxc plugins without AST cloning perf overhead.
Boshen (@boshen_c): We withdrew the Rust React Compiler integration from Rolldown and Vite because it increased the binary size from 28.7MB to 33.8MB, a 17% increase, which cannot be justified for all Vite users.
My current experiment is to have Claude understand our constraints.
Preliminary
Similar Articles
Port React Compiler to Rust
An initiative to port the React Compiler to Rust, aiming to improve performance and integration with the Rust ecosystem.
Octane – React's programming model, compiled
Octane is a compiled frontend framework that brings React's programming model—hooks, Suspense, and actions—with ahead-of-time compilation, no virtual DOM, and no rules of hooks.
@freeCodeCamp: Large React apps get harder to scale when every feature has to live inside the core codebase. In this tutorial, Jessica…
This tutorial explains how to design a type-safe, lazy-loaded, and secure plugin architecture in React using TypeScript, covering plugin lifecycles, bundling, and runtime loading.
Does Anybody Actually Like React?
A compilation of critical blog posts about React, covering performance issues, a critical security vulnerability (CVE-2025-55182, CVSS 10.0), and broader ecosystem concerns.
Bootstrapping Rust Considered Harmful
A critical analysis of the Rust compiler's bootstrapping process, highlighting the excessive size and dependency bloat compared to other languages like OCaml, and arguing for a more lightweight approach.