rspack
Fast Rust-based bundler for the web with a modernized webpack API 🦀
A JavaScript and CSS bundler built in Rust that works as a faster drop-in replacement for webpack. It accepts webpack configs, plugins, and loaders while cutting build times dramatically thanks to Rust's native speed.
Rspack is a tool that bundles JavaScript, CSS, and other web assets together so they can be served to a browser efficiently. Bundling takes the many individual files a web project is made of and combines them into a smaller number of optimized files for production. Rspack is built in Rust, a systems programming language known for speed, which lets it complete builds significantly faster than older JavaScript-based bundlers.
The main selling point is compatibility with webpack, which has been the dominant bundler in the JavaScript world for many years. Rspack aims to accept the same configuration files, plugins, and loaders that webpack uses, so teams can switch to it without rewriting their build setup. Features listed in the README include fast startup times, quick hot module replacement (where the browser updates changed modules in real time during development without a full page reload), built-in tree shaking (removing unused code from the final bundle), and minification of output files.
Rspack is part of a broader family of tools called Rstack. This includes Rsbuild (a higher-level build tool built on top of Rspack), Rspress (a static site generator), Rsdoctor (a build analyzer), Rslib (for building libraries), Rstest (a testing framework), and Rslint (a linter). Each is a separate package, but they share the same underlying architecture.
The project is developed by the web infrastructure team at ByteDance. It is released under the MIT license. Documentation is available on the Rspack website, and the community communicates through Discord.
Where it fits
- Speed up an existing webpack project by switching to Rspack without rewriting your build configuration.
- Get near-instant hot module replacement during development by replacing webpack with Rspack in a React or Vue app.
- Build a production bundle with tree shaking and minification using a webpack-compatible config file.
- Generate a static documentation site using Rspress, the static site generator built on top of Rspack.