Skip to content

Declare Rust MSRV and warn against distro-packaged toolchains - #72

Open
AnonRish wants to merge 1 commit into
xai-org:mainfrom
AnonRish:fix/rust-msrv
Open

Declare Rust MSRV and warn against distro-packaged toolchains#72
AnonRish wants to merge 1 commit into
xai-org:mainfrom
AnonRish:fix/rust-msrv

Conversation

@AnonRish

@AnonRish AnonRish commented Aug 16, 2026

Copy link
Copy Markdown

Summary

  • Declare rust-version = "1.85" under [workspace.package], matching
    the edition 2024 requirement already declared there
  • State the 1.85+ minimum explicitly in the prerequisites section, next
    to the existing protoc-version rationale
  • Warn against distro-packaged Rust toolchains, which are commonly older
    than edition 2024 requires

Problem

The workspace sets edition = "2024" (requires rustc >=1.85) but no
Cargo.toml declares rust-version, and no doc states a minimum. Installing
via a Linux distribution's package manager -- a natural reading of "install
a Rust toolchain," and what many CI base images ship by default -- commonly
gives a too-old toolchain. On Ubuntu 24.04 (rustc 1.75.0) this fails with:

feature `edition2024` is required
The package requires the Cargo feature called `edition2024`, but that
feature is not stabilized in this version of Cargo (1.75.0).

which reads like an unstable/nightly-feature problem rather than a version
mismatch.

Fix

  • Add rust-version = "1.85", standard MSRV metadata that crates.io and
    MSRV-aware tooling read.
  • State the requirement in prose, next to the protoc callout that already
    explains why an old version fails the same way.

Verification

  • Reproduced the failure above on a clean Ubuntu 24.04 container with
    apt install rustc cargo.
  • Confirmed no Cargo.toml in the repo declared rust-version and no doc
    mentioned a minimum version, via grep across **/*.md and
    **/Cargo.toml.

A toolchain old enough to reject edition2024 outright (1.75.0, tested
above) fails at manifest-parse time, before rust-version is checked, so
this doesn't change that specific error message -- it's correct, standard
metadata regardless, and should produce a clean version error on
toolchains between "supports rust-version" and "supports edition2024." The
doc change is the part verified to fix the reported symptom directly.

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.

1 participant