diff --git a/contributing/core/building.md b/contributing/core/building.md index bce370380c..eef52e10a8 100644 --- a/contributing/core/building.md +++ b/contributing/core/building.md @@ -6,7 +6,7 @@ You can build Next.js, including all type definitions and packages, with: pnpm build ``` -By default, the latest canary of the `next-swc` binaries will be installed and used. If you are actively working on Rust code or you need to test out the most recent Rust code that hasn't been published as a canary yet, you can [install Rust](https://www.rust-lang.org/tools/install) and run `pnpm --filter=@next/swc build-native`. +By default, the latest canary of the `next-swc` binaries will be installed and used. If you are actively working on Rust code or you need to test out the most recent Rust code that hasn't been published as a canary yet, you can [install Rust](https://www.rust-lang.org/tools/install) and run `pnpm swc-build-native`. If you want to test out the wasm build locally, you will need to [install wasm-pack](https://rustwasm.github.io/wasm-pack/installer/). Run `pnpm --filter=@next/swc build-wasm --target ` to build and `node ./scripts/setup-wasm.mjs` to copy it into your `node_modules`. Run next with `NODE_OPTIONS='--no-addons'` to force it to use the wasm binary. diff --git a/package.json b/package.json index a4e92db462..8ab3e6a37c 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,8 @@ "version": "pnpm install --no-frozen-lockfile && IS_PUBLISH=yes ./scripts/check-pre-compiled.sh && git add .", "prepare": "husky", "sync-react": "node ./scripts/sync-react.js", - "update-google-fonts": "node ./scripts/update-google-fonts.js" + "update-google-fonts": "node ./scripts/update-google-fonts.js", + "swc-build-native": "pnpm --filter=@next/swc build-native" }, "devDependencies": { "@actions/core": "1.10.1",