Skip to content

[bazel] Upgrade rules_rust to 0.71.0 - #30862

Draft
sasdf wants to merge 8 commits into
lowRISC:earlgrey_1.0.0from
sasdf:mjTxprxvosl
Draft

[bazel] Upgrade rules_rust to 0.71.0#30862
sasdf wants to merge 8 commits into
lowRISC:earlgrey_1.0.0from
sasdf:mjTxprxvosl

Conversation

@sasdf

@sasdf sasdf commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

The rules_rust 0.71 release introduces the label_injections attribute, eliminating the need for the inject_repo workaround when using hermetic OpenSSL. This makes it possible to include OpenTitan as a submodule again, as inject_repo directives 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)

@sasdf
sasdf requested review from jwnrt, luismarques and pamaury July 28, 2026 01:48
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
sasdf force-pushed the mjTxprxvosl branch 2 times, most recently from 179ed10 to 178c14b Compare July 28, 2026 08:32
sasdf added 7 commits July 28, 2026 16:46
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant