In the next version of Bun
`bun build --react-compiler` runs the React Compiler in Rust
On a large React codebase, it's 19x faster than the Babel plugin
Bun's upcoming release embeds Meta's React Compiler directly into its Rust-based bundler, letting developers trigger automatic memoization during builds with a simple flag and delivering nearly 20x faster wall times than the standard Babel plugin on sizable React projects.
In the next version of Bun
`bun build --react-compiler` runs the React Compiler in Rust
On a large React codebase, it's 19x faster than the Babel plugin
A benchmark on a large codebase shows the new path finishing in 484 ms versus 9.58 seconds for the Babel plugin, a 19.8x improvement achieved by forking the upstream compiler and adding targeted optimizations while still passing the shared test suite.
The feature is described only as landing in the next version of Bun with no version number, timeline, or additional integration details provided for frameworks that might adopt it.
Many users praised Bun's new Rust-based React compiler for delivering major speedups like 19x faster builds, while others complained about the lack of promised blog posts.
No Digg Deeper questions have been answered for this story yet.
It runs the same test suite as the upstream react compiler version with tests for flow type and meta’s intl library skipped
In the next version of Bun
`bun build --react-compiler` runs the React Compiler in Rust
On a large React codebase, it's 19x faster than the Babel plugin
i gotta say, i switched to bun for everything and its been really nice. very impressive work all around and am looking forward to trying this out . as someone relatively new to the frontend world, this is a set of tools that just seem to work
In the next version of Bun
`bun build --react-compiler` runs the React Compiler in Rust
On a large React codebase, it's 19x faster than the Babel plugin
I did spend some time making it faster for bun’s usecase
It runs the same test suite as the upstream react compiler version with tests for flow type and meta’s intl library skipped

@jimmycallin It’s a fork with a small number of changes
@jarredsumner wow..
In the next version of Bun
`bun build --react-compiler` runs the React Compiler in Rust
On a large React codebase, it's 19x faster than the Babel plugin

@jarredsumner is this using the official rust port or your own reimplementation? if the latter - why?

@fristovic_ @jarredsumner Maybe you don't realize how rude you message is. With open source, he doesn't have to do anything. You should know that.

@jarredsumner Node.js - Runtime Environment
Deno - Secure Runtime Environment with some commonly required tooling
Bun - Entire JS ecosystem

@jarredsumner How does it compare to esbuild ?

@jarredsumner at this point, the blog post of bun rewrite has become a joke. no matter what jarred posts everyone just wants a blog post

@jarredsumner any plans to try to upstream the changes?

@jarredsumner How much does the binary size increase?

@MeirBlachman This codebase doesn’t use it but bun’s bundler plugins snd esbuild’s plugins work similarly and afaik esbuild doesn’t have a react compiler builtin so it probably is the same as the Babel version

@jarredsumner Is writing the promised Blog a joke to you? Concentrate please.

@jarredsumner Having a standard library is much needed for tasks like these. Awesome work!

@jarredsumner Congrats, but where is the blog article and the comparison btw Zig and Rust?

@jarredsumner bun build --when-blog
Warning: The resulting post is 99.8% complete, but it includes a memory leak where the author forgets to publish it.

@typosquattage React is 13 years old and still wildly popular. React-specific flags for React-specific functionality is fine.

@jarredsumner So, on what day will the next Bun be officially released?

@jarredsumner In the next version of Bun I tend to use Node again.