Skip to content

Move rust/toolchain.bzl implementation into rust/private#4087

Merged
UebelAndre merged 1 commit into
bazelbuild:mainfrom
UebelAndre:toolchain-move
Jun 18, 2026
Merged

Move rust/toolchain.bzl implementation into rust/private#4087
UebelAndre merged 1 commit into
bazelbuild:mainfrom
UebelAndre:toolchain-move

Conversation

@UebelAndre

Copy link
Copy Markdown
Collaborator

This change is a noop for our public interface but allows for more helper functions to exist in toolchains.bzl without them expanding the public interface.

@UebelAndre UebelAndre marked this pull request as ready for review June 16, 2026 17:44
@UebelAndre UebelAndre enabled auto-merge June 16, 2026 17:44

@LuuOW LuuOW left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technical audit: code patterns and implementation verified for alignment with modern software engineering standards.

@slackito slackito left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving rust/toolchain.bzl to rust/private/toolchain.bzl sounds good for the reasons in the PR description. What's the reason for moving rust/toolchain.bzl to rust/rust_toolchain.bzl and then needing to keep rust/toolchain.bzl for backwards compatibility? (I'm not necessarily opposed to it, just want to understand)

@UebelAndre

Copy link
Copy Markdown
Collaborator Author

Yeah, keeping toolchain.bzl is for backward compatibility

@UebelAndre UebelAndre requested a review from slackito June 17, 2026 15:19

@illicitonion illicitonion left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for the rust_ prefix? Is that becoming a standard in the ecosystem? I don't think I've seen consistent approaches from rulesets, so not sure what rust_toolchain.bzl vs toolchain.bzl is buying?

@UebelAndre

Copy link
Copy Markdown
Collaborator Author

typically each rule is exposed in it's own .bzl file, rust_toolchain violates this expectation. I would delete toolchain.bzl but I don't want to break users. I would also be willing to drop the extra exports from rust_toolchain.bzl but landed on this arbitrary decision.

@UebelAndre

Copy link
Copy Markdown
Collaborator Author

I've updated the change to have more explicit top level bzl files.

@slackito

Copy link
Copy Markdown
Collaborator

@illicitonion expressed my question more clearly :)

If the standard convention is that each rule is exposed in its own .bzl file, then I'm fine with this.

Do we need a deprecation plan to eventually delete toolchain.bzl?

@UebelAndre

Copy link
Copy Markdown
Collaborator Author

Do we need a deprecation plan to eventually delete toolchain.bzl?

We can formalize one but at some point in the future when enough releases have been out, I would probably delete it or can put a print in it warning for a release.

@slackito slackito left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me.

@UebelAndre UebelAndre added this pull request to the merge queue Jun 18, 2026
Merged via the queue into bazelbuild:main with commit a2113e9 Jun 18, 2026
3 checks passed
@UebelAndre UebelAndre deleted the toolchain-move branch June 18, 2026 14:19
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.

4 participants