Bumping the Rust Nightly Toolchain

Automate Rust nightly toolchain bumps for the Motoko RTS across Nix and Cargo.

588|127|Updated May 11, 2018
One-click install
npx skills add https://github.com/caffeinelabs/motoko --skill bumping-the-rust-nightly-toolchain
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Bumping the Rust Nightly Toolchain
Source: https://github.com/caffeinelabs/motoko/tree/main/.agents/skills/bump-rust-nightly
Command: npx skills add https://github.com/caffeinelabs/motoko --skill bumping-the-rust-nightly-toolchain

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the problem of keeping the Motoko RTS build working when the required rustc-nightly toolchain version changes, preventing broken pinned dependencies and failing reproducibility.

Core Features & Use Cases

  • Nightly toolchain bump workflow: Update the nightly date, overlay, and fixed-output hashes so Nix builds remain deterministic.
  • Cargo lockfile maintenance: Refresh Cargo.lock for both RTS and RTS tests to resolve exact pins after toolchain/runtime dependency changes.
  • Build breakage troubleshooting: Apply targeted fixes for common nightly-only failures (flag changes, JSON target spec typing, panic strategy adjustments, and stale vendored std-deps).

Use case example: When CI starts failing after upstream nightly changes, use this skill to bump the toolchain date, recompute rustStdDepsHash, update Cargo lockfiles, and complete an RTS rebuild while addressing known nightly regressions.

Quick Start

Run the skill steps to bump the nightly date, regenerate the RTS dependency hash, update the Cargo lockfiles, and finish with a green nix build .#rts.

Frequently Asked Questions about Bumping the Rust Nightly Toolchain

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bump the Rust nightly toolchain for Motoko RTS without breaking Nix builds?

To bump the Rust nightly toolchain for Motoko RTS, update the nightly date in `nix/pkgs.nix`, recompute the fixed-output `rustStdDepsHash` in `nix/rts.nix`, and refresh `flake.lock` to keep Nix builds deterministic.

Why does the Motoko RTS build fail after a Rust nightly update?

The Motoko RTS build fails after a Rust nightly update due to nightly-specific compiler regressions, flag changes, JSON target spec typing adjustments, or stale vendored std dependencies that require targeted troubleshooting fixes.

What is the best way to resolve Cargo lockfile conflicts after updating the Rust nightly compiler?

Resolving Cargo lockfile conflicts after updating the Rust nightly compiler requires refreshing `Cargo.lock` for both the RTS and RTS tests to resolve exact dependency pins affected by the toolchain runtime changes.

How do I fix a mismatched `rustStdDepsHash` when rebuilding the Motoko RTS in Nix?

Fixing a mismatched `rustStdDepsHash` when rebuilding the Motoko RTS in Nix requires regenerating the fixed-output hash in `nix/rts.nix` after updating the pinned nightly toolchain version.

When do I need to adjust the panic strategy and JSON target specs for a Rust nightly bump?

Adjusting the panic strategy and JSON target specs for a Rust nightly bump is needed when upstream nightly changes alter RTS build options, causing deterministic rebuilds to fail until the configurations are updated.

Can I use this approach to update Rust nightly for canister-language infrastructure outside of Motoko?

This approach targets canister-language infrastructure maintenance specifically for the Motoko RTS, focusing on its Nix overlay, Cargo lockfiles, and fixed-output dependencies rather than general canister environments.