Rspack bundles JavaScript and web assets using a Rust core and a modernized webpack-compatible API. It targets fast dev startup, hot module replacement, and production optimizations.
Overview
Rspack is a web bundler implemented in Rust. It modernizes the webpack API so many webpack configurations, plugins, and loaders can be reused while aiming for faster build and HMR performance.
Built-in incremental compilation supports fast hot module replacement for large front-end codebases. Default production behavior includes tree shaking, minification, code splitting, asset handling, parallel builds, SWC transpilation, and Lightning CSS processing. Module Federation is supported for sharing code across applications.
Rspack is framework agnostic and ships with a dev server, loader compatibility with the webpack ecosystem, a JavaScript programmatic API, and plugin hooks. It is part of the Rstack toolchain alongside Rsbuild, Rslib, Rspress, Rsdoctor, Rstest, and Rslint.
Documentation presents Rspack as a drop-in webpack replacement path with migration and compatibility guides. Benchmarks on the project site compare dev, build, and HMR timings against other bundlers.
Key features
- Webpack-compatible plugins and loaders
- Fast HMR with incremental builds
- Module Federation support
- Tree shaking and minification
- Code splitting and asset management
- SWC and Lightning CSS integration
- Built-in dev server
- JavaScript build API
Use cases
- Large front-end application builds
- Webpack migration projects
- Micro-frontend Module Federation
- Local development with fast HMR
- Multi-target production bundles