For AI agents: the complete documentation index is available at /zh/llms.txt, the full documentation bundle is available at /zh/llms-full.txt, and this page is available as Markdown at /zh/contribute/development/building.md.
close

Building

请查看 准备工作 安装 Rust 和 Node.js 环境。

安装 Node.js 依赖

通过 pnpm 安装 Node.js 依赖。

# enable pnpm with corepack
corepack enable

# Install dependencies
pnpm i

构建 Rspack

  • 执行 cargo build 编译 Rust 代码。
  • 执行 pnpm run build:cli:dev 编译 Node.js 和 Rust 代码。
  • 如果想要构建 Rspack Wasm,执行 pnpm run build:cli:dev:wasm

被编译的二进制产物位于 packages/rspack-cli/bin/rspack