I'm trying to write a custom protobuf toolchain to use prost instead of grpc-rust.
I've followed the guide and it seems like this should work:
load("@io_bazel_rules_rust//proto:toolchain.bzl", "rust_proto_toolchain")
rust_proto_toolchain(
name = "proto-toolchain-impl",
protoc = "@com_google_protobuf//:protoc",
grpc_plugin = "//3rdparty/cargo:prost",
proto_plugin = "//3rdparty/cargo:prost",
)
toolchain(
name = "proto-toolchain",
toolchain = ":proto-toolchain-impl",
toolchain_type = "@io_bazel_rules_rust//proto:toolchain",
)
# WORKSPACE
register_toolchains("//src:proto-toolchain")
but building my rust_proto_library produces the same binary output as without the toolchain definition; it doesn't even error or produce a message. Is there a step I'm missing?
proto_library(
name = "echo_pb",
srcs = ["echo.proto"]
)
rust_proto_library(
name = "echo_pb_rs",
deps = [":echo_pb"],
)
I'm trying to write a custom protobuf toolchain to use prost instead of grpc-rust.
I've followed the guide and it seems like this should work:
but building my rust_proto_library produces the same binary output as without the toolchain definition; it doesn't even error or produce a message. Is there a step I'm missing?