-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for bzlmod #1493
Comments
I don't know that much about bzlmod, but have started having a look at this. Initially I would like to simply replace |
This makes rules_rust load dependencies via bzlmod. Currently only basic functionality is completed, such as registering rustc toolchains and compiling crates. Note that it cannot interact with cargo, wasm or load any other rust toolchains such as rustfmt. There is one new module, `examples/bzlmod/hello_world`, that depends on the root `rules_rust` module. This example can be built and run using: ``` cd examples/bzlmod/hello_world bazel run //:hello_world ``` To register toolchains in an ergonomic way, it defines a new "hub" repository that contains all the toolchain proxies, so they can all be registered like so: ``` register_toolchains("@rust_toolchains//:all") ``` closes #1493
I think it makes sense to reopen this? While the work that has been merged is great, from what I can tell there is still quite a bit of work that needs to happen to "support bzlmod" on a level that it can actually be adopted. |
Do we have a list of items that are still needed? |
Are loading crates via bzlmod supported in the current effort? |
Hey, |
Bazel 7.0 is releasing later this year, with bzlmod becoming on by default. Is anyone working to prioritize this work to align with the release of Bazel 7.0? Looks like there has been some work done in #2021. |
It unfortunately seems no maintainer has any experience with bzlmod at all. I've asked other members of the Bazel org to help do reviews but I unfortunately haven't seen any support. The Bzlmod changes could probably be merged as long as there's no change to existing code. For anything that needs to change, the more granular the pull-reqeusts can be the easier the rollout will be. My primary concern is that bzlmod just increases the maintenance burden by introducing a second way to to fetch dependencies. So it'd also be helpful if the changes were setup to maintain a single source of truth. |
I have scheduled some time with Bzlmod experts later this week to peer review this PR with the hope that we can move this PR forward and gain some expertise in the process. |
Makes sense. Thanks for the update. I would hope long term, Bzlmod becomes the primarily supported way to fetch dependencies, though that's probably quite far in the future. Shot in the dark, but I have tried to solicit help in this discussion thread: bazelbuild/bazel#18329. |
That sounds great, thanks @scentini. I am happy to dedicate some bandwidth in the coming month to help with contributions (though I also have no prior expertise). |
@scentini any updates from your meeting? |
Hi all! Any updates? I have some bandwidth to help. |
This needs some tlc https://bazelbuild.github.io/rules_rust/ |
It would be nice if
rules_rust
supported bzlmod workflows. Hopefully someone familiar with that can enable that for this project.The text was updated successfully, but these errors were encountered: