Skip to content

chore: bump Rust 1.88.0#1712

Merged
gaoachao merged 2 commits intolynx-family:mainfrom
colinaaa:colin/0910/rust-188
Sep 10, 2025
Merged

chore: bump Rust 1.88.0#1712
gaoachao merged 2 commits intolynx-family:mainfrom
colinaaa:colin/0910/rust-188

Conversation

@colinaaa
Copy link
Copy Markdown
Collaborator

@colinaaa colinaaa commented Sep 10, 2025

This is cherry-picked from #1458.

Summary by CodeRabbit

  • Chores

    • Standardized Rust toolchain to 1.88 via a centralized configuration and removed the older pin.
    • Simplified CI workflows to rely on the central toolchain configuration (removed explicit target declarations).
    • Adjusted build steps to use updated WebAssembly optimizer flags.
    • Reverted a crate-specific release optimization to default release settings.
  • Documentation

    • Updated setup instructions to reflect the new toolchain setup and installation steps.

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).

Also add `wasm32-wasip1` to `targets`.

Co-authored-by: BitterGourd <91231822+gaoachao@users.noreply.github.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Sep 10, 2025

⚠️ No Changeset found

Latest commit: db3fbcf

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Sep 10, 2025

📝 Walkthrough

Walkthrough

Removed explicit automatic installation of the wasm32 target from CI actions and a composite action, introduced a rust-toolchain.toml specifying channel 1.88.0 and wasm targets, removed a rust-toolchain version pin, adjusted docs, removed some Cargo release profile, and added --enable-bulk-memory to wasm-opt invocations.

Changes

Cohort / File(s) Summary
Toolchain files
rust-toolchain, rust-toolchain.toml
Deleted single-line rust-toolchain; added rust-toolchain.toml with channel = "1.88.0", targets = ["wasm32-unknown-unknown","wasm32-wasip1"], profile = "default".
CI workflows
.github/workflows/copilot-setup-steps.yml, .github/workflows/deploy-main.yml
Removed explicit target: wasm32-unknown-unknown from actions-rust-lang/setup-rust-toolchain steps; other workflow settings unchanged.
Composite action (rustup)
.github/actions/rustup/action.yml
Removed rustup target add --toolchain "$toolchain" wasm32-unknown-unknown from the Install step; other action steps unchanged.
Documentation
CONTRIBUTING.md
Removed instruction to add the WASM target; updated setup example to install the Rust toolchain and run pnpm install.
Cargo config
packages/web-platform/web-style-transformer/Cargo.toml
Removed the explicit [profile.release] block (deleted opt-level = 3 and lto = true).
WASM build script
packages/web-platform/web-style-transformer/scripts/build.js
Added --enable-bulk-memory flag to two wasm-opt invocations; command structure otherwise unchanged.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • PupilTong
  • Sherry-hue

I hopped through toml and CI, ears all a-flutter,
Removed a target, gave rust-toolchain a shutter.
Bulk-memory turned on with a cheeky grin,
Wasm paths set, new channel to spin.
— Rabbit dev, nose in the build-smutter 🐇✨

Pre-merge checks (3 passed)

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title concisely and clearly indicates the primary change—upgrading the Rust toolchain to version 1.88.0—and avoids unnecessary details, making it easy for a reviewer to understand the main intent at a glance.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 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

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

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: 1

🧹 Nitpick comments (1)
rust-toolchain.toml (1)

1-4: Optional: tighten profile/components for CI vs. local dev.

  • If CI doesn’t run clippy/rustfmt, consider profile = "minimal" to cut install size/time. Or keep default but list components explicitly to decouple from user profile defaults:
 [toolchain]
 channel = "1.88.0"
 targets = ["wasm32-unknown-unknown", "wasm32-wasip1"]
-profile = "default"
+profile = "default" # or "minimal" in CI if fmt/clippy aren’t required
+# components = ["rustfmt", "clippy"]

References: rustup profiles. (rust-lang.github.io, ehuss.github.io)

📜 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 67ee3e6 and 9c2953c.

📒 Files selected for processing (6)
  • .github/actions/rustup/action.yml (0 hunks)
  • .github/workflows/copilot-setup-steps.yml (0 hunks)
  • .github/workflows/deploy-main.yml (0 hunks)
  • CONTRIBUTING.md (1 hunks)
  • rust-toolchain (0 hunks)
  • rust-toolchain.toml (1 hunks)
💤 Files with no reviewable changes (4)
  • .github/workflows/deploy-main.yml
  • .github/actions/rustup/action.yml
  • rust-toolchain
  • .github/workflows/copilot-setup-steps.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: copilot-setup-steps
🔇 Additional comments (2)
rust-toolchain.toml (2)

1-4: Good pin to 1.88.0; correct WASI target name.

  • Bumping to 1.88.0 and listing wasm32-wasip1 (the rename of wasm32-wasi) is correct for 2025; removal of the old wasm32-wasi on stable happened in 1.84 (Jan 9, 2025).
    References: Rust blog on WASI target rename and schedule; rustc platform docs. (blog.rust-lang.org, doc.rust-lang.org)

1-4: No legacy rust-toolchain file found
Verified that no plain rust-toolchain override file exists in the repository.

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@colinaaa colinaaa requested a review from PupilTong as a code owner September 10, 2025 09:02
@relativeci
Copy link
Copy Markdown

relativeci bot commented Sep 10, 2025

Web Explorer

#5044 Bundle Size — 361.93KiB (-1.37%).

db3fbcf(current) vs 67ee3e6 main#5015(baseline)

Bundle metrics  Change 1 change
                 Current
#5044
     Baseline
#5015
No change  Initial JS 144.4KiB 144.4KiB
No change  Initial CSS 31.84KiB 31.84KiB
No change  Cache Invalidation 0% 0%
No change  Chunks 8 8
No change  Assets 8 8
No change  Modules 218 218
No change  Duplicate Modules 16 16
Change  Duplicate Code 3.34%(+0.6%) 3.32%
No change  Packages 4 4
No change  Duplicate Packages 0 0
Bundle size by type  Change 1 change Improvement 1 improvement
                 Current
#5044
     Baseline
#5015
No change  JS 236.07KiB 236.07KiB
Improvement  Other 94.02KiB (-5.09%) 99.06KiB
No change  CSS 31.84KiB 31.84KiB

Bundle analysis reportBranch colinaaa:colin/0910/rust-188Project dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci bot commented Sep 10, 2025

React Example

#5051 Bundle Size — 238.2KiB (0%).

db3fbcf(current) vs 67ee3e6 main#5022(baseline)

Bundle metrics  no changes
                 Current
#5051
     Baseline
#5022
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 163 163
No change  Duplicate Modules 67 67
No change  Duplicate Code 46.88% 46.88%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#5051
     Baseline
#5022
No change  IMG 145.76KiB 145.76KiB
No change  Other 92.45KiB 92.45KiB

Bundle analysis reportBranch colinaaa:colin/0910/rust-188Project dashboard


Generated by RelativeCIDocumentationReport issue

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Sep 10, 2025

CodSpeed Performance Report

Merging #1712 will improve performances by 12.61%

Comparing colinaaa:colin/0910/rust-188 (db3fbcf) with main (67ee3e6)

Summary

⚡ 1 improvements
✅ 52 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
basic-performance-nest-level-100 6.8 ms 6 ms +12.61%

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

🧹 Nitpick comments (2)
packages/web-platform/web-style-transformer/scripts/build.js (2)

45-47: Double-check “legacy” artifact’s feature budget.

If “legacy” must remain MVP-only, allowing bulk-memory here could enable Binaryen to introduce or preserve bulk-memory ops, raising the required runtime features. If legacy compatibility isn’t a concern anymore, keep as-is; otherwise gate this flag for legacy builds.

Example tweak (only if you need to keep legacy MVP-only):

-execSync(
-  `pnpm wasm-opt --enable-bulk-memory ./dist/legacy_bg.wasm -O3 -o ./dist/legacy_bg.wasm`,
-  { cwd: packageRoot, stdio: 'inherit' },
-);
+execSync(
+  `pnpm wasm-opt ${process.env.LEGACY_ALLOW_BULK ? '--enable-bulk-memory ' : ''}./dist/legacy_bg.wasm -O3 -o ./dist/legacy_bg.wasm`,
+  { cwd: packageRoot, stdio: 'inherit' },
+);

Then set LEGACY_ALLOW_BULK=true in environments where legacy can require that feature.


27-29: Deduplicate wasm-opt invocations.

Minor clean-up to avoid drift between standard/legacy flags.

Apply within these hunks:

-execSync(
-  `pnpm wasm-opt --enable-bulk-memory ./dist/standard_bg.wasm -O3 -o ./dist/standard_bg.wasm`,
-  { cwd: packageRoot, stdio: 'inherit' },
-);
+optimizeWasm('standard', '--enable-bulk-memory');

...

-execSync(
-  `pnpm wasm-opt --enable-bulk-memory ./dist/legacy_bg.wasm -O3 -o ./dist/legacy_bg.wasm`,
-  { cwd: packageRoot, stdio: 'inherit' },
-);
+optimizeWasm('legacy', '--enable-bulk-memory');

Add this helper near the top of the file:

function optimizeWasm(kind, extraFlags = '') {
  const file = `./dist/${kind}_bg.wasm`;
  execSync(
    `pnpm wasm-opt ${extraFlags} ${file} -O3 -o ${file}`,
    { cwd: packageRoot, stdio: 'inherit' },
  );
}

Also applies to: 45-47

📜 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 9c2953c and db3fbcf.

📒 Files selected for processing (2)
  • packages/web-platform/web-style-transformer/Cargo.toml (0 hunks)
  • packages/web-platform/web-style-transformer/scripts/build.js (2 hunks)
💤 Files with no reviewable changes (1)
  • packages/web-platform/web-style-transformer/Cargo.toml
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-09T12:38:10.439Z
Learnt from: CR
PR: lynx-family/lynx-stack#0
File: AGENTS.md:0-0
Timestamp: 2025-09-09T12:38:10.439Z
Learning: Always run a full build (pnpm turbo build) before running any tests

Applied to files:

  • packages/web-platform/web-style-transformer/scripts/build.js
⏰ 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: test-rust / clippy
  • GitHub Check: copilot-setup-steps
🔇 Additional comments (1)
packages/web-platform/web-style-transformer/scripts/build.js (1)

27-29: Verify wasm-opt bulk-memory support
Confirm that the Binaryen v124.0.0 wasm-opt binary installed in packages/web-platform/web-style-transformer recognizes the --enable-bulk-memory flag required for Rust 1.88 WASM optimizations (e.g. run pnpm wasm-opt --help | grep -- '--enable-bulk-memory' in that package).

@colinaaa colinaaa requested a review from gaoachao September 10, 2025 09:24
@gaoachao gaoachao merged commit 64694ef into lynx-family:main Sep 10, 2025
67 of 69 checks passed
@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