-
-
Notifications
You must be signed in to change notification settings - Fork 509
/
BUILD.bazel
36 lines (32 loc) · 1.18 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
load("@rules_rust//proto/prost:defs.bzl", "rust_prost_toolchain")
load("@rules_rust//rust:defs.bzl", "rust_library_group")
rust_library_group(
name = "prost_runtime",
deps = [
"//thirdparty/crates:prost",
],
)
rust_library_group(
name = "tonic_runtime",
deps = [
":prost_runtime",
"//thirdparty/crates:tonic",
],
)
rust_prost_toolchain(
name = "prost_toolchain_impl",
# Ensure the version number matches the one declared in the protoc-gen-tonic depenedency.
prost_plugin = "//thirdparty/crates:protoc-gen-prost-0.3.1__protoc-gen-prost",
prost_runtime = ":prost_runtime",
prost_types = "//thirdparty/crates:prost-types",
# The proto_compiler attribute is not required anymore since rules_rust version 0.48.0
# If your project is pinned to an older version of rules_rust, you have to uncomment the following line below.
# proto_compiler = "@protobuf//:protoc",
tonic_plugin = "//thirdparty/crates:protoc-gen-tonic__protoc-gen-tonic",
tonic_runtime = ":tonic_runtime",
)
toolchain(
name = "prost_toolchain",
toolchain = "prost_toolchain_impl",
toolchain_type = "@rules_rust//proto/prost:toolchain_type",
)