Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ematipico
Copy link
Member

@ematipico ematipico commented Nov 26, 2025

Summary

Note

The majority of the changes were created by AI, but heavily tested by me

wasm-pack has been officially deprecated, so it's best to create our own compilation step.

Fortunately for us, we don't have particular requirements, so what we need is just wasm-bindgen-cli and wasm-opt.

Inspiration: https://github.com/GraphiteEditor/Graphite/pull/2931/files#diff-306b09e83966cce07e3bca0fc9f2d5d89af003da10ba0a7131292c29697e9001

Since we now rely on just to run the compiling commands, I updated the workflow jobs to use just instead. I added their github action to the workflows: https://github.com/casey/just#github-actions

As for wasm-opt and wasm-bindgen-cli, they are added using the moonrepo action, which allows to install cargo binaries.

wasm-bindgen-cli and wasm-bindgen go in pair, so the version of the CLI must be pinned when it's installed.

Test Plan

  • Manually tested that all new scripts work and don't fail.
  • Manually tested @js-api package

Important

We should merge this PR after our next patch to reduce errors and allocate some time to fix possible regressions

Docs

Claude code updated the contribution guide

@changeset-bot
Copy link

changeset-bot bot commented Nov 26, 2025

⚠️ No Changeset found

Latest commit: 28a9de5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ematipico ematipico requested review from a team November 26, 2025 10:52
BIOME_WEBSITE_REPO: biomejs/website
BIOME_PUSH_ON_MAIN_EVENT_TYPE: biome-push-on-main-event
WASM_PACK_CACHE_KEY: wasm-pack-cache
WASM_CACHE_KEY: wasm-cache
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cache key changes were mine

# https://rust-lang.github.io/rustup/concepts/profiles.html
profile = "default"
channel = "1.91.1"
targets = ["wasm32-unknown-unknown"]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude wanted us to install the target in CI lol. I suggested a different approach

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 26, 2025

Walkthrough

This PR migrates WASM build tooling from wasm-pack to a just-based workflow. CI workflows now install just and a Rust toolchain (including wasm-bindgen-cli and wasm-opt), replace wasm-pack invocations with just recipes (build-wasm-*) across build matrix entries, and preserve artifact uploads. The justfile adds six WASM targets (bundler/node/web × dev/release). Package scripts, CONTRIBUTING.md, rust-toolchain.toml, and .gitignore entries for generated WASM artifacts were updated to match the new tooling.

Possibly related PRs

Suggested labels

A-Tooling, L-JavaScript, A-Project

Suggested reviewers

  • ematipico
  • siketyan

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarises the main change: replacing wasm-pack with manual WASM bundling.
Description check ✅ Passed The description is detailed and directly addresses the changeset, explaining the deprecation of wasm-pack and the rationale for the new manual build approach.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/manual-wasm-build

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d568b59 and 28a9de5.

📒 Files selected for processing (1)
  • crates/biome_wasm/Cargo.toml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/biome_wasm/Cargo.toml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Documentation
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: End-to-end tests
  • GitHub Check: Check Dependencies
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Test Node.js API
  • GitHub Check: Check JS Files

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
.github/workflows/beta.yml (1)

174-182: Step ordering differs from pull_request_node.yml; recommend aligning.

This workflow installs just before the Rust toolchain, whereas pull_request_node.yml does the reverse. Whilst both work, standardising step order across workflows improves consistency. Also, wasm-opt remains unpinned—consider adding a version constraint.

Please verify the preferred step ordering (just then toolchain, or toolchain then just) and align pull_request_node.yml, beta.yml, and preview.yml consistently.

.github/workflows/preview.yml (1)

170-178: Step ordering and wasm-opt version consistency issues persist here too.

As flagged in beta.yml, this workflow installs just before the Rust toolchain (opposite of pull_request_node.yml). Additionally, wasm-opt remains unpinned. Recommend coordinating these concerns across all three workflows (pull_request_node.yml, beta.yml, preview.yml) in a follow-up pass to reduce maintenance burden.

Please align step ordering and version pinning for wasm-opt across all workflows as part of a separate refactoring task.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b51968b and 1571a0f.

📒 Files selected for processing (13)
  • .github/workflows/beta.yml (1 hunks)
  • .github/workflows/beta_js_api.yml (1 hunks)
  • .github/workflows/preview.yml (1 hunks)
  • .github/workflows/pull_request_node.yml (2 hunks)
  • .github/workflows/release.yml (2 hunks)
  • .github/workflows/repository_dispatch.yml (2 hunks)
  • CONTRIBUTING.md (2 hunks)
  • justfile (2 hunks)
  • packages/@biomejs/js-api/package.json (1 hunks)
  • packages/@biomejs/wasm-bundler/.gitignore (1 hunks)
  • packages/@biomejs/wasm-nodejs/.gitignore (1 hunks)
  • packages/@biomejs/wasm-web/.gitignore (1 hunks)
  • rust-toolchain.toml (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
CONTRIBUTING.md

📄 CodeRabbit inference engine (AGENTS.md)

Review and follow the contribution guidelines defined in CONTRIBUTING.md

Files:

  • CONTRIBUTING.md
🧠 Learnings (13)
📓 Common learnings
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:03:52.014Z
Learning: For bugfix/feature PRs visible to Biome toolchain users or affecting published crates, create a changeset using the `just new-changeset` command with appropriate package selection, change type (major/minor/patch), and description.
Learnt from: arendjr
Repo: biomejs/biome PR: 7593
File: crates/biome_service/src/workspace/server.rs:1306-1306
Timestamp: 2025-09-25T12:32:59.003Z
Learning: In the biomejs/biome project, do not flag compilation errors during code review as they are handled by the existing test infrastructure and CI. Focus on other code quality aspects instead.
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:03:52.014Z
Learning: Before committing and opening a PR, run `just f` to format Rust and TOML files, `just l` to lint the whole project, and run appropriate code generation commands (`just gen-analyzer` for linter work, `just gen-bindings` for workspace work).
📚 Learning: 2025-11-24T18:03:52.014Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:03:52.014Z
Learning: Before committing and opening a PR, run `just f` to format Rust and TOML files, `just l` to lint the whole project, and run appropriate code generation commands (`just gen-analyzer` for linter work, `just gen-bindings` for workspace work).

Applied to files:

  • .github/workflows/pull_request_node.yml
  • .github/workflows/beta_js_api.yml
  • .github/workflows/release.yml
  • .github/workflows/beta.yml
  • justfile
  • CONTRIBUTING.md
  • packages/@biomejs/js-api/package.json
📚 Learning: 2025-08-05T14:43:29.581Z
Learnt from: dyc3
Repo: biomejs/biome PR: 7081
File: packages/@biomejs/biome/configuration_schema.json:7765-7781
Timestamp: 2025-08-05T14:43:29.581Z
Learning: The file `packages/biomejs/biome/configuration_schema.json` is auto-generated and should not be manually edited or reviewed for schema issues; any changes should be made at the code generation source.

Applied to files:

  • packages/@biomejs/wasm-bundler/.gitignore
  • packages/@biomejs/wasm-web/.gitignore
  • packages/@biomejs/wasm-nodejs/.gitignore
📚 Learning: 2025-11-24T18:06:12.017Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:12.017Z
Learning: Applies to crates/biome_service/src/workspace*.rs : Implement the Workspace trait in the Biome Service to manage internal state of projects, including open documents, project layout instances, and module graph instances

Applied to files:

  • packages/@biomejs/wasm-bundler/.gitignore
  • packages/@biomejs/wasm-web/.gitignore
  • packages/@biomejs/wasm-nodejs/.gitignore
📚 Learning: 2025-11-24T18:03:52.014Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:03:52.014Z
Learning: Use `pnpm` for Node.js package management in the repository. Run `pnpm install` from the root before using changeset commands, and use `pnpm --filter` to run commands for specific packages.

Applied to files:

  • .github/workflows/beta_js_api.yml
  • .github/workflows/release.yml
  • CONTRIBUTING.md
  • .github/workflows/repository_dispatch.yml
📚 Learning: 2025-11-24T18:03:52.014Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:03:52.014Z
Learning: For bugfix/feature PRs visible to Biome toolchain users or affecting published crates, create a changeset using the `just new-changeset` command with appropriate package selection, change type (major/minor/patch), and description.

Applied to files:

  • .github/workflows/release.yml
  • rust-toolchain.toml
  • justfile
  • CONTRIBUTING.md
  • packages/@biomejs/js-api/package.json
📚 Learning: 2025-11-24T18:04:42.146Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.146Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Code blocks in documentation can use 'ignore' property to exclude snippets from automatic validation (use sparingly)

Applied to files:

  • packages/@biomejs/wasm-web/.gitignore
  • packages/@biomejs/wasm-nodejs/.gitignore
📚 Learning: 2025-11-24T18:03:52.013Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:03:52.013Z
Learning: Applies to **/*.rs : Use snapshot testing with the `insta` crate for testing in Rust projects. Accept or reject snapshots using `cargo insta accept`, `cargo insta reject`, or `cargo insta review`.

Applied to files:

  • justfile
  • CONTRIBUTING.md
📚 Learning: 2025-11-24T18:05:20.343Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.343Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/Cargo.toml : Include development dependencies in `Cargo.toml` for formatter tests: `biome_formatter_test`, `biome_<language>_factory`, `biome_<language>_parser`, `biome_parser`, `biome_service`, `countme`, `iai`, `quickcheck`, `quickcheck_macros`, and `tests_macros`

Applied to files:

  • justfile
  • CONTRIBUTING.md
  • packages/@biomejs/js-api/package.json
📚 Learning: 2025-11-24T18:06:03.536Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:03.536Z
Learning: Applies to crates/biome_parser/**/*.ungram : Write grammar for new languages using the `ungrammar` DSL and create a `.ungram` file in the `xtask/codegen` folder

Applied to files:

  • justfile
📚 Learning: 2025-11-24T18:04:47.032Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_aria_metadata/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:47.032Z
Learning: Applies to crates/biome_aria_metadata/**/build.rs : The `build.rs` script uses `aria-data.json` to generate ARIA metadata

Applied to files:

  • justfile
📚 Learning: 2025-11-24T18:06:03.536Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:03.536Z
Learning: Create two new crates `biome_{language}_syntax` and `biome_{language}_factory` using `cargo new --lib` for new language parsers

Applied to files:

  • justfile
  • CONTRIBUTING.md
📚 Learning: 2025-11-24T18:06:12.017Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:12.017Z
Learning: Debug the WorkspaceWatcher by starting the daemon with cargo run --bin=biome -- start and running commands such as cargo run --bin=biome -- lint --use-server <path>

Applied to files:

  • justfile
  • CONTRIBUTING.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: Documentation
  • GitHub Check: End-to-end tests
  • GitHub Check: Test Node.js API
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Check Dependencies
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Check JS Files
  • GitHub Check: autofix
🔇 Additional comments (20)
CONTRIBUTING.md (2)

134-134: Documentation accurately reflects toolchain migration.

The updates correctly reference wasm-bindgen-cli and wasm-opt, and the instruction to use just install-tools (line 346) aligns with the earlier list of installed tools (line 134). Well integrated.

Also applies to: 346-346


406-406: Verify changeset creation for toolchain changes affecting published crates.

This PR modifies the WASM build process for the @biomejs/biome package. Per contribution guidelines, changes visible to toolchain users or affecting published crates should include a changeset. Please confirm whether just new-changeset was run and a changeset file created.

packages/@biomejs/wasm-bundler/.gitignore (1)

1-5: Standard WASM build artifact entries—looks good.

These follow wasm-bindgen's typical output naming; consistent with sibling wasm-web and wasm-nodejs packages.

packages/@biomejs/wasm-web/.gitignore (1)

1-4: Web WASM artifact entries—approved.

Minor difference from wasm-bundler (no biome_wasm_bg.js) likely reflects target-specific build output; consistent with web build conventions.

packages/@biomejs/wasm-nodejs/.gitignore (1)

1-4: Node.js WASM artifact entries—approved.

Mirrors wasm-web package; aligned with Node.js build output expectations.

rust-toolchain.toml (1)

6-6: Essential for WASM support—approved.

The wasm32-unknown-unknown target is required for compiling WASM with the new just-based build pipeline.

.github/workflows/pull_request_node.yml (2)

56-58: Just installation looks appropriate—approved.

Step ordering is correct: toolchain before just setup; just before build commands.


39-39: Based on my verification, I can confirm that the original review comment is accurate and justified. Here's what I found:

Verification Summary:

  1. Pattern confirmed across workflows: The unpinned wasm-opt appears consistently in:

    • pull_request_node.yml line 39
    • beta.yml line 180
    • preview.yml line 176
  2. Inconsistency with wasm-bindgen-cli: In all three workflows, wasm-bindgen-cli IS pinned to @0.2.105, while wasm-opt has no version constraint.

  3. Web search confirmed best practices: Industry standards clearly recommend pinning wasm-opt (Binaryen) to a specific version for reproducibility. Unpinned versions can auto-download latest, causing CI flakiness and non-reproducible builds.

  4. moonrepo/setup-rust supports versioning: The action supports version syntax (e.g., [email protected]), confirming that pinning wasm-opt should be technically feasible.

  5. No documented justification: No comments or documentation in the repository explain why wasm-opt is intentionally left unpinned.


Unpinned wasm-opt creates reproducibility risk across CI workflows.

The wasm-opt binary is installed without a version constraint in moonrepo/setup-rust, while wasm-bindgen-cli is pinned to 0.2.105. This pattern appears consistently in pull_request_node.yml, beta.yml, and preview.yml.

Without pinning, CI runs may pull different wasm-opt versions, causing non-deterministic builds and potential breakage from upstream Binaryen releases. Pin to a specific version (e.g., [email protected]) to ensure consistency across all builds.

.github/workflows/beta.yml (1)

184-189: Build commands updated correctly to just-based recipes—approved.

Commands properly delegate to just build-wasm-bundler, build-wasm-node, and build-wasm-web recipes.

.github/workflows/preview.yml (1)

160-165: Matrix entries correctly mapped to just recipes—approved.

The mapping from target names to just-recipe variables is clear and maintainable.

.github/workflows/beta_js_api.yml (1)

45-52: I'll help you verify the review comment about the inconsistent tooling installation approach. Let me start by examining the workflow files to understand the actual state of the codebase.
<function_calls>


#!/bin/bash

Find all workflow files

find .github/workflows -name ".yml" -o -name ".yaml" 2>/dev/null | sort


</function_calls>


#!/bin/bash

Search for moonrepo/setup-rust usage across workflows

echo "=== Searching for moonrepo/setup-rust ==="
rg "moonrepo/setup-rust" .github/workflows/ -A 2

echo ""
echo "=== Searching for wasm-tools installations ==="
rg "wasm-tools" .github/workflows/ -B 2 -A 1

echo ""
echo "=== Searching for wasm-opt installations ==="
rg "wasm-opt" .github/workflows/ -B 2 -A 1

echo ""
echo "=== Searching for wasm-bindgen-cli installations ==="
rg "wasm-bindgen-cli" .github/workflows/ -B 2 -A 1


</function_calls>

Now let me search for web information about wasm-tools vs wasm-opt:
<function_calls>


wasm-tools vs wasm-opt differences


</function_calls>

.github/workflows/release.yml (3)

247-253: LGTM! Matrix updated for just-based builds.

The matrix entries correctly map to the new just recipes defined in the justfile.


269-269: LGTM! Build command updated.

The build step now correctly invokes just with the appropriate recipe from the matrix.


258-266: Version consistency verified—[email protected] matches the pinned dependency.

The wasm-bindgen-cli version (0.2.105) pinned in the workflow is consistent with the wasm-bindgen dependency declared in crates/biome_wasm/Cargo.toml (line 31). All related packages (wasm-bindgen, wasm-bindgen-macro, wasm-bindgen-macro-support, and wasm-bindgen-shared) are locked to 0.2.105 in Cargo.lock. No ABI incompatibility risk.

.github/workflows/repository_dispatch.yml (2)

16-16: LGTM! Cache key consistently renamed.

The cache key and related step names correctly reflect the new wasm tooling.

Also applies to: 30-30, 37-37, 53-53, 57-57, 62-62, 68-68


39-50: LGTM! Tooling updated consistently.

The workflow now uses just-based builds. Same version verification concern applies as noted in release.yml.

justfile (3)

13-20: LGTM! Tool installation updated.

The install and upgrade commands correctly reference the new WASM tooling with consistent version pinning.


90-93: Verify wasm-opt debug flag in release builds.

The release builds include -g in wasm-opt, which preserves debug information. This increases binary size. Confirm this is intentional for production debugging purposes.

If debug info isn't needed in production, apply this diff to remove the -g flag:

   wasm-opt packages/@biomejs/wasm-bundler/biome_wasm_bg.wasm \
     -o packages/@biomejs/wasm-bundler/biome_wasm_bg.wasm \
     -Os \
-    -g
+    

(Apply similar changes to build-wasm-node and build-wasm-web targets.)

Also applies to: 111-114, 132-135


74-136: Well-structured WASM build targets.

The new just recipes provide clear separation between development and release builds with appropriate optimizations for each.

packages/@biomejs/js-api/package.json (1)

14-19: LGTM! Scripts migrated to just.

The build scripts now delegate to just recipes whilst preserving their names for compatibility.

@ematipico ematipico force-pushed the chore/manual-wasm-build branch from 1571a0f to d568b59 Compare November 27, 2025 11:38
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/repository_dispatch.yml (1)

16-68: Partial migration incomplete: Only repository_dispatch.yml has the cache management pattern.

The verification confirms the review concern. While repository_dispatch.yml implements cache management with WASM_CACHE_KEY, actions/cache/restore, and actions/cache/save, the following workflows building identical WASM targets lack this caching pattern:

  • beta.yml: Build WASM job has setup-just + moonrepo/[email protected] with [email protected] but no cache management
  • preview.yml: Matrix-based WASM builds with same tooling, no cache management
  • release.yml: WASM jobs with same tooling, no cache management
  • beta_js_api.yml: Uses a different build approach entirely (cargo install wasm-bindgen-cli + pnpm instead of moonrepo/setup-rust + just)
  • pull_request_node.yml: Not a WASM build job; only uses wasm-bindgen-cli for the Node.js API binary

Required: Either (1) add identical cache management to beta.yml, preview.yml, and release.yml, or (2) document why repository_dispatch.yml alone needs caching while others don't.

🧹 Nitpick comments (2)
.github/workflows/release.yml (1)

265-265: Consider pinning wasm-opt version for reproducibility.

Currently, wasm-opt is installed without an explicit version constraint. This could lead to non-deterministic build results across CI runs if a new version is released. As a code-quality concern, consider pinning it to a specific version (e.g., [email protected] or similar) to ensure consistent optimisation output.

Also applies to: 304-304

crates/biome_wasm/Cargo.toml (1)

52-53: Stale wasm-pack metadata now unused.

The [package.metadata.wasm-pack.profile.profiling] section won't be read since the PR replaces wasm-pack with manual builds. Consider removing it or verify it's retained intentionally for documentation.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1571a0f and d568b59.

📒 Files selected for processing (14)
  • .github/workflows/beta.yml (1 hunks)
  • .github/workflows/beta_js_api.yml (1 hunks)
  • .github/workflows/preview.yml (1 hunks)
  • .github/workflows/pull_request_node.yml (2 hunks)
  • .github/workflows/release.yml (2 hunks)
  • .github/workflows/repository_dispatch.yml (2 hunks)
  • CONTRIBUTING.md (2 hunks)
  • crates/biome_wasm/Cargo.toml (3 hunks)
  • justfile (2 hunks)
  • packages/@biomejs/js-api/package.json (1 hunks)
  • packages/@biomejs/wasm-bundler/.gitignore (1 hunks)
  • packages/@biomejs/wasm-nodejs/.gitignore (1 hunks)
  • packages/@biomejs/wasm-web/.gitignore (1 hunks)
  • rust-toolchain.toml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (10)
  • packages/@biomejs/wasm-bundler/.gitignore
  • .github/workflows/pull_request_node.yml
  • .github/workflows/preview.yml
  • packages/@biomejs/wasm-web/.gitignore
  • rust-toolchain.toml
  • CONTRIBUTING.md
  • .github/workflows/beta.yml
  • justfile
  • .github/workflows/beta_js_api.yml
  • packages/@biomejs/js-api/package.json
🧰 Additional context used
📓 Path-based instructions (1)
**/Cargo.toml

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Use workspace dependencies defined in the root Cargo.toml for internal crates, specifying workspace = true in each crate's Cargo.toml. Use path dependencies for dev-dependencies to avoid requiring published versions.

Files:

  • crates/biome_wasm/Cargo.toml
🧠 Learnings (23)
📓 Common learnings
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:03:52.024Z
Learning: For bugfix/feature PRs visible to Biome toolchain users or affecting published crates, create a changeset using the `just new-changeset` command with appropriate package selection, change type (major/minor/patch), and description.
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:03:52.024Z
Learning: Before committing and opening a PR, run `just f` to format Rust and TOML files, `just l` to lint the whole project, and run appropriate code generation commands (`just gen-analyzer` for linter work, `just gen-bindings` for workspace work).
📚 Learning: 2025-11-24T18:03:52.024Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:03:52.024Z
Learning: Use `pnpm` for Node.js package management in the repository. Run `pnpm install` from the root before using changeset commands, and use `pnpm --filter` to run commands for specific packages.

Applied to files:

  • .github/workflows/repository_dispatch.yml
  • .github/workflows/release.yml
📚 Learning: 2025-11-24T18:03:52.024Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:03:52.024Z
Learning: Before committing and opening a PR, run `just f` to format Rust and TOML files, `just l` to lint the whole project, and run appropriate code generation commands (`just gen-analyzer` for linter work, `just gen-bindings` for workspace work).

Applied to files:

  • .github/workflows/release.yml
📚 Learning: 2025-11-24T18:05:20.371Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/Cargo.toml : Include development dependencies in `Cargo.toml` for formatter tests: `biome_formatter_test`, `biome_<language>_factory`, `biome_<language>_parser`, `biome_parser`, `biome_service`, `countme`, `iai`, `quickcheck`, `quickcheck_macros`, and `tests_macros`

Applied to files:

  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-11-24T18:03:52.024Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:03:52.024Z
Learning: For bugfix/feature PRs visible to Biome toolchain users or affecting published crates, create a changeset using the `just new-changeset` command with appropriate package selection, change type (major/minor/patch), and description.

Applied to files:

  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-11-24T18:04:42.160Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.160Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : The first paragraph of rule documentation must be a single line and serves as the brief description for the rule overview page

Applied to files:

  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-11-24T18:05:42.356Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:42.356Z
Learning: Applies to crates/biome_js_type_info/**/*.rs : Store type data in linear vectors instead of using recursive data structures with `Arc` for improved data locality and performance

Applied to files:

  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-11-24T18:04:42.160Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.160Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Rules should only have severity set to 'error' if they report hard errors, dangerous code, or accessibility issues; use 'warn' for possibly erroneous code; use 'info' for stylistic suggestions

Applied to files:

  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-11-24T18:04:42.160Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.160Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Avoid deep indentation in rule implementations by using Rust helper functions like 'map', 'filter', and 'and_then' instead of nested if-let statements

Applied to files:

  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-11-24T18:04:42.160Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.160Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Code blocks in documentation marked with 'options' should contain only rule-specific options in JSON/JSONC format, while 'full_options' contains complete biome.json configuration

Applied to files:

  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-11-24T18:05:20.371Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/src/context.rs : Define `<Language>FormatContext` struct in a `context.rs` file containing `comments` and `source_map` fields, implementing `FormatContext` and `CstFormatContext` traits

Applied to files:

  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-11-24T18:04:42.160Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.160Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Deprecated rules must include a 'deprecated' field in the 'declare_lint_rule!' macro with the reason for deprecation

Applied to files:

  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-11-24T18:04:42.160Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.160Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : The rule option serde configuration must include 'rename_all = "camelCase"' to match biome.json naming conventions

Applied to files:

  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-11-24T18:06:12.048Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:12.048Z
Learning: Applies to crates/biome_service/src/workspace*.rs : Implement the Workspace trait in the Biome Service to manage internal state of projects, including open documents, project layout instances, and module graph instances

Applied to files:

  • crates/biome_wasm/Cargo.toml
  • packages/@biomejs/wasm-nodejs/.gitignore
📚 Learning: 2025-11-24T18:03:52.024Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:03:52.024Z
Learning: Applies to **/Cargo.toml : Use workspace dependencies defined in the root `Cargo.toml` for internal crates, specifying `workspace = true` in each crate's Cargo.toml. Use path dependencies for dev-dependencies to avoid requiring published versions.

Applied to files:

  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-11-24T18:06:12.048Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:12.048Z
Learning: Debug the WorkspaceWatcher by starting the daemon with cargo run --bin=biome -- start and running commands such as cargo run --bin=biome -- lint --use-server <path>

Applied to files:

  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-11-24T18:05:27.810Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:27.810Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Use the `dbg_write!` macro to debug formatter output instead of other logging methods

Applied to files:

  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-11-24T18:04:57.309Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:57.309Z
Learning: Applies to crates/biome_diagnostics/**/*.rs : Use helper types from the biome_diagnostics::v2 module (CodeFrameAdvice, CommandAdvice, DiffAdvice, LogAdvice) or implement the Advices trait yourself for custom advice handling

Applied to files:

  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-11-24T18:04:42.160Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.160Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Code blocks in documentation marked with 'expect_diagnostic' must emit exactly one diagnostic for the build system to generate it automatically

Applied to files:

  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-11-24T18:04:42.160Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.160Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : The rule option serde configuration must include 'deny_unknown_fields' to raise errors for extraneous fields in configuration

Applied to files:

  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-08-05T14:43:29.581Z
Learnt from: dyc3
Repo: biomejs/biome PR: 7081
File: packages/@biomejs/biome/configuration_schema.json:7765-7781
Timestamp: 2025-08-05T14:43:29.581Z
Learning: The file `packages/biomejs/biome/configuration_schema.json` is auto-generated and should not be manually edited or reviewed for schema issues; any changes should be made at the code generation source.

Applied to files:

  • crates/biome_wasm/Cargo.toml
  • packages/@biomejs/wasm-nodejs/.gitignore
📚 Learning: 2025-09-25T12:32:59.003Z
Learnt from: arendjr
Repo: biomejs/biome PR: 7593
File: crates/biome_service/src/workspace/server.rs:1306-1306
Timestamp: 2025-09-25T12:32:59.003Z
Learning: In the biomejs/biome project, do not flag compilation errors during code review as they are handled by the existing test infrastructure and CI. Focus on other code quality aspects instead.

Applied to files:

  • packages/@biomejs/wasm-nodejs/.gitignore
📚 Learning: 2025-11-24T18:04:42.160Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:42.160Z
Learning: Applies to crates/biome_analyze/**/biome_*_analyze/lib/src/**/!(mod).rs : Code blocks in documentation can use 'ignore' property to exclude snippets from automatic validation (use sparingly)

Applied to files:

  • packages/@biomejs/wasm-nodejs/.gitignore
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Check JS Files
  • GitHub Check: Documentation
  • GitHub Check: Test Node.js API
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: autofix
  • GitHub Check: Check Dependencies
  • GitHub Check: Lint project (depot-windows-2022)
🔇 Additional comments (6)
packages/@biomejs/wasm-nodejs/.gitignore (1)

1-4: Spot on—these are the expected wasm-bindgen outputs.

Ignoring the generated TypeScript definitions and WASM artefacts is correct and consistent with the other wasm packages in the monorepo. These shouldn't be version-controlled as they're produced during the build step using wasm-bindgen-cli.

crates/biome_wasm/Cargo.toml (3)

5-5: Verify Rust edition "2024" is intentional.

Line 5 specifies edition = "2024", which is very recent. Confirm this aligns with the project's MSRV and other crates' editions, especially since the PR notes most changes were AI-generated.


21-39: Excellent version coordination comment.

Workspace dependencies follow guidelines correctly, and the comment on lines 31–32 about coordinating wasm-bindgen version with CLI tooling is exactly what's needed for this migration.


41-47: Build dependencies follow workspace pattern correctly.

All internal crates use workspace = true, and external dependencies are pinned appropriately.

.github/workflows/repository_dispatch.yml (2)

42-47: Version pinning for wasm-opt differs from wasm-bindgen-cli.

The wasm-bindgen-cli is pinned to 0.2.105, but wasm-opt lacks a version constraint. Whilst this may be intentional (always use latest wasm-opt), it could lead to inconsistent builds across CI runs if wasm-opt releases a breaking change.

Clarify whether wasm-opt should also be pinned to a specific version for reproducibility, or document why floating the version is acceptable here.


50-50: The just build-wasm-web recipe exists and is properly defined.

Verified at line 125 of the justfile. The recipe compiles the wasm library, generates TypeScript bindings for the web target, and optimizes the resulting binary using wasm-opt. This is a complete and appropriate replacement for the previous build approach.

@ematipico ematipico merged commit 93182ea into main Nov 28, 2025
14 checks passed
@ematipico ematipico deleted the chore/manual-wasm-build branch November 28, 2025 09:07
l0ngvh pushed a commit to l0ngvh/biome that referenced this pull request Dec 21, 2025
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

Co-authored-by: dyc3 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants