Skip to content

Added Rust 1.99.1 - #4311

Merged
UebelAndre merged 9 commits into
bazelbuild:mainfrom
UebelAndre:rustup
Oct 26, 2026
Merged

UebelAndre merged 9 commits into
bazelbuild:mainfrom
UebelAndre:rustup

Conversation

@UebelAndre

@UebelAndre UebelAndre commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

@UebelAndre
UebelAndre marked this pull request as ready for review October 1, 2026 18:11
@UebelAndre
UebelAndre requested a review from slackito October 1, 2026 18:12
@UebelAndre UebelAndre added the presubmit-auto-run Presubmit jobs will be triggered for new changes automatically without reviewer's approval label Oct 3, 2026
@UebelAndre
UebelAndre force-pushed the rustup branch 2 times, most recently from d3224dd to d856224 Compare October 3, 2026 16:15
@UebelAndre UebelAndre changed the title Added Rust 1.99.0 Added Rust 1.99.1 Oct 19, 2026
@scentini
scentini requested review from inzombieack and removed request for slackito October 22, 2026 08:52
@UebelAndre
UebelAndre enabled auto-merge October 22, 2026 14:39
@UebelAndre

Copy link
Copy Markdown
Collaborator Author

@krasimirgg do you have a sec to review this one as well? It's mostly auto-generated with some minor fixes. Easy to go commit by commit. This pattern has been used for every other rust version upgrade I've done in the past:

@UebelAndre
UebelAndre added this pull request to the merge queue Oct 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Oct 25, 2026
@UebelAndre
UebelAndre added this pull request to the merge queue Oct 25, 2026
Merged via the queue into bazelbuild:main with commit d99ed24 Oct 26, 2026
3 checks passed
AleDema pushed a commit to AleDema/ic that referenced this pull request Nov 18, 2026
Upgrades `rules_rust` from 0.74.0 to
[0.75.0](https://github.com/bazelbuild/rules_rust/releases/tag/0.75.0),
the latest release.

## Changes

- **`bazel/rust.MODULE.bazel`**: version bump. BCR's `rules_rust/0.75.0`
has no patches of its own, and `rules_rust` is still depended on only by
the root module (`bazel mod explain rules_rust`).
- **`bazel/rules_rust_static_runtime.patch`**: content unchanged. Only
the `index` lines and hunk positions are regenerated, so the patch
applies to the 0.75.0 release tarball with zero fuzz and zero offset
(the old one applied with offsets of up to 102 lines). The patch is
still needed, because 0.75.0 still links the *dynamic* C++ runtime into
dylib/cdylib crates. It also still chooses the runtime in exactly the
three places the patch routes through `cc_runtime_libs`
(`collect_inputs`, `_add_native_link_flags`, and rustdoc's doc-test link
flags). Unlike the last bump, no new selection site appeared that the
patch would miss.
- **`Cargo.Bazel.json.lock`**: repinned with `./bin/bazel-pin.sh
--force`. Only the `checksum` changes, since it covers the `cargo-bazel`
version. The generated crate graph is identical.
- **Four Rust files, via the Autofix commit**: whitespace-only, see
below.

## Formatting changes from the Autofix commit

We don't set `rustfmt_version`, so `bazel run :rustfmt`, which CI's
Autofix job runs, uses rules_rust's default nightly rustfmt. 0.75.0
moves that from `nightly/2026-08-20` to `nightly/2026-10-15` (rustfmt
1.11.0-nightly). The newer nightly indents `*` continuation lines that
start at column 0 in block comments by one space, aligning them under
the `*` of `/*`. Autofix applied that to four files in 82449b5, and
all 50 changed lines differ only by that one space. Without this commit,
every later PR would get the same Autofix commit. Stable `cargo fmt --
--check` (rustfmt 1.10.0-stable, which `ci/scripts/rust-lint.sh` runs)
passes on the result, so the two formatters still agree.

## Upstream changes that touch our setup

- **The rustc 1.99.1 toolchain downloads are now checksum-verified.**
0.74.0's built-in `known_shas.bzl` has no 1.99.x entries and we pass no
`sha256s` to `rust.toolchain`, so those archives were fetched with an
empty `sha256`. 0.75.0 ships their checksums
([bazelbuild/rules_rust#4311](bazelbuild/rules_rust#4311)).
-
[bazelbuild/rules_rust#4347](bazelbuild/rules_rust#4347)
declares the C++ toolchain type through rules_cc's `use_cc_toolchain()`.
With our rules_cc 0.2.22 that is
`@bazel_tools//tools/cpp:toolchain_type`, the same type the
hermetic-llvm wrapper toolchains in `//bazel` register under. This
needed checking because rules_rust requests that type with `mandatory =
False`, so a mismatch would silently resolve no C++ toolchain instead of
failing.
-
[bazelbuild/rules_rust#4339](bazelbuild/rules_rust#4339)
adds a `cargo_toolchain`, and `cargo_build_script` now fails when the
Cargo and Rust toolchains come from different releases. The `rust`
extension registers a matching `cargo_toolchain` next to every
`rust_toolchain`, and we register only 1.99.1, so the two can't
disagree.
-
[bazelbuild/rules_rust#4271](bazelbuild/rules_rust#4271)
changes how legacy doc tests map paths into runfiles: the writer now
strips the root of every action input. That replaces the explicit
runtime-lib handling our hermetic-llvm doc-test links relied on. The
runtime libs still reach those inputs through the patched
`collect_inputs`, so they stay covered.
-
[bazelbuild/rules_rust#4326](bazelbuild/rules_rust#4326)
drops `-lresolv` from the default macOS link flags. No first-party code
calls resolver functions; the macOS CI jobs cover third-party crates.

## Verification

- `bazel build //... --nobuild`: all 3387 targets analyze.
- `//rs/ic_os/networking/nss_icos`, our only `rust_shared_library` and
the case the patch exists for, links the static LLVM libunwind. Its
`_Unwind_*` symbols are defined locally, and every undefined dynamic
symbol is a versioned glibc one.
- All 60 non-manual `rust_doc_test` targets pass.
- These build: `//rs/replica`, `//rs/orchestrator`,
`//rs/pocket_ic_server:pocket-ic-server`, `//rs/canister_sandbox`, the
NNS governance and ICRC-1 ledger canisters (wasm), `//:rustfmt` and
`//:gen_rust_project`.
- CI covers the full build and test suite.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: IDX GitHub Automation <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

presubmit-auto-run Presubmit jobs will be triggered for new changes automatically without reviewer's approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants