Skip to content

ci: pin Rust toolchain and make CI actually respect it - #53

Merged
collinsezedike merged 5 commits into
drydocs:mainfrom
Tobi-8:pin-rust-version
Jul 31, 2026
Merged

ci: pin Rust toolchain and make CI actually respect it#53
collinsezedike merged 5 commits into
drydocs:mainfrom
Tobi-8:pin-rust-version

Conversation

@Tobi-8

@Tobi-8 Tobi-8 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds rust-toolchain.toml pinned to 1.96.0 so rustup installs the same toolchain locally and in CI regardless of when either runs, preventing silent wasm drift from toolchain version mismatches. Bumping the pin is now a deliberate, reviewable commit instead of happening silently whenever GitHub's stable runner image updates.

CI's own toolchain-install step also needed a fix: dtolnay/rust-toolchain's toolchain input is hard-required and has no fallback to read a rust-toolchain.toml file, so simply adding the pin file wasn't enough on its own, CI would have kept floating stable exactly as before. The install step now uses plain rustup commands instead, which auto-detect and install whatever the toolchain file pins, verified directly against the CI run log.

Both demo-consumer and asserter-consumer test snapshots are regenerated against the properly pinned toolchain.

Closes #38

Test plan

  • cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings, and cargo test pass locally
  • CONTRACT.md not applicable, no public interface change
  • scripts/testnet-smoke.sh not applicable, no contract behavior change
  • Verified CI's own run log shows 1.96.0 actually being installed, not stable

…er snapshot

Add rust-toolchain.toml pinned to 1.96.0 (current stable) so that
rustup picks the same toolchain locally and in CI regardless of when
either runs, preventing silent wasm drift from toolchain version
mismatches. Bumping the pin is now a deliberate, reviewable commit.

Regenerate the demo-consumer test snapshot against the pinned version
so it is back in sync.

@collinsezedike collinsezedike left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

rust-toolchain.toml is correct and helps local rustup invocations, but .github/workflows/ci.yml isn't updated, and CI doesn't actually respect it. The log for this PR's own run shows dtolnay/rust-toolchain@stable resolving toolchain: stable and running rustup toolchain install stable ..., completely ignoring the new pin. CI is still floating exactly as before, which is the actual source of every drift incident this cycle, so this doesn't achieve what the PR describes ("preventing silent wasm drift... regardless of when CI runs").

Fix: change the step to dtolnay/rust-toolchain@master and omit the toolchain input entirely; that action reads rust-toolchain.toml automatically when no explicit toolchain is given. Keep targets/components as a fallback or drop them since the file already specifies both.

@collinsezedike collinsezedike left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

CI now genuinely installs the pinned 1.96.0, confirmed directly from the run log rather than just assumed. dtolnay/rust-toolchain's toolchain input turned out to be hard-required with no file-reading fallback, so the fix ended up being to drop that action entirely and rely on rustup's own auto-detection of rust-toolchain.toml (verified locally: rustup show picks 1.96.0 with zero explicit version anywhere in CI config). Also regenerated both demo-consumer and asserter-consumer snapshots against the properly pinned toolchain. fmt, clippy, build, and all 67 tests pass. Thanks for starting this one, take a look at the other open issues when you get a chance.

@collinsezedike collinsezedike changed the title pin Rust toolchain via rust-toolchain.toml and regenerate demo-consum… ci: pin Rust toolchain and make CI actually respect it Jul 31, 2026
@collinsezedike
collinsezedike merged commit 066ee8b into drydocs:main Jul 31, 2026
1 check passed
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.

[Chore] Pin the Rust toolchain with rust-toolchain.toml

2 participants