Skip to content

[sonic-slave-trixie]: Upgrade Rust toolchain to 1.88.0#26877

Open
netobani wants to merge 2 commits intosonic-net:masterfrom
netobani:upgrade/rust-1.88
Open

[sonic-slave-trixie]: Upgrade Rust toolchain to 1.88.0#26877
netobani wants to merge 2 commits intosonic-net:masterfrom
netobani:upgrade/rust-1.88

Conversation

@netobani
Copy link
Copy Markdown

Why I did it

The trixie build slave currently installs Rust 1.86.0. Some Rust crates used by SONiC's tooling have started requiring newer toolchains — most recently gimli 0.33.0 (pulled in by cargo-tarpaulin >= 0.35.2) which needs Rust 1.88+.

To keep the slave aligned with what the ecosystem expects, bump the toolchain to 1.88.0.

How I did it

  • sonic-slave-trixie/Dockerfile.j2: bump rustup --default-toolchain from 1.86.0 to 1.88.0.
  • Drop the cargo-tarpaulin@0.35.1 version pin and the accompanying comment — the pin was a workaround for the Rust 1.86 limitation and is no longer needed.

How to verify it

  • Rebuild the trixie slave image: make sonic-slave-trixie-build
  • Inside the slave: rustc --version should report 1.88.0, and cargo tarpaulin --version should resolve to the latest release.
  • Run any Rust-based package builds (e.g. sonic-nettools, watchdog images) and confirm they still build clean.

Bump the trixie build slave's Rust toolchain from 1.86.0 to 1.88.0.

This also unpins cargo-tarpaulin so the latest version can be installed
again — the previous pin to 0.35.1 was a workaround for cargo-tarpaulin
0.35.2 pulling in gimli 0.33.0, which requires Rust 1.88+. With the
toolchain upgraded, that workaround is no longer needed.

Signed-off-by: NetoBani <n3t0ban1@gmail.com>
@netobani netobani requested a review from lguohan as a code owner April 17, 2026 20:25
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown

@banidoru banidoru left a comment

Choose a reason for hiding this comment

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

  • Clean, minimal change — toolchain bump + unpin looks correct.
  • --locked on cargo-tarpaulin install is good; mitigates most supply-chain risk.
  • Minor: unpinning cargo-tarpaulin means future builds pick up whatever's latest — if a broken release lands, slave builds break. Acceptable risk given the pin was a workaround, but worth noting.
  • No cross-build or other Dockerfile.j2 sections affected.
  • Commit is properly signed-off.

Comment thread sonic-slave-trixie/Dockerfile.j2 Outdated
Copy link
Copy Markdown

@banidoru banidoru left a comment

Choose a reason for hiding this comment

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

  • The removal of the version pin for cargo-tarpaulin makes the build non-reproducible and susceptible to future breakages.
  • The version should be pinned to a specific, known-good version to ensure build stability.

Comment thread sonic-slave-trixie/Dockerfile.j2
Copy link
Copy Markdown

@banidoru banidoru left a comment

Choose a reason for hiding this comment

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

  • Rust 1.86.0 → 1.88.0 bump is clean; single-file change, no side effects on cross-build or other Dockerfile sections.
  • Removing the version pin comment is correct — the workaround reason (gimli 0.33.0 needing 1.88+) no longer applies.
  • --locked retained on cargo install — good.
  • Agree with existing feedback: re-pinning cargo-tarpaulin to the current latest (e.g. 0.35.2) would be better for reproducibility, but not blocking.
  • Commit is signed-off and properly scoped.

@netobani
Copy link
Copy Markdown
Author

Automated review follow-up:

  • Addressed: pinned cargo-tarpaulin to 0.35.2 in sonic-slave-trixie/Dockerfile.j2 for reproducible builds (46034d8).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown

@banidoru banidoru left a comment

Choose a reason for hiding this comment

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

  • Rust toolchain bump 1.86.0 → 1.88.0 looks correct and aligns with ecosystem requirements (gimli 0.33.0 needs 1.88+).
  • cargo-tarpaulin now pinned to 0.35.2 with --locked — reproducibility concern from prior review is addressed.
  • Old workaround comments removed cleanly; new comment explains the pin rationale.
  • No other files affected; change is minimal and focused.
  • LGTM.

Copy link
Copy Markdown

@banidoru banidoru left a comment

Choose a reason for hiding this comment

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

  • The dependency is now pinned to version , ensuring reproducible builds.
  • This change directly addresses all previous review feedback.
  • No new issues were found in the diff.

Copy link
Copy Markdown

@banidoru banidoru left a comment

Choose a reason for hiding this comment

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

  • Rust 1.86.0 → 1.88.0 upgrade is straightforward and correctly scoped to trixie slave only
  • cargo-tarpaulin now pinned to 0.35.2 with --locked — addresses prior reproducibility concern
  • Comment explaining the pin rationale is clear and helpful
  • No other files affected; change is minimal and safe
  • Prior review threads resolved appropriately

Copy link
Copy Markdown

@banidoru banidoru left a comment

Choose a reason for hiding this comment

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

All reviewers approved. LGTM.

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.

3 participants