Bazel: Update Rust toolchain to nightly/2026-01-22 and rules_rust to 0.68.1.codeql.1#21343
Bazel: Update Rust toolchain to nightly/2026-01-22 and rules_rust to 0.68.1.codeql.1#21343
Conversation
…0.68.1.codeql.1 Update the Rust nightly toolchain from nightly/2025-08-01 to nightly/2026-01-22 (rustc 1.95.0-nightly), and rules_rust from 0.66.0 to 0.68.1.codeql.1. The new nightly changed how stdlib metadata is distributed: .rlib files now contain only a metadata stub, with full metadata in separate .rmeta files. rules_rust's stdlib glob doesn't include *.rmeta, causing 'only metadata stub found' errors. This is patched via a custom registry entry (0.68.1.codeql.1). Upstream bug: bazelbuild/rules_rust#3859
There was a problem hiding this comment.
Pull request overview
Updates the Bazel Rust toolchain and rules_rust dependency to align the repo with a newer Rust nightly, including a local rules_rust registry override to handle Rust’s new .rmeta stdlib metadata distribution.
Changes:
- Bump Bazel
rules_rustto0.68.1.codeql.1and Rust nightly toolchain tonightly/2026-01-22, including updated toolchain sha256s. - Update the Rust stable toolchain used by Rust QL extractor tests from
1.90to1.93. - Add an in-repo Bazel module registry entry for
rules_rust@0.68.1.codeql.1that patches stdlib globs to include*.rmeta.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
MODULE.bazel |
Updates rules_rust dep, Rust nightly version, and toolchain sha256s. |
rust/ql/test/rust-toolchain.toml |
Bumps stable Rust channel used in Rust extractor QL tests. |
rust/extractor/src/nightly-toolchain/rust-toolchain.toml |
Bumps extractor nightly rustup toolchain date. |
misc/bazel/registry/modules/rules_rust/metadata.json |
Adds registry metadata for the custom rules_rust module entry. |
misc/bazel/registry/modules/rules_rust/0.68.1.codeql.1/source.json |
Points at upstream rules_rust-0.68.1 tarball and applies the local patch. |
misc/bazel/registry/modules/rules_rust/0.68.1.codeql.1/patches/include_rmeta_in_stdlib.patch |
Extends stdlib glob to include *.rmeta to avoid invalid metadata errors. |
misc/bazel/registry/modules/rules_rust/0.68.1.codeql.1/MODULE.bazel |
Defines the module metadata/deps for the custom rules_rust version. |
|
@paldepind there are also some extraction failures (e.g. |
|
@paldepind ah wait, the test errors and changes are from the changes to the rust-toolchain files used in testing. That can be done as follow-up (I'll leave that to you). Reverting the rust-toolchain.toml changes here should have a green CI 👍 |
|
|
|
@paldepind ah, there were some test changes. Nothing too scary as it seems to me. |
paldepind
left a comment
There was a problem hiding this comment.
LGTM! No changes to the expected files after reverting the version change in rust/ql/test/rust-toolchain.toml.
Thanks for doing this 🙏
Summary
Update the Rust nightly toolchain from
nightly/2025-08-01tonightly/2026-01-22(rustc 1.95.0-nightly), andrules_rustfrom0.66.0to0.68.1.codeql.1.rules_rust patch
The new Rust nightly changed how stdlib metadata is distributed:
.rlibfiles now contain only a ~440-byte metadata stub, with full metadata in separate.rmetafiles.rules_rust's stdlib glob inrepository_utils.bzldoesn't include*.rmeta, causing:This is patched via a custom registry entry (
0.68.1.codeql.1) that adds*.rmetato the stdlib glob.Upstream bug: bazelbuild/rules_rust#3859
Changes
rules_rust0.66.0→0.68.1.codeql.1,RUST_VERSIONnightly/2025-08-01→nightly/2026-01-22, updated sha256s1.90→1.93nightly-2025-06-01→nightly-2026-01-220.68.1.codeql.1registry entry withinclude_rmeta_in_stdlib.patch