Support incompatible_enable_proto_toolchain_resolution
alexeagle opened this issue · comments
Currently rules_rust requires the user to override the protoc compiler
rules_rust/proto/protobuf/toolchain.bzl
Line 174 in df7a655
with a fixed label to replace it.
However Bazel 7 introduced --incompatible_enable_proto_toolchain_resolution
and rules_proto 6.0 allows users to register a toolchain for protoc. The toolchain_type
is @rules_proto//proto:toolchain_type
: https://github.com/bazelbuild/rules_proto/blob/6.0.0-rc3/proto/BUILD#L57-L60
https://registry.bazel.build/modules/toolchains_protoc is a reference implementation and has examples
Similar change in other language rules:
- python: bazelbuild/rules_python#1577
- go: bazelbuild/rules_go#3895
@UebelAndre maybe? Is this something that would be welcome in rules_rust to help avoid protoc compilation times for rust users?
I would happily review a PR adding this support :)
@UebelAndre maybe? Is this something that would be welcome in rules_rust to help avoid protoc compilation times for rust users?
Hey! It'd definitely be welcome! 😄