File tree Expand file tree Collapse file tree 9 files changed +39
-22
lines changed Expand file tree Collapse file tree 9 files changed +39
-22
lines changed Original file line number Diff line number Diff line change @@ -22,13 +22,10 @@ local_path_override(
2222#
2323# Rules for protobuf / gRPC
2424# https://github.com/bazelbuild/rules_proto/releases
25- bazel_dep (name = "rules_proto" , version = "6.0.2" )
26-
27- # https://github.com/aspect-build/toolchains_protoc/releases
28- bazel_dep (name = "toolchains_protoc" , version = "0.3.1" )
25+ bazel_dep (name = "rules_proto" , version = "7.1.0" )
2926
3027# https://registry.bazel.build/modules/protobuf
31- bazel_dep (name = "protobuf" , version = "27.1 " )
28+ bazel_dep (name = "protobuf" , version = "29.0" , repo_name = "com_google_protobuf " )
3229
3330# https://github.com/bazel-contrib/toolchains_llvm
3431bazel_dep (name = "toolchains_llvm" , version = "1.2.0" )
@@ -75,7 +72,10 @@ use_repo(rust, "rust_toolchains")
7572register_toolchains ("@rust_toolchains//:all" )
7673
7774# Custom Prost toolchain
78- register_toolchains ("@//build/prost_toolchain" )
75+ register_toolchains (
76+ "@//build/prost_toolchain" ,
77+ "@//build/proto_toolchain" ,
78+ )
7979
8080###############################################################################
8181# R U S T C R A T E S
Original file line number Diff line number Diff line change @@ -47,11 +47,9 @@ In your MODULE.bazel, you add the following:
4747# rules for proto
4848# ##############################################################################
4949# https://github.com/bazelbuild/rules_proto/releases
50- bazel_dep(name = " rules_proto" , version = " 6.0.2" )
51- # https://github.com/aspect-build/toolchains_protoc/releases
52- bazel_dep(name = " toolchains_protoc" , version = " 0.3.1" )
50+ bazel_dep(name = " rules_proto" , version = " 7.1.0" )
5351# https://registry.bazel.build/modules/protobuf
54- bazel_dep(name = " protobuf" , version = " 27.1 " )
52+ bazel_dep(name = " protobuf" , version = " 29.0 " , repo_name = " com_google_protobuf " )
5553# rules for LLVM
5654# https://github.com/bazel-contrib/toolchains_llvm
5755bazel_dep(name = " toolchains_llvm" , version = " 1.2.0" )
Original file line number Diff line number Diff line change @@ -23,10 +23,12 @@ rust_prost_toolchain(
2323 prost_types = "@crates//:prost-types" ,
2424 tonic_plugin = "@crates//:protoc-gen-tonic__protoc-gen-tonic" ,
2525 tonic_runtime = ":tonic_runtime" ,
26+ visibility = ["//visibility:public" ],
2627)
2728
2829toolchain (
2930 name = "prost_toolchain" ,
3031 toolchain = "prost_toolchain_impl" ,
3132 toolchain_type = "@rules_rust_prost//:toolchain_type" ,
33+ visibility = ["//visibility:public" ],
3234)
Original file line number Diff line number Diff line change 1+ load ("@rules_proto//proto:proto_toolchain.bzl" , "proto_toolchain" )
2+
3+ package (default_visibility = ["//visibility:public" ])
4+
5+ # This macro implicitly creates `{name}_toolchain`
6+ proto_toolchain (
7+ name = "proto" ,
8+ proto_compiler = "@com_google_protobuf//:protoc" ,
9+ )
Original file line number Diff line number Diff line change @@ -22,13 +22,10 @@ local_path_override(
2222#
2323# Rules for protobuf / gRPC
2424# https://github.com/bazelbuild/rules_proto/releases
25- bazel_dep (name = "rules_proto" , version = "6.0.2" )
26-
27- # https://github.com/aspect-build/toolchains_protoc/releases
28- bazel_dep (name = "toolchains_protoc" , version = "0.3.1" )
25+ bazel_dep (name = "rules_proto" , version = "7.1.0" )
2926
3027# https://registry.bazel.build/modules/protobuf
31- bazel_dep (name = "protobuf" , version = "27.1 " )
28+ bazel_dep (name = "protobuf" , version = "29.0" , repo_name = "com_google_protobuf " )
3229
3330# https://github.com/bazel-contrib/toolchains_llvm
3431bazel_dep (name = "toolchains_llvm" , version = "1.2.0" )
@@ -75,7 +72,10 @@ use_repo(rust, "rust_toolchains")
7572register_toolchains ("@rust_toolchains//:all" )
7673
7774# Custom Prost toolchain
78- register_toolchains ("@//build/prost_toolchain" )
75+ register_toolchains (
76+ "@//build/prost_toolchain" ,
77+ "@//build/proto_toolchain" ,
78+ )
7979
8080###############################################################################
8181# R U S T C R A T E S
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ While the Tonic toolchain works out of the box when its dependencies are matched
3333Prost requires a custom toolchain that you have to define.
3434
3535The setup requires three steps to complete:
36+
36371 . Configure rules and dependencies in MODULE.bazel
37382 . Configure a custom Prost toolchain
38393 . Register custom Prost toolchain.
@@ -47,11 +48,9 @@ In your MODULE.bazel, you add the following:
4748# rules for proto
4849# ##############################################################################
4950# https://github.com/bazelbuild/rules_proto/releases
50- bazel_dep(name = " rules_proto" , version = " 6.0.2" )
51- # https://github.com/aspect-build/toolchains_protoc/releases
52- bazel_dep(name = " toolchains_protoc" , version = " 0.3.1" )
51+ bazel_dep(name = " rules_proto" , version = " 7.1.0" )
5352# https://registry.bazel.build/modules/protobuf
54- bazel_dep(name = " protobuf" , version = " 27.1 " )
53+ bazel_dep(name = " protobuf" , version = " 29.0 " , repo_name = " com_google_protobuf " )
5554# rules for LLVM
5655# https://github.com/bazel-contrib/toolchains_llvm
5756bazel_dep(name = " toolchains_llvm" , version = " 1.2.0" )
Original file line number Diff line number Diff line change 1+ load ("@rules_proto//proto:proto_toolchain.bzl" , "proto_toolchain" )
2+
3+ package (default_visibility = ["//visibility:public" ])
4+
5+ # This macro implicitly creates `{name}_toolchain`
6+ proto_toolchain (
7+ name = "proto" ,
8+ proto_compiler = "@com_google_protobuf//:protoc" ,
9+ )
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ bazel_dep(
2727)
2828bazel_dep (
2929 name = "rules_proto" ,
30- version = "6.0.2 " ,
30+ version = "7.1.0 " ,
3131)
3232bazel_dep (
3333 name = "protobuf" ,
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ bazel_dep(
2727)
2828bazel_dep (
2929 name = "rules_proto" ,
30- version = "6.0.2 " ,
30+ version = "7.1.0 " ,
3131)
3232bazel_dep (
3333 name = "protobuf" ,
You can’t perform that action at this time.
0 commit comments