[bazel] Upgrade rules_rust to 0.71.0 - #30862
Draft
sasdf wants to merge 8 commits into
Draft
Conversation
This upgrade includes several changes: - Updates `rules_rust` and `rules_rust_bindgen` versions in `MODULE.bazel`. - Removes `rules_rust.experimental.patch` as it is no longer required. - Refreshes patches to match the new `rules_rust` structure and API changes. - Updates `MODULE.bazel.lock` to reflect new versions and repository hashes. Signed-off-by: Yi-Hsuan Deng <yhdeng@google.com> Change-Id: I81520f8c683e65771fb27ecac8cf88c86a6a6964
sasdf
force-pushed
the
mjTxprxvosl
branch
2 times, most recently
from
July 28, 2026 08:32
179ed10 to
178c14b
Compare
When removing airgapped directories or temporary workspaces, `rm -rf` can fail if the directories contain read-only files or subdirectories. Add `chmod -R +w` prior to `rm -rf` calls in `prep-bazel-airgapped-build.sh` to ensure cleanup succeeds without permission errors. Signed-off-by: Yi-Hsuan Deng <yhdeng@google.com> Change-Id: Ibd6b8edc0bd2007c7d59f53b837879e76a6a6964
Signed-off-by: Yi-Hsuan Deng <yhdeng@google.com> Change-Id: Id20da20f9a29333df441a9ec9ad141a16a6a6964
Record the implicit version bump to rules_cc when updating rules_rust Signed-off-by: Yi-Hsuan Deng <yhdeng@google.com> Change-Id: I08d7376929195c59bd70fb92f4e3fa5d6a6a6964
Record the implicit version bump to rules_cc when updating rules_rust Signed-off-by: Yi-Hsuan Deng <yhdeng@google.com> Change-Id: Id85bbbeb6ef7f411230c05a1f63fa40e6a6a6964
Replace `inject_repo` with `label_injections` inside the `openssl-sys` crate annotation. This uses the native capability of rules_rust to inject the openssl label, making the ot repo reusable as modules. Signed-off-by: Yi-Hsuan Deng <yhdeng@google.com> Change-Id: I2a824b7e41a77e8baf82a1ffdaf8c3b16a6a6964
Signed-off-by: Yi-Hsuan Deng <yhdeng@google.com> Change-Id: I1cd7201b51540bd08e39e764fb7c611a6a6a6964
Listing C libraries in a Rust target's `deps` attribute is deprecated in newer rules_rust versions. Instead, they should be listed in `link_deps`. Signed-off-by: Yi-Hsuan Deng <yhdeng@google.com> Change-Id: If17bd8eae0e3bd6c7305d5b7fd7065a26a6a6964
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
rules_rust0.71 release introduces thelabel_injectionsattribute, eliminating the need for theinject_repoworkaround when using hermetic OpenSSL. This makes it possible to include OpenTitan as a submodule again, asinject_repodirectives are ignored in non-root modules.rules_rust 0.72 is the latest release atm, but that introduces some more requirements to the lockfile and need more fixes, so this PR targets 0.71.
Version bumps of other packages are simply the minimum resolved version after bumping rules_rust, except the bump for rules_python. The minimum version for rules_python is 1.5.1, while v1.6 seems the one that doesn't break extra stuff. (v1.5.1, v1.7.0, v2.0.0, v2.2.0 all require some extra fixes to be investigated)