Skip to content

Guide · Open source

How to use rspack: install, configure and run it

Updated · written with AI from the project's own documentation and checked against our catalogue data

Rspack is an open-source, MIT-licensed bundler for the web. It takes JavaScript, TypeScript and other web source files and bundles them into files a browser can load. This guide explains what it does, how to get started with it, and when it makes sense for your project, so you can decide whether to try it on a webpack-based codebase.

Rspackweb-infra-dev/rspack · ★ 13k · MIT

Quick start

  1. 1Check Node.js. Confirm you have Node.js installed. The README does not state a minimum version, so check the official docs.
  2. 2Read the Quick start. Open the Quick start guide at rspack.rs to see the setup steps for your project.
  3. 3Try the StackBlitz example. Open the example from the README in your browser to see a working Rspack project without a local install.
  4. 4Install the package. Add @rspack/core to your project using your package manager, following the Quick start guide.
  5. 5Move or create your config. If you are coming from webpack, check plugin and loader compatibility before you change your config.
  6. 6Run a build and compare. Run a build and compare the output and speed with your current tool.

What Rspack does

Rspack is a fast bundler written in Rust. It uses a modernized version of the webpack API, so projects already built on webpack can often be moved over with less rework.

The README describes it as a tool that replaces webpack while delivering fast build speeds.

  • Fast startup based on Rust
  • Incremental compilation for hot module replacement (HMR)
  • Compatibility with webpack plugins and loaders
  • First-class support for Module Federation
  • Built-in production optimizations such as tree shaking and minification
  • Not bound to any frontend framework

Install Rspack and check your prerequisites

Rspack is installed through a package manager. The npm package is named @rspack/core. The README links to Node.js release information through a badge, but it does not state a minimum Node.js version, so check the official docs before you install.

The README's install instruction shows how to clone the repository. The source does not give a full package-manager install command, so follow the Quick start guide at the homepage for the exact steps.

  • Prerequisite: Node.js (minimum version not stated in the README)
  • Package name on npm: @rspack/core
  • Documentation: https://rspack.rs
git clone https://github.com/web-infra-dev/rspack

Get started with the Quick start guide

The README points to the official Quick start guide for setting up a project. It also links to a StackBlitz example that you can open in the browser without installing anything locally.

If you want to see a working setup before touching your own project, the StackBlitz example is the quickest route.

  • Read the Quick start guide at https://rspack.rs/guide/start/quick-start
  • Open the StackBlitz example from the README to explore without installing
  • Browse the rstack-examples repository for more sample projects

Move an existing webpack project to Rspack

Rspack aims to be a replacement for webpack. Its webpack compatibility covers plugins and loaders from the webpack ecosystem, which is why it suits teams with large existing projects.

The README does not describe a step-by-step migration procedure, so check the docs for compatibility details before you start, especially for features the README does not mention.

  • Check that the webpack plugins and loaders you use are supported
  • Start with a branch or a copy of your project
  • Compare build output and dev-server behaviour with your current setup

Use Rspack with Module Federation and the Rstack tools

Rspack provides first-class support for Module Federation, which helps teams build large web applications split into smaller parts. It is part of Rstack, a toolchain that also includes Rsbuild, Rslib, Rspress, Rsdoctor, Rstest and Rslint.

The README lists these tools in a table with short descriptions, so you can look up the one that fits your task.

  • Rsbuild: build tool
  • Rsdoctor: build analyzer
  • Rstest: testing framework
  • Rslint: linter
  • rspack-dev-server: dev server for Rspack

Find help and learn more

The README links to a Discord community where the Rspack team and users are active. Rspack has documentation for its 2.x, 1.x and 0.x versions, so make sure you read the docs that match the version you install.

Contributions are welcome. The README links to a contributing guide and a code of conduct.

  • Community chat: Discord (link in the README)
  • Docs: https://rspack.rs
  • Contributing guide: CONTRIBUTING.md in the repository

What people use it for

  • Speeding up builds and dev-server startup in a large webpack project
  • Developing a micro-frontend setup with Module Federation
  • Keeping existing webpack plugins and loaders while changing the bundler
  • Running production builds with built-in tree shaking and minification

Frequently asked questions

Is Rspack free to use?

Yes. Rspack is released under the MIT licence, as shown in the README. You can read the full licence file in the repository.

What does Rspack require to run?

The README lists Node.js as a prerequisite but does not state the minimum version. Check the official docs at rspack.rs for the exact requirement.

Is Rspack a replacement for webpack?

The README says it modernizes the webpack API to enable seamless replacement of webpack. It also says it supports webpack plugins and loaders, so existing setups may need less rework.

How does Rspack compare to Vite, esbuild and Parcel?

The README does not include a direct comparison with these tools. It links to a separate build-tools-performance project for comparisons between Rspack and other tools.

Does Rspack support Module Federation?

Yes. The README says Rspack provides first-class support for Module Federation to help develop large-scale web applications.

Is Rspack only for React?

No. The README says Rspack is not bound to any frontend framework.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Rspack suits teams with large webpack projects who want faster builds, dev-server startup and HMR without rewriting their config, and those who rely on Module Federation. If you only need a simple static page, or you are not comfortable with JavaScript project setup, a lighter tool may be a better fit, and the README does not compare simplicity against alternatives.

Install options & downloads