For AI agents: the complete documentation index is available at https://rspack.rs/llms.txt, the full documentation bundle is available at https://rspack.rs/llms-full.txt, and this page is available as Markdown at https://rspack.rs/guide/start/quick-start.md.
close

Quick start

Get up to speed quickly with a new Rspack based project.

Ecosystem

As a low-level bundler, Rspack has a rich ecosystem that includes various frameworks, tools, and solutions. These ecosystem projects cover different aspects from frameworks to development tools, meeting diverse development needs across scenarios and providing an out-of-the-box experience.

See the Ecosystem page to explore these ecosystem projects.

Environment preparation

Rspack supports using Node.js, Deno, or Bun as the JavaScript runtime.

You can refer to the following installation guides and choose one runtime:

Version requirements
  • Rspack v2 requires Node.js version 20.19+, 22.12+.
  • Rspack v1 requires Node.js 18.12.0 or higher.
For unsupported platforms

If you are using a niche platform, Rspack may not provide native support for it. In this case, please manually install @rspack/binding-wasm32-wasi as a fallback. The Wasm build is compatible with most platforms.

Currently supported platforms:

  • darwin-arm64
  • darwin-x64
  • linux-arm64-gnu
  • linux-arm64-musl
  • linux-riscv64-gnu
  • linux-riscv64-musl
  • linux-ppc64-gnu
  • linux-s390x-gnu
  • linux-x64-gnu
  • linux-x64-musl
  • win32-arm64-msvc
  • win32-ia32-msvc
  • win32-x64-msvc

Create a new project

Using Rsbuild

We recommend using Rsbuild to create new projects. Rsbuild is a build tool powered by Rspack, with built-in build configuration, a dev server, and integrations for frameworks such as React and Vue to help you get started quickly.

Run the following command and follow the prompts:

npm
yarn
pnpm
bun
deno
npm create rsbuild@latest

See Rsbuild - Quick start to learn more.

Using Rspack CLI

Rspack CLI provides a command-line interface for using Rspack directly. You configure loaders, plugins, and other build capabilities yourself, making it suitable for projects that need a custom build workflow based on low-level configuration.

Run the following command and follow the prompts:

npm
yarn
pnpm
bun
deno
npm create rspack@latest

Non-interactive mode

create-rspack and create-rsbuild support a non-interactive mode through command-line options. This mode lets you skip all prompts and create a project directly, which is useful for scripts, CI, and coding agents.

For example, the following command creates a React app in the my-app directory:

# Rspack CLI
npx -y create-rspack --dir my-app --template react

# Rsbuild
npx -y create-rsbuild --dir my-app --template react

# Using abbreviations
npx -y create-rsbuild -d my-app -t react

Manual installation

Start by creating a project directory and generating an npm `package.json':

mkdir rspack-demo
cd rspack-demo
npm init -y

Then installing @rspack/core and @rspack/cli as dev dependencies:

npm
yarn
pnpm
bun
deno
npm add @rspack/core @rspack/cli -D

Update your build scripts to use Rspack CLI:

package.json
{
  "scripts": {
    "dev": "rspack dev",
    "build": "rspack build",
    "preview": "rspack preview"
  }
}

Next, see Configure Rspack to learn about how to configure Rspack.

Migrating from existing projects

If you need to migrate from an existing project to Rspack, you can refer to the following guides:

Install canary version

When you need to test or verify the features of Rspack that are not yet released to the stable version, you may need to use the canary version.

The canary version of Rspack has a -canary suffix in the package scope. For example, the canary package name of @rspack/core is @rspack-canary/core. To use these versions, you can configure the overrides of the package manager (npm/yarn/pnpm/bun).

Here is an example of using pnpm overrides:

package.json
{
  "pnpm": {
    "overrides": {
      "@rspack/core": "npm:@rspack-canary/core@latest"
    },
    "peerDependencyRules": {
      "allowAny": ["@rspack/*"]
    }
  }
}

Rspack community also provides install-rspack tool to easily install canary version:

npx install-rspack --version latest # Install the latest version
npx install-rspack --version canary # Install the canary version
npx install-rspack --version 1.0.0-canary-d614005-20250101082730 # Install the specified canary version