Skip to content

ci: use self-hosted rust cache#1607

Merged
colinaaa merged 6 commits intolynx-family:mainfrom
colinaaa:colin/0826/rust-cache
Aug 27, 2025
Merged

ci: use self-hosted rust cache#1607
colinaaa merged 6 commits intolynx-family:mainfrom
colinaaa:colin/0826/rust-cache

Conversation

@colinaaa
Copy link
Copy Markdown
Collaborator

@colinaaa colinaaa commented Aug 26, 2025

Summary by CodeRabbit

  • Chores
    • Switched CI to a local Rust setup action that installs a minimal Rust toolchain and manages caching for toolchains and Cargo.
    • Toolchain installs now include core Rust components and WebAssembly target support.
    • Cargo caching added to speed repeated builds and reduce cold starts.
    • Cache saves are now restricted to main branch to limit storage churn.
    • Removed an internal pre-build gating step to simplify the wasm build flow.

Edit from Rspack ❤️

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).
  • Changeset added, and when a BREAKING CHANGE occurs, it needs to be clearly marked (or not required).

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Aug 26, 2025

📝 Walkthrough

Walkthrough

Adds a local composite GitHub Action at .github/actions/rustup/action.yml to install and cache Rust toolchains, updates workflows to use it, and removes an internal cargo-version Turbo task and its npm script along with dependent references.

Changes

Cohort / File(s) Summary
New composite action for Rust setup
​.github/actions/rustup/action.yml
Adds a composite action "Rustup" that installs rustup if missing, reads the toolchain from rust-toolchain, exports toolchain, conditionally restores/saves rustup toolchain cache (key includes runner OS and toolchain), installs core components and wasm32-unknown-unknown, and runs cargo caching (stormslowly/rust-cache).
Workflows switched to local rustup action
​.github/workflows/rust.yml, ​.github/workflows/workflow-build.yml
Replaces actions-rust-lang/setup-rust-toolchain with ./.github/actions/rustup; replaces prior inputs (cache-key, target) with key and save-if: ${{ github.ref_name == 'main' }} and adjusts caching semantics and keys.
Removed internal cargo-version gating and script
package.json, turbo.json, packages/react/transform/turbo.json, packages/web-platform/web-style-transformer/turbo.json
Removes _internal:cargo:version npm script from package.json, deletes the //#_internal:cargo:version Turbo task from turbo.json, and removes that task from dependsOn in affected package-level turbo.json files (e.g., packages/react/transform/turbo.json, packages/web-platform/web-style-transformer/turbo.json).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • PupilTong
  • Sherry-hue

Poem

I hop through YAML fields at night,
Installing rustup, snug and light.
Caches tucked beneath the main,
Toolchains hum, builds wake again.
🥕✨


📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 931e4bb and bd453d9.

📒 Files selected for processing (1)
  • .github/actions/rustup/action.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/actions/rustup/action.yml
⏰ 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). (4)
  • GitHub Check: build / Build (Windows)
  • GitHub Check: build / Build (Ubuntu)
  • GitHub Check: test-rust / Test (Ubuntu)
  • GitHub Check: CodeQL Analyze (javascript-typescript)
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@relativeci
Copy link
Copy Markdown

relativeci bot commented Aug 26, 2025

Web Explorer

#4605 Bundle Size — 368.23KiB (~+0.01%).

bd453d9(current) vs 1952fc1 main#4586(baseline)

Bundle metrics  Change 3 changes Regression 1 regression
                 Current
#4605
     Baseline
#4586
Regression  Initial JS 144.31KiB(~+0.01%) 144.3KiB
No change  Initial CSS 31.84KiB 31.84KiB
Change  Cache Invalidation 76.15% 49.53%
No change  Chunks 8 8
No change  Assets 8 8
Change  Modules 221(+0.91%) 219
No change  Duplicate Modules 17 17
No change  Duplicate Code 3.85% 3.85%
No change  Packages 4 4
No change  Duplicate Packages 0 0
Bundle size by type  Change 1 change Regression 1 regression
                 Current
#4605
     Baseline
#4586
Regression  JS 236.23KiB (~+0.01%) 236.21KiB
No change  Other 100.16KiB 100.16KiB
No change  CSS 31.84KiB 31.84KiB

Bundle analysis reportBranch colinaaa:colin/0826/rust-cacheProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci bot commented Aug 26, 2025

React Example

#4612 Bundle Size — 237.06KiB (0%).

bd453d9(current) vs 1952fc1 main#4593(baseline)

Bundle metrics  no changes
                 Current
#4612
     Baseline
#4593
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 4 4
No change  Modules 158 158
No change  Duplicate Modules 64 64
No change  Duplicate Code 45.83% 45.83%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#4612
     Baseline
#4593
No change  IMG 145.76KiB 145.76KiB
No change  Other 91.3KiB 91.3KiB

Bundle analysis reportBranch colinaaa:colin/0826/rust-cacheProject dashboard


Generated by RelativeCIDocumentationReport issue

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Aug 26, 2025

CodSpeed Performance Report

Merging #1607 will not alter performance

Comparing colinaaa:colin/0826/rust-cache (bd453d9) with main (1952fc1)1

Summary

✅ 10 untouched benchmarks

Footnotes

  1. No successful run was found on main (83713b1) during the generation of this report, so 1952fc1 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Aug 27, 2025

⚠️ No Changeset found

Latest commit: bd453d9

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

@colinaaa colinaaa marked this pull request as ready for review August 27, 2025 03:01
@colinaaa colinaaa requested a review from PupilTong August 27, 2025 03:02
Copy link
Copy Markdown
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: 2

♻️ Duplicate comments (1)
.github/actions/rustup/action.yml (1)

25-29: Harden writes to GITHUB_PATH/OUTPUT and sanitize toolchain value (security).

Avoid injection into env files; also ensure the toolchain string is trimmed and safely emitted.

Apply:

-      run: | # zizmor: ignore[github-env] This action would only run on pull_request
+      run: | # zizmor: ignore[github-env] This action runs on PR; harden env writes.
         if ! command -v rustup &> /dev/null ; then
           curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
-          echo "$HOME/.cargo/bin" >> $GITHUB_PATH
+          echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
         fi
@@
-      run: |
-        toolchain=$(cat rust-toolchain)
-        echo "toolchain=${toolchain}" >> $GITHUB_OUTPUT
+      run: |
+        if [[ -f rust-toolchain ]]; then
+          toolchain="$(head -n1 rust-toolchain | tr -d '\r')"
+        elif [[ -f rust-toolchain.toml ]]; then
+          toolchain="$(grep -E '^\s*channel\s*=' rust-toolchain.toml | head -n1 | sed -E 's/[^"]*"([^"]+)".*/\1/')"
+        else
+          toolchain="stable"
+        fi
+        {
+          echo "toolchain<<EOF"
+          echo "$toolchain"
+          echo "EOF"
+        } >> "$GITHUB_OUTPUT"

Also applies to: 31-37

🧹 Nitpick comments (6)
.github/actions/rustup/action.yml (4)

38-45: Restore cache on all branches; use OS-specific toolchains path.

Restoring only on main forfeits perf on PRs; also ~/.rustup path won’t resolve in cache inputs on Windows.

Apply:

-    - name: Restore rustup cache
-      id: restore
-      if: ${{ inputs.save-if == 'true' }}
+    - name: Restore rustup cache (Unix)
+      id: restore
+      if: runner.os != 'Windows'
       uses: lynx-infra/cache/restore@5c6160a6a4c7fca80a2f3057bb9dfc9513fcb732
       with:
         path: ~/.rustup/toolchains
         key: rustup-cache-v3-${{ runner.os }}-${{ steps.get-toolchain.outputs.toolchain }}
+
+    - name: Restore rustup cache (Windows)
+      if: runner.os == 'Windows'
+      uses: lynx-infra/cache/restore@5c6160a6a4c7fca80a2f3057bb9dfc9513fcb732
+      with:
+        path: ${{ env.USERPROFILE }}\.rustup\toolchains
+        key: rustup-cache-v3-${{ runner.os }}-${{ steps.get-toolchain.outputs.toolchain }}
@@
-    - name: Save rustup cache
-      uses: lynx-infra/cache/save@5c6160a6a4c7fca80a2f3057bb9dfc9513fcb732
+    - name: Save rustup cache (Unix)
+      if: ${{ runner.os != 'Windows' && inputs.save-if == 'true' && steps.restore.outputs.cache-hit != 'true' }}
+      uses: lynx-infra/cache/save@5c6160a6a4c7fca80a2f3057bb9dfc9513fcb732
       with:
         path: ~/.rustup/toolchains
         key: rustup-cache-v3-${{ runner.os }}-${{ steps.get-toolchain.outputs.toolchain }}
+
+    - name: Save rustup cache (Windows)
+      if: ${{ runner.os == 'Windows' && inputs.save-if == 'true' && steps.restore.outputs.cache-hit != 'true' }}
+      uses: lynx-infra/cache/save@5c6160a6a4c7fca80a2f3057bb9dfc9513fcb732
+      with:
+        path: ${{ env.USERPROFILE }}\.rustup\toolchains
+        key: rustup-cache-v3-${{ runner.os }}-${{ steps.get-toolchain.outputs.toolchain }}

Also applies to: 60-66


46-59: Set minimal profile; gate wasm target via input to avoid unnecessary installs.

Install is faster with minimal profile; wasm target should be optional.

Apply:

 runs:
   using: composite
   steps:
@@
     - name: Install
       shell: bash
       env:
         toolchain: ${{ steps.get-toolchain.outputs.toolchain }}
       run: |
-        rustup toolchain install $toolchain \
+        rustup set profile minimal
+        rustup toolchain install $toolchain \
           -c rustc \
           -c cargo \
           -c rust-std \
           -c clippy \
           -c rustfmt
-        rustup target add wasm32-unknown-unknown
+        if [[ "${{ inputs.add-wasm-target || 'false' }}" == 'true' ]]; then
+          rustup target add wasm32-unknown-unknown
+        fi

And add a new input:

 inputs:
   key:
@@
   save-if:
     description: Should save toolchain cache or not
     default: "false"
     required: false
+  add-wasm-target:
+    description: Add wasm32-unknown-unknown target
+    default: "false"
+    required: false

67-73: Avoid cross-OS/toolchain cargo cache collisions.

Include OS and toolchain in the cache key.

Apply:

-    - name: Cargo cache
+    - name: Cargo cache
       uses: stormslowly/rust-cache@8269079380bc35105b3ed8b0f1f7c9557c6dec93 # v0.0.2
       with:
-        prefix-key: "RCache-L-5"
-        shared-key: ${{ inputs.key }}
+        prefix-key: "RCache-L-6"
+        shared-key: ${{ inputs.key }}-${{ runner.os }}-${{ steps.get-toolchain.outputs.toolchain }}
         save-if: ${{ inputs.save-if }}
         fullmatch-only: "true"

Please confirm stormslowly/rust-cache doesn’t itself add OS/toolchain; if it does, keeping them here is still harmless and explicit.


1-4: Fix header/comment accuracy and typos.

  • “Swatinem/rust-cache” → “stormslowly/rust-cache”.
  • “possbile” → “possible”; “some of components” → “some components”.
  • The “only run on pull_request” note is misleading; this action also runs on push. Remove or reword.

Apply:

-# This action installs the minimal Rust profile and configures Swatinem/rust-cache.
+# This action installs a minimal Rust toolchain and configures stormslowly/rust-cache.
@@
-# It is needed to install as few Rust components as possbile because
-# it takes a few minutes to install some of components on Windows and Mac, especially rust-doc.
+# Install as few Rust components as possible because installing extra components (e.g., rust-doc) adds minutes on macOS/Windows.

Also applies to: 25-25, 68-68

.github/workflows/rust.yml (1)

72-76: Unify toolchain setup across jobs via the local action.

Use the same composite action for rustfmt and clippy to keep toolchain consistent and optionally benefit from cache.

Apply:

-      - uses: actions-rust-lang/setup-rust-toolchain@fb51252c7ba57d633bc668f941da052e410add48 # v1
-        with:
-          components: rustfmt
-          cache: false
+      - uses: ./.github/actions/rustup
+        with:
+          key: lint-fmt
+          save-if: ${{ github.ref_name == 'main' }}
+          add-wasm-target: "false"
@@
-      - uses: actions-rust-lang/setup-rust-toolchain@fb51252c7ba57d633bc668f941da052e410add48 # v1
-        with:
-          components: clippy
-          cache: false
+      - uses: ./.github/actions/rustup
+        with:
+          key: lint-clippy
+          save-if: ${{ github.ref_name == 'main' }}
+          add-wasm-target: "false"

Also applies to: 88-92

.github/workflows/workflow-build.yml (1)

86-99: Turbo cache keys look solid. Consider adding lockfiles to strengthen invalidation.

Optional: include Cargo.lock, pnpm-lock.yaml to avoid stale caches when deps change without touching Rust sources.

Example:

-          key: turbo-v4-${{ runner.os }}-${{ hashFiles('**/packages/**/src/**/*.rs') }}-${{ github.sha }}
+          key: turbo-v4-${{ runner.os }}-${{ hashFiles('**/packages/**/src/**/*.rs', '**/Cargo.lock', '**/pnpm-lock.yaml') }}-${{ github.sha }}
@@
-            turbo-v4-${{ runner.os }}-${{ hashFiles('**/packages/**/src/**/*.rs') }}-${{ needs.get-merge-base.outputs.merge-base }}
+            turbo-v4-${{ runner.os }}-${{ hashFiles('**/packages/**/src/**/*.rs', '**/Cargo.lock', '**/pnpm-lock.yaml') }}-${{ needs.get-merge-base.outputs.merge-base }}
-            turbo-v4-${{ runner.os }}-${{ hashFiles('**/packages/**/src/**/*.rs') }}-${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || github.event.push.before }}
+            turbo-v4-${{ runner.os }}-${{ hashFiles('**/packages/**/src/**/*.rs', '**/Cargo.lock', '**/pnpm-lock.yaml') }}-${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || github.event.push.before }}
-            turbo-v4-${{ runner.os }}-${{ hashFiles('**/packages/**/src/**/*.rs') }}-
+            turbo-v4-${{ runner.os }}-${{ hashFiles('**/packages/**/src/**/*.rs', '**/Cargo.lock', '**/pnpm-lock.yaml') }}-
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 83713b1 and d817962.

📒 Files selected for processing (3)
  • .github/actions/rustup/action.yml (1 hunks)
  • .github/workflows/rust.yml (1 hunks)
  • .github/workflows/workflow-build.yml (1 hunks)
🔇 Additional comments (2)
.github/workflows/rust.yml (2)

39-43: Good switch to local action; branch-guarded saving looks right.


39-43: Cache keys include OS and toolchain by default

According to the action’s documentation, the cache key is automatically composed of the rustc release / host / hash—where the “host” component encodes the target triple (e.g. x86_64-unknown-linux-gnu) and the “release” component encodes the Rust toolchain version—alongside other values (job_id, environment variables, lockfile hashes, etc.). This ensures caches cannot be shared or collide across different OS runners or Rust toolchains. (github.com)

Copy link
Copy Markdown
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: 4

♻️ Duplicate comments (1)
.github/actions/rustup/action.yml (1)

22-37: Add a Windows-specific rustup bootstrap and gate the bash installer to non-Windows.

The bash-based installer can fail or be slow on Windows. Add a PowerShell step for Windows and limit the bash step to non-Windows. This also addresses the earlier suggestion.

Apply:

-    - name: Install rustup, if needed
-      shell: bash
+    - name: Install rustup, if needed (non-Windows)
+      if: runner.os != 'Windows'
+      shell: bash
       run: | # zizmor: ignore[github-env] This action would only run on pull_request
-        if ! command -v rustup &> /dev/null ; then
-          curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
-
-          # Resolve the correct CARGO_HOME path depending on OS
-          if [[ "$RUNNER_OS" == "Windows" ]]; then
-            echo "${CARGO_HOME:-$USERPROFILE/.cargo}/bin" | sed 's|/|\\|g' >> $GITHUB_PATH
-          else
-            echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
-          fi
-        fi
-      env:
-        RUNNER_OS: "${{ runner.os }}"
+        set -euo pipefail
+        if ! command -v rustup &> /dev/null ; then
+          curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
+          # Ensure cargo bin dir is on PATH
+          printf '%s\n' "${CARGO_HOME:-$HOME/.cargo}/bin" >> "$GITHUB_PATH"
+        fi
+
+    - name: Install rustup on Windows, if needed
+      if: runner.os == 'Windows'
+      shell: pwsh
+      run: |
+        if (-not (Get-Command rustup -ErrorAction SilentlyContinue)) {
+          Invoke-WebRequest -UseBasicParsing https://win.rustup.rs/x86_64 -OutFile rustup-init.exe
+          .\rustup-init.exe -y --default-toolchain none
+          '$env:USERPROFILE\.cargo\bin' | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
+        }
🧹 Nitpick comments (2)
.github/actions/rustup/action.yml (2)

1-5: Fix typo and align header comment with actual cache action used.

  • possbile -> possible
  • Header mentions Swatinem/rust-cache but the file uses stormslowly/rust-cache.

Apply:

-# This action installs the minimal Rust profile and configures Swatinem/rust-cache.
+# This action installs a minimal Rust toolchain and configures a rust-cache action.
@@
-# It is needed to install as few Rust components as possbile because
+# It is needed to install as few Rust components as possible because

53-66: Consider setting override or default toolchain for workspace.

If the repo lacks rust-toolchain[.toml], cargo may still use a different default. Optionally set an override.

Example:

         rustup toolchain install "$toolchain" \
           -c rustc \
           -c cargo \
           -c rust-std \
           -c clippy \
           -c rustfmt
+        # Optional: ensure this repo uses the intended toolchain
+        # rustup override set "$toolchain"
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d817962 and 8b3d937.

📒 Files selected for processing (1)
  • .github/actions/rustup/action.yml (1 hunks)
⏰ 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). (5)
  • GitHub Check: build / Build (Ubuntu)
  • GitHub Check: build / Build (Windows)
  • GitHub Check: test-rust / Test (Ubuntu)
  • GitHub Check: CodeQL Analyze (actions)
  • GitHub Check: CodeQL Analyze (javascript-typescript)
🔇 Additional comments (1)
.github/actions/rustup/action.yml (1)

74-81: Cargo cache usage looks good (pinned SHA, fullmatch-only).

No issues spotted.

We always setup rust, now.
Copy link
Copy Markdown
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

♻️ Duplicate comments (1)
.github/workflows/workflow-build.yml (1)

86-91: Verify the Rustup composite action supports Windows and uses a Windows-safe cache path.

This step runs on Ubuntu and Windows. Past feedback flagged missing Windows handling in .github/actions/rustup/action.yml and a Linux-only cache path (~/.rustup/toolchains). Confirm the composite installs rustup on Windows and caches via %USERPROFILE%.rustup\toolchains (or an OS-aware path). If not yet addressed, fix the composite; no workflow changes needed afterward.

Run this to confirm:

#!/bin/bash
set -euo pipefail
echo "Check Windows handling in rustup composite"
sed -n '1,200p' .github/actions/rustup/action.yml | sed -n '1,200p' >/dev/null # warm cache
echo "Search Windows branches:"
rg -nP "runner\.os\s*==\s*'Windows'|shell:\s*powershell" .github/actions/rustup/action.yml || true
echo
echo "Search cache paths:"
rg -nP "path:\s*~/.rustup/toolchains|USERPROFILE|\\\.rustup\\toolchains" .github/actions/rustup/action.yml || true
echo
echo "Search wasm target add:"
rg -nP "wasm32-unknown-unknown|rustup target add" .github/actions/rustup/action.yml || true
🧹 Nitpick comments (1)
packages/react/transform/turbo.json (1)

10-10: Add a lightweight preflight or docs note for local dev.

With dependsOn cleared, ensure scripts/build_wasm.sh fails fast with a helpful message if rustup/wasm target isn’t present, or document that the local Rustup action (or rustup target add wasm32-unknown-unknown) is required for local builds.

I can add a short rustup check to scripts/build_wasm.sh if you want.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 8b3d937 and 931e4bb.

📒 Files selected for processing (5)
  • .github/workflows/workflow-build.yml (1 hunks)
  • package.json (0 hunks)
  • packages/react/transform/turbo.json (1 hunks)
  • packages/web-platform/web-style-transformer/turbo.json (0 hunks)
  • turbo.json (0 hunks)
💤 Files with no reviewable changes (3)
  • packages/web-platform/web-style-transformer/turbo.json
  • turbo.json
  • package.json
⏰ 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). (4)
  • GitHub Check: build / Build (Windows)
  • GitHub Check: build / Build (Ubuntu)
  • GitHub Check: test-rust / Test (Ubuntu)
  • GitHub Check: CodeQL Analyze (javascript-typescript)
🔇 Additional comments (1)
packages/react/transform/turbo.json (1)

10-10: Removing cargo-version gating is consistent with the repo-wide shift to the local Rustup action.

No functional concerns from Turbo’s perspective; build:wasm remains correctly wired via build → build:wasm.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Qingyu Wang <40660121+colinaaa@users.noreply.github.com>
@colinaaa colinaaa merged commit 518013a into lynx-family:main Aug 27, 2025
46 checks passed
@colinaaa colinaaa deleted the colin/0826/rust-cache branch August 27, 2025 06:30
@coderabbitai coderabbitai bot mentioned this pull request Dec 18, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants