Skip to content

Part 1: Core Rust Upgrade to 1.91.1 #3897

@jolestar

Description

@jolestar

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

Changes

1. Rust Version Upgrade

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

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
  • Modify crates/rooch/build.rs: Compile C fix and add linker flags
  • Modify crates/rooch-genesis/build.rs: Same fix for genesis crate

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
  • make test-rust-unit passes
  • make test-rust-integration passes
  • make test-move passes
  • make test-move-examples passes
  • Cross-platform tests (Linux/macOS/Windows) pass

Expected Warnings (Temporary)

The following warnings are expected and acceptable in this PR:

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

Related Issues

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions