Support building more things with bzlmod (#2601)
This allows us to build more things with bzlmod with `WORKSPACE.bazel`
disabled. This is required because when you use it as a module, it can't
load dependencies from `WORKSPACE.bazel`.
`bazel build --enable_bzlmod --noenable_workspace --lockfile_mode=off
//... --keep_going`
Before: Analysis succeeded for 937 of 978 top-level targets
After: Analysis succeeded for 978 of 982 top-level targets
Once we get those remaining targets working, we can then change our CI
to add `--noenable_workspace` to our bzlmod configuration.
diff --git a/rust/private/extensions.bzl b/rust/private/extensions.bzl
index c20905c..b142108 100644
--- a/rust/private/extensions.bzl
+++ b/rust/private/extensions.bzl
@@ -4,6 +4,7 @@
load("//bindgen:repositories.bzl", "rust_bindgen_dependencies")
load("//crate_universe:repositories.bzl", "crate_universe_dependencies")
load("//proto/prost:repositories.bzl", "rust_prost_dependencies")
+load("//proto/protobuf:repositories.bzl", "rust_proto_protobuf_dependencies")
load("//rust/private:repository_utils.bzl", "TINYJSON_KWARGS")
load("//test:deps.bzl", "rules_rust_test_deps")
load("//tools/rust_analyzer:deps.bzl", "rust_analyzer_dependencies")
@@ -20,6 +21,7 @@
direct_deps.extend(crate_universe_dependencies())
direct_deps.extend(rust_prost_dependencies(bzlmod = True))
+ direct_deps.extend(rust_proto_protobuf_dependencies(bzlmod = True))
direct_deps.extend(rust_bindgen_dependencies())
direct_deps.extend(rust_analyzer_dependencies())
direct_deps.extend(rust_wasm_bindgen_dependencies())