|
1 | 1 | load("@crates//:defs.bzl", "all_crate_deps")
|
2 |
| -load("@rules_rust//cargo:defs.bzl", "cargo_build_script") |
| 2 | + |
| 3 | +# load("@rules_rust//cargo:defs.bzl", "cargo_build_script") |
3 | 4 | load("@rules_rust//rust:defs.bzl", "rust_binary")
|
4 | 5 |
|
5 |
| -cargo_build_script( |
6 |
| - name = "build_script", |
7 |
| - srcs = ["build.rs"], |
8 |
| - build_script_env = { |
9 |
| - "PROTO_PATH": "$(execpath //protos/example_service:proto_files)", |
10 |
| - }, |
11 |
| - data = ["//protos/example_service:proto_files"], |
12 |
| - deps = ["@crates//:tonic-build"], |
13 |
| -) |
| 6 | +#cargo_build_script( |
| 7 | +# name = "build_script", |
| 8 | +# srcs = ["build.rs"], |
| 9 | +# build_script_env = { |
| 10 | +# "PROTO_PATH": "$(execpath //protos/example_service:proto_files)", |
| 11 | +# }, |
| 12 | +# data = ["//protos/example_service:proto_files"], |
| 13 | +# deps = ["@crates//:tonic-build"], |
| 14 | +#) |
14 | 15 |
|
15 | 16 | rust_binary(
|
16 | 17 | name = "helloworld_tonic_server",
|
17 | 18 | srcs = ["src/server.rs"],
|
18 | 19 | crate_name = "helloworld_tonic",
|
19 |
| - deps = all_crate_deps() + [":build_script"], |
20 |
| - # deps = all_crate_deps() + ["//protos/example_service:hello_proto_rust"], |
| 20 | + # deps = all_crate_deps() + [":build_script"], |
| 21 | + deps = all_crate_deps() + ["//protos/example_service:hello_proto_rust"], |
21 | 22 | )
|
22 | 23 |
|
23 | 24 | rust_binary(
|
24 | 25 | name = "helloworld_tonic_client",
|
25 | 26 | srcs = ["src/client.rs"],
|
26 | 27 | crate_name = "helloworld_tonic",
|
27 |
| - deps = all_crate_deps() + [":build_script"], |
28 |
| - # deps = all_crate_deps() + ["//protos/example_service:hello_proto_rust"], |
| 28 | + # deps = all_crate_deps() + [":build_script"], |
| 29 | + deps = all_crate_deps() + ["//protos/example_service:hello_proto_rust"], |
29 | 30 | )
|
0 commit comments