Rolldown: Rollup compatible bundler written in Rust

Motivation for Rolldown

  • Project positions itself as “Rollup-compatible in Rust” to fix two perceived issues: weak code-splitting in esbuild and slow builds in Rollup.
  • Commenters note it is effectively the “next generation Rollup” and also an answer to Rust-based webpack alternative rspack.
  • Some see it as part of a broader Rust wave in JS tooling (oxc, SWC, LightningCSS, Deno, etc.).

Why not just improve esbuild or Rollup?

  • Esbuild: reported as very hard to extend; multiple features (bundling, treeshaking, transforms) are tightly fused into few AST passes, making substantial refactors difficult for anyone but the maintainer.
  • Its code-splitting is constrained by ES module semantics and by project priorities that favor correctness over risky “fast but maybe wrong” modes.
  • Rollup: limited by being JS-based with poor multicore utilization; mixing JS code with native transforms (SWC, esbuild) adds overhead from repeated parse/serialize steps and JS/native boundary crossings.

Why Rust?

  • Pro‑Rust arguments: strong performance, easy multithreading with compile-time safety, good ergonomics for parsers (pattern matching, algebraic data types), and a coherent ecosystem with Cargo and crates.io.
  • Critics argue any AOT-compiled language (Go, C#, C++) could work; for typical tooling workloads Rust’s borrow checker may be needless complexity or lead to .clone() abuse.
  • There is extensive back-and-forth comparing JS, Go, C++, C#, and Rust on performance, safety, iteration speed, and tooling (Cargo vs CMake, lack of C++ package manager, etc.).

Adoption, Vite integration, and ecosystem concerns

  • Rolldown is closely tied to the Vite ecosystem; it’s suggested to be a long-term replacement in Vite, with early experimentation mentioned in Vite 5.1 materials.
  • Some worry a Rust core reduces the pool of contributors, since most JS/TS devs can’t easily patch it.
  • Others ask whether output quality (readability, non-“junk” bundles) will match Rollup and whether it will avoid Rollup’s MagicString-style string hacking by transforming ASTs directly.

Use cases and open questions

  • Chunking is seen as important for loading large, route-specific dependencies and dynamic imports, though some question if many apps really need it.
  • Unclear how soon Rolldown will be production-ready in Vite and whether it will fully unify dev and build behavior (“dev mode as build-plus”).