Rspack 2.1 Ships Rust-Powered React Compiler: Up to 13x Faster Than Babel
Rspack is pushing the Rust-in-JS-build-tools thesis hard, and 2.1 shows it's not just about raw speed — it's about matching or exceeding the ergonomics of Babel and webpack while being an order of magnitude faster. For any team hitting build-time walls on large React projects, the Rust React Compiler alone is a compelling reason to evaluate Rspack. The broader ecosystem play — Rslint, Rstest, Rslib — signals a bet that the entire frontend toolchain can be Rust-native, not just the bundler.
Rspack 2.1 is out, and the headline number is a Rust-native React Compiler that benchmarks 7-13x faster than the Babel-based approach. The `rspack dev` command drops from 10.6 seconds to 0.7 seconds in tests. This isn't just a port — it's a direct integration via the built-in SWC loader, meaning no extra Babel pass is needed.
Beyond the React Compiler, Rspack 2.1 ships general build performance improvements of about 16% over 2.0, and HMR is about 5% faster. TypeScript 7 (the Go port) is now supported via `ts-checker-rspack-plugin`, cutting type-checking time by roughly 60%. A new circular dependency plugin uses a smarter graph algorithm to avoid redundant traversals in large module graphs.
The release also introduces branch-aware dependency pruning and ESM export existence detection — Rspack can now statically inline boolean constants and prune entire branches of dynamic imports. The `pureFunctions` optimization, previously experimental, is now on by default in production. And `export const` in non-circular modules gets a lighter value binding that skips getter overhead.
On the ecosystem side, Rspack 2.1 adds `import.meta.glob` support (matching Vite and Turbopack), source phase imports for WebAssembly, and automatic persistent cache cleanup. The broader Rust toolchain — Rslint (400+ built-in rules, ESLint plugin compatibility), Rstest (test runner with `--changed`/`--related` filtering), Rslib (fast isolated declarations), and Rsdoctor (AI-assisted CI analysis) — continues to mature.
The 13x speedup on `rspack dev` with the Rust React Compiler is the kind of number that makes teams reconsider their entire build toolchain — a 10-second cold start dropping to under a second changes workflow habits.
Branch-aware dependency pruning is a genuinely novel optimization: most bundlers can tree-shake unused exports, but pruning entire dynamic import branches based on inlined constants is a step toward compile-time dead code elimination that feels more like a native compiler.
The decision to keep webpack-prefixed magic comments alongside the new rspack prefix shows Rspack is serious about gradual migration, not forcing a break.
Rslint's ability to run ESLint plugins directly is a pragmatic hedge — it acknowledges that no Rust-native linter can match ESLint's plugin ecosystem overnight, so compatibility buys time.
The Rspack ecosystem (Rslib, Rstest, Rslint, Rsdoctor) is becoming a coherent Rust-native frontend toolchain, not just a bundler. This is a bet that developers will prefer a unified Rust stack over mixing tools with different runtimes.
Automatic cache cleanup with defaults of 7 days and 3 versions is a small but thoughtful quality-of-life fix — anyone who has had a node_modules/.cache directory balloon to gigabytes will appreciate it.