Skip to content

chore: upgrade Rust to 1.91.1 (Part 1 & 2)#3899

Merged
jolestar merged 1 commit into
mainfrom
rust_1.91.1_1
Jan 8, 2026
Merged

chore: upgrade Rust to 1.91.1 (Part 1 & 2)#3899
jolestar merged 1 commit into
mainfrom
rust_1.91.1_1

Conversation

@jolestar

@jolestar jolestar commented Jan 6, 2026

Copy link
Copy Markdown
Contributor

Part 1: Core Rust Upgrade to 1.91.1

Overview

First part of the gradual Rust upgrade from 1.82.0 to 1.91.1 (tracked in #3777).

Summary

This PR implements the core infrastructure changes needed to upgrade the Rust toolchain from 1.82.0 to 1.91.1. It includes dependency upgrades required for compatibility, linker fixes for wasmer, and temporarily relaxes lint checks to accommodate new compiler warnings introduced in Rust 1.91.

Changes

1. Rust Version Upgrade

  • rust-toolchain.toml: 1.82.0 → 1.91.1
  • Cargo.toml: Update rust-version field to 1.91.1
  • .github/actions/rust-setup/action.yaml: Update Rust toolchain to 1.91.1

2. Dependency Upgrades (Required)

  • wasmer: 4.2.5 → 4.3.3 (compatibility with Rust 1.91)
  • wasmer-types: 4.2.5 → 4.3.3
  • wasmer-compiler-singlepass: 4.2.2 → 4.3.3

3. Wasmer Link Fix

  • Add probestack_fix.c: Provides weak __rust_probestack symbol
  • Add moveos/moveos-wasm/build.rs: Compile C fix for x86_64
  • Add cc build dependency to moveos-wasm

4. Temporarily Relax Lint Checks

  • Modify Makefile: Change clippy from -D warnings to -W warnings
  • Reason: Rust 1.91 introduces new compiler warnings (lifetime syntax, etc.)
  • Note: These will be fixed in Part 2

Verification Checklist

  • cargo build --profile optci --workspace --bins succeeds
  • Unit tests pass
  • clippy runs successfully with relaxed warnings

Expected Warnings (Temporary)

The following warnings are expected and acceptable in this PR:

  • mismatched_lifetime_syntaxes (will be fixed in Part 2)
  • empty_line_after_doc_comments (will be fixed in Part 2)
  • Various other new clippy warnings (will be fixed in Part 2)

Technical Details

Why wasmer upgrade is required:
Rust 1.91 changed the __rust_probestack implementation, causing undefined symbol errors with wasmer 4.2.5. See:

Why probestack_fix.c works:
The C file provides a weak symbol definition that can be overridden by the actual implementation if needed. This allows wasmer to link successfully on x86_64.

Platform-specific:
The fix only applies to x86_64 architecture. ARM platforms are not affected by this issue.

Related Issues

Test Plan

  • Build verification: ✅ Completed
  • Unit tests: ✅ Passed
  • Integration tests: Pending CI
  • Cross-platform tests: Pending CI

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings January 6, 2026 14:35
@vercel

vercel Bot commented Jan 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
rooch-portal-v2.1 Ready Ready Preview, Comment Jan 8, 2026 0:49am
test-portal Ready Ready Preview, Comment Jan 8, 2026 0:49am
1 Skipped Deployment
Project Deployment Review Updated (UTC)
rooch Ignored Ignored Preview Jan 8, 2026 0:49am

@github-actions

github-actions Bot commented Jan 6, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
cargo/cc >= 1.0.0, < 2.0.0 🟢 6.2
Details
CheckScoreReason
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1030 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 7Found 12/16 approved changesets -- score normalized to 7
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Binary-Artifacts🟢 10no binaries found in the repo
Vulnerabilities🟢 100 existing vulnerabilities detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 10security policy file detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0

Scanned Files

  • moveos/moveos-wasm/Cargo.toml

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR attempts to upgrade the Rust toolchain from 1.82.0 to 1.91.1. However, there is a critical issue: Rust version 1.91.1 does not exist. As of January 2025, the Rust release timeline shows that stable versions go from 1.83 to 1.84, with 1.82.0 being a legitimate version released in late 2024. Version 1.91 has not been released yet and won't be for several months. This appears to be a version number confusion - perhaps the intended target was 1.83.x or 1.84.x, or there may be a misunderstanding about Rust's version numbering.

Key changes attempted:

  • Update Rust toolchain version across configuration files
  • Upgrade wasmer dependencies from 4.2.x to 4.3.3
  • Add probestack linker fix for x86_64 compatibility
  • Temporarily relax clippy warnings from errors to warnings

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
rust-toolchain.toml Changes Rust version to non-existent 1.91.1
Cargo.toml Updates rust-version field and wasmer dependencies to non-existent Rust version
.github/actions/rust-setup/action.yaml Updates GitHub Actions to use non-existent Rust toolchain
moveos/moveos-wasm/probestack_fix.c Adds weak symbol fix for __rust_probestack linking issue
moveos/moveos-wasm/build.rs Compiles C fix for x86_64 targets
moveos/moveos-wasm/Cargo.toml Adds cc build dependency
Makefile Changes clippy from deny to warn mode
Cargo.lock Updates to non-existent version 4 format and reflects dependency changes

Comment thread rust-toolchain.toml
[toolchain]

channel = "1.82.0" No newline at end of file
channel = "1.91.1" No newline at end of file

Copilot AI Jan 6, 2026

Copy link

Choose a reason for hiding this comment

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

The Rust version is being downgraded from 1.82.0 to 1.91.1. However, Rust 1.91.1 is actually older than 1.82.0. Rust versioning follows semantic versioning where 1.82.0 was released after 1.91.1. This appears to be a version number error. The intended upgrade target might be 1.91 (a future version), but as of January 2025, Rust 1.91 has not been released yet. Please verify the correct target version for this upgrade.

Suggested change
channel = "1.91.1"
channel = "1.82.0"

Copilot uses AI. Check for mistakes.
Comment thread Cargo.toml
publish = false
repository = "https://github.com/rooch-network/rooch"
rust-version = "1.82.0"
rust-version = "1.91.1"

Copilot AI Jan 6, 2026

Copy link

Choose a reason for hiding this comment

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

The rust-version field is being set to 1.91.1, which is inconsistent with the actual Rust release timeline. As of January 2025, Rust 1.91 has not been released yet (current stable is around 1.84). This appears to be a version number error. Please verify the correct target version.

Suggested change
rust-version = "1.91.1"
rust-version = "1.84"

Copilot uses AI. Check for mistakes.
Comment thread Makefile Outdated
rust-clippy:
@echo "🔍 Running Rust clippy linter..."
cargo clippy --workspace --all-targets --all-features --tests --benches -- -D warnings
cargo clippy --workspace --all-targets --all-features --tests --benches -- -W warnings

Copilot AI Jan 6, 2026

Copy link

Choose a reason for hiding this comment

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

Changing clippy from deny warnings (-D) to warn (-W) means that warnings will no longer fail the CI build. While the PR description explains this is temporary for Part 1, this creates a risk where new warnings could be introduced without being caught. Consider using a more targeted approach, such as allowing only the specific new lints introduced in the newer Rust version while keeping the strict check for other warnings.

Suggested change
cargo clippy --workspace --all-targets --all-features --tests --benches -- -W warnings
cargo clippy --workspace --all-targets --all-features --tests --benches -- -D warnings

Copilot uses AI. Check for mistakes.
@jolestar jolestar requested a review from pause125 as a code owner January 6, 2026 15:03
@jolestar jolestar changed the title chore: upgrade Rust to 1.91.1 (Part 1) chore: upgrade Rust to 1.91.1 (Part 1 & 2) Jan 7, 2026
This PR implements Part 1 of the gradual Rust upgrade from 1.82.0 to 1.91.1
as tracked in issue #3777.

## Changes

### 1. Rust Version Upgrade
- `rust-toolchain.toml`: 1.82.0 → 1.91.1
- `Cargo.toml`: Update `rust-version` field to 1.91.1
- `.github/actions/rust-setup/action.yaml`: Update Rust toolchain to 1.91.1

### 2. Dependency Upgrades (Required)
- `wasmer`: 4.2.5 → 4.3.3 (compatibility with Rust 1.91)
- `wasmer-types`: 4.2.5 → 4.3.3
- `wasmer-compiler-singlepass`: 4.2.2 → 4.3.3

### 3. Wasmer Link Fix
- Add `probestack_fix.c`: Provides weak `__rust_probestack` symbol
- Add `moveos/moveos-wasm/build.rs`: Compile C fix for x86_64
- Add `cc` build dependency to moveos-wasm

### 4. Temporarily Relax Lint Checks
- Modify `Makefile`: Change clippy from `-D warnings` to `-W warnings`
- **Reason**: Rust 1.91 introduces new compiler warnings (lifetime syntax, etc.)
- **Note**: These will be fixed in Part 2

## Verification
- ✅ `cargo build --profile optci --workspace --bins` succeeds
- ✅ Unit tests pass
- ✅ clippy runs successfully with relaxed warnings

## Technical Details

**Why wasmer upgrade is required:**
Rust 1.91 changed the `__rust_probestack` implementation, causing undefined
symbol errors with wasmer 4.2.5. See:
- rust-lang/rust#142612
- rust-lang/rust#143835

**Why probestack_fix.c works:**
The C file provides a weak symbol definition that can be overridden by the
actual implementation if needed. This allows wasmer to link successfully
on x86_64.

**Platform-specific:**
The fix only applies to x86_64 architecture. ARM platforms are not affected
by this issue.

## Related Issues
- Parent issue: #3777
- Closes #3897

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@jolestar jolestar merged commit 9e5f4ed into main Jan 8, 2026
30 checks passed
@jolestar jolestar deleted the rust_1.91.1_1 branch January 8, 2026 01:44
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.

Part 1: Core Rust Upgrade to 1.91.1

2 participants