Releases

Rspress 2.0 Brings Rust-Powered Builds, Overhauled Themes to React Docs

Rspress 2.0 cuts dev-server cold starts to as low as 50 milliseconds via lazy compilation, while a redesigned layered theme system overhauls React documentation customization.

Nina Kowalski2 min read
Published
Listen to this article0:00 min
Share this article:
Rspress 2.0 Brings Rust-Powered Builds, Overhauled Themes to React Docs
Source: blog.openreplay.com

With 2.1k GitHub stars backing its repository, Rspress shipped version 2.0 on March 26 with a performance claim that travels fast across team Slack channels: lazy compilation reduces dev-server cold starts to as low as 50 milliseconds on large documentation projects, down from cold starts measured in seconds on prior versions.

Rspress is a static site and documentation generator built on Rsbuild and driven by Rspack, the Rust-written bundler that has been displacing JavaScript-native tooling across front-end development. Version 2.0 targets documentation sites and component libraries specifically, projects where embedding live React examples alongside prose is a core requirement. The authoring model stayed in MDX and TypeScript; what changed is what runs underneath.

Lazy compilation arrived as the centerpiece build feature. Pages compile on demand as they are visited during development rather than processing the entire project upfront, and the Rspress team's own benchmarks put cold starts under 50 milliseconds for large sites. A route preloading strategy triggers compilation when a user hovers over a link, keeping navigation smooth even as individual pages build on demand. Persistent caching compounds the gain, reusing previous compilation results across runs and improving subsequent build speeds by 30% to 60%.

Syntax highlighting moved off the client as well. Rspress 2.0 swapped Prism's runtime rendering for Shiki running at build time, reducing the JavaScript shipped to the browser and producing VS Code-consistent color schemes in the process. Work that was once deferred to the browser now runs in the build pipeline.

AI-generated illustration
AI-generated illustration

Theme customization received a complete redesign. The new layered system exposes CSS variable overrides at the broadest level, drops to BEM-class targeting for component-specific styling, and supports ESM re-export overrides for teams that need to swap entire components. When those options fall short, the explicit eject flow, invoked as rspress eject [component], pulls a component's source directly into a project without requiring teams to track unstable internal APIs across upgrades.

Rounding out the release, core packages were consolidated under @rspress/core, collapsing a scattered set of dependencies into a single maintained surface. For teams on earlier versions, that consolidation is the primary migration concern; the release ships with configuration notes aimed at teams considering the move from webpack- or Vite-based setups to the Rstack toolchain.

Rspress sits in the same lineage as SWC, Rspack, and Rsbuild: Rust absorbs the computationally expensive parts of the build while the developer-facing layer stays in TypeScript and React. That 50-millisecond cold start is the number that makes the case, in concrete terms, that Rust's performance advantages now show up every time a front-end developer types rspress dev.

Know something we missed? Have a correction or additional information?

Submit a Tip

Never miss a story.
Get Rust Programming updates weekly.

The top stories delivered to your inbox.

Free forever · Unsubscribe anytime

Discussion

More Rust Programming News