$ the-wire · showcase
rustup adds --check flag and toolchain pin, libc gains path constants
By RepoJournal · Filed · About Rust
rustup now offers a --check flag for update to return exact exit codes and a new toolchain pin subcommand, while libc adds _PATH_BSHELL and _PATH_DEFPATH constants across Unix platforms.
rustup's update command now supports a --check flag. When run with --check, it returns Exitcode(100) if any toolchains were updated or installed, and Exitcode(0) otherwise, leaving existing behavior unchanged without the flag [1]. This gives scripts a clear signal for whether an update actually changed something.
The same toolchain brings a new rustup toolchain pin subcommand, built on dependency PRs #5041 and #5044, closing issue #2868 [2]. The command lets users pin a specific toolchain for a project, an operation many have requested. In the same repo, all uses of anyhow::Result<> are now qualified, a style cleanup generated with Copilot and manually reviewed [3].
In libc, the Unix modules now define _PATH_BSHELL and _PATH_DEFPATH where the platform provides them, sourced from each platform's paths.h [4]. A handful of platforms only have _PATH_BSHELL. The need traces to a Zulip discussion about including paths.h macros, and the constants mirror what Rust's standard library is exploring [4]. This is not a breaking change but a widening of available constants.
On crates.io, the "Report crate" button now appears only for logged-in users. The change is an experiment to reduce spam reports, extracted from PR #13023, and the support page and its footer link remain public [5]. Owner invite messages now add "Crates.io user" to clarify that usernames are crates.io identities, independent of future GitHub usernames [6]. Both are small interface shifts, not API changes.
Action items
- → Review your rustup automation: consider adding --check to update scripts to detect no-op runs via exit code rust-lang/rustup [monitor]
- → With libc now exposing _PATH_BSHELL and _PATH_DEFPATH, check if you can drop hard-coded shell and PATH lookups rust-lang/libc [plan]
- → Note the crates.io report button change: logged-out users can no longer report crates, affecting any tooling that relied on anonymous reports rust-lang/crates.io [plan]
References
- [1] feat(cli): add --check flag to rustup update to return exact Exitcode ↗ rust-lang/rustup
- [2] feat(config): add `rustup toolchain pin` subcommand ↗ rust-lang/rustup
- [3] style: qualify `anyhow::Result<>` everywhere ↗ rust-lang/rustup
- [4] Unix: Add `_PATH_BSHELL` and `_PATH_DEFPATH` where available ↗ rust-lang/libc
- [5] Hide the report button for logged-out users ↗ rust-lang/crates.io
- [6] In owner invite messages, use crates.io username ↗ rust-lang/crates.io