Rspack is a module bundler featuring a Rust-based core and an interface compatible with webpack 5. It processes entry points to build dependency graphs and generates JavaScript, CSS, and other assets. The tool leverages native code to parallelize resource-intensive tasks, while configuration and plugin management remain handled via JavaScript or TypeScript.
Performance gains from switching to Rspack depend on the specific project configuration. For the Mews team, replacing the bundler saved 70 seconds, while migrating from Babel to the built-in SWC loader and moving minification to SWC saved an additional 150 seconds. The article compares Rspack 2.3, webpack 5.113, and Vite 8.4.
The build process involves three layers: the CLI for configuration, the Compiler for managing plugins and native data via Node-API, and the Runtime for loading chunks in the browser. Rspack distinguishes between ModuleGraph, which tracks dependencies, and ChunkGraph, which organizes modules into chunks for optimization during the seal phase.
Developers can use Rsbuild for new projects to access pre-configured templates and a development server. For existing large-scale webpack configurations, direct integration with the Rspack core is recommended. The built-in SWC loader handles TSX transformation by removing type annotations and converting JSX, though separate type checking remains necessary.






