File tree 9 files changed +39
-22
lines changed
9 files changed +39
-22
lines changed Original file line number Diff line number Diff line change @@ -22,13 +22,10 @@ local_path_override(
22
22
#
23
23
# Rules for protobuf / gRPC
24
24
# 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" )
29
26
30
27
# 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 " )
32
29
33
30
# https://github.com/bazel-contrib/toolchains_llvm
34
31
bazel_dep (name = "toolchains_llvm" , version = "1.2.0" )
@@ -75,7 +72,10 @@ use_repo(rust, "rust_toolchains")
75
72
register_toolchains ("@rust_toolchains//:all" )
76
73
77
74
# Custom Prost toolchain
78
- register_toolchains ("@//build/prost_toolchain" )
75
+ register_toolchains (
76
+ "@//build/prost_toolchain" ,
77
+ "@//build/proto_toolchain" ,
78
+ )
79
79
80
80
###############################################################################
81
81
# 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:
47
47
# rules for proto
48
48
# ##############################################################################
49
49
# 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" )
53
51
# 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 " )
55
53
# rules for LLVM
56
54
# https://github.com/bazel-contrib/toolchains_llvm
57
55
bazel_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(
23
23
prost_types = "@crates//:prost-types" ,
24
24
tonic_plugin = "@crates//:protoc-gen-tonic__protoc-gen-tonic" ,
25
25
tonic_runtime = ":tonic_runtime" ,
26
+ visibility = ["//visibility:public" ],
26
27
)
27
28
28
29
toolchain (
29
30
name = "prost_toolchain" ,
30
31
toolchain = "prost_toolchain_impl" ,
31
32
toolchain_type = "@rules_rust_prost//:toolchain_type" ,
33
+ visibility = ["//visibility:public" ],
32
34
)
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(
22
22
#
23
23
# Rules for protobuf / gRPC
24
24
# 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" )
29
26
30
27
# 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 " )
32
29
33
30
# https://github.com/bazel-contrib/toolchains_llvm
34
31
bazel_dep (name = "toolchains_llvm" , version = "1.2.0" )
@@ -75,7 +72,10 @@ use_repo(rust, "rust_toolchains")
75
72
register_toolchains ("@rust_toolchains//:all" )
76
73
77
74
# Custom Prost toolchain
78
- register_toolchains ("@//build/prost_toolchain" )
75
+ register_toolchains (
76
+ "@//build/prost_toolchain" ,
77
+ "@//build/proto_toolchain" ,
78
+ )
79
79
80
80
###############################################################################
81
81
# 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
33
33
Prost requires a custom toolchain that you have to define.
34
34
35
35
The setup requires three steps to complete:
36
+
36
37
1 . Configure rules and dependencies in MODULE.bazel
37
38
2 . Configure a custom Prost toolchain
38
39
3 . Register custom Prost toolchain.
@@ -47,11 +48,9 @@ In your MODULE.bazel, you add the following:
47
48
# rules for proto
48
49
# ##############################################################################
49
50
# 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" )
53
52
# 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 " )
55
54
# rules for LLVM
56
55
# https://github.com/bazel-contrib/toolchains_llvm
57
56
bazel_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(
27
27
)
28
28
bazel_dep (
29
29
name = "rules_proto" ,
30
- version = "6.0.2 " ,
30
+ version = "7.1.0 " ,
31
31
)
32
32
bazel_dep (
33
33
name = "protobuf" ,
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ bazel_dep(
27
27
)
28
28
bazel_dep (
29
29
name = "rules_proto" ,
30
- version = "6.0.2 " ,
30
+ version = "7.1.0 " ,
31
31
)
32
32
bazel_dep (
33
33
name = "protobuf" ,
You can’t perform that action at this time.
0 commit comments