Skip to content

nix: Use rustup toolchain over nix packages rustc in devshell#5712

Merged
kaukabrizvi merged 11 commits intoaws:mainfrom
kaukabrizvi:fix/nix-rustup-toolchain
Feb 12, 2026
Merged

nix: Use rustup toolchain over nix packages rustc in devshell#5712
kaukabrizvi merged 11 commits intoaws:mainfrom
kaukabrizvi:fix/nix-rustup-toolchain

Conversation

@kaukabrizvi
Copy link
Copy Markdown
Contributor

@kaukabrizvi kaukabrizvi commented Jan 28, 2026

Goal

Ensure Rust integration tests use the intended rustup-managed toolchain instead of the Nix rustc wrapper.

Why

PR #5711 bumped the MSRV, but CI continued failing with errors indicating rustc 1.86.0 was being used despite a newer toolchain being installed via rustup. In Nix-based devShells, Cargo can still resolve to the Nix rustc wrapper unless the rustup toolchain is explicitly prioritized in the dev shell. This PR removes the previous installation via pkgs.rustc / pkgs.cargo in favor of the rustup-driven toolchain installation to keep Rust versions aligned and up to date.

How

  • Rust toolchain selection is now determined via nix/rust-toolchain.toml
  • Ensure rustup-installed cargo/rustc take precedence in the devShell PATH
  • Remove reliance on the Nix package version of rust
  • Simplify rust_test to rely on rustup’s implicit toolchain resolution (no explicit installation needed anymore!)

Callouts

Testing

Rebased on #5711 and ran rust_test locally inside of nix and confirmed tests pass

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions github-actions bot added the s2n-core team label Jan 28, 2026
@kaukabrizvi kaukabrizvi changed the title nix: Force rustup toolchain rustc in rust_test nix: Prefer rustup toolchain over nix rustc in devshell Jan 29, 2026
@kaukabrizvi kaukabrizvi requested a review from dougch January 29, 2026 00:55
@kaukabrizvi kaukabrizvi changed the title nix: Prefer rustup toolchain over nix rustc in devshell nix: Prefer rustup toolchain over nix packages rustc in devshell Jan 29, 2026
@kaukabrizvi kaukabrizvi changed the title nix: Prefer rustup toolchain over nix packages rustc in devshell nix: Use rustup toolchain over nix packages rustc in devshell Jan 29, 2026
@dougch dougch self-requested a review January 29, 2026 19:36
@kaukabrizvi kaukabrizvi requested a review from jmayclin February 4, 2026 21:35
@kaukabrizvi kaukabrizvi removed the request for review from jmayclin February 9, 2026 19:45
@kaukabrizvi kaukabrizvi requested a review from jouho February 9, 2026 19:52
@kaukabrizvi kaukabrizvi added this pull request to the merge queue Feb 11, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 11, 2026
@kaukabrizvi kaukabrizvi added this pull request to the merge queue Feb 11, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 11, 2026
@kaukabrizvi kaukabrizvi added this pull request to the merge queue Feb 12, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 12, 2026
@kaukabrizvi kaukabrizvi added this pull request to the merge queue Feb 12, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 12, 2026
@kaukabrizvi kaukabrizvi added this pull request to the merge queue Feb 12, 2026
Merged via the queue into aws:main with commit 5065032 Feb 12, 2026
56 checks passed
@kaukabrizvi kaukabrizvi deleted the fix/nix-rustup-toolchain branch February 12, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants