xref: /aosp_15_r20/external/bazelbuild-rules_rust/examples/proto/basic/BUILD.bazel (revision d4726bddaa87cc4778e7472feed243fa4b6c267f)
1*d4726bddSHONG Yifanload("@rules_rust//proto/protobuf:defs.bzl", "rust_proto_library")
2*d4726bddSHONG Yifanload("@rules_rust//rust:defs.bzl", "rust_binary", "rust_library")
3*d4726bddSHONG Yifan
4*d4726bddSHONG Yifanpackage(default_visibility = ["//proto:__subpackages__"])
5*d4726bddSHONG Yifan
6*d4726bddSHONG Yifanrust_proto_library(
7*d4726bddSHONG Yifan    name = "libcommon_proto_rust",
8*d4726bddSHONG Yifan    crate_name = "common_proto_rust",
9*d4726bddSHONG Yifan    tags = ["manual"],
10*d4726bddSHONG Yifan    deps = ["//proto:common"],
11*d4726bddSHONG Yifan)
12*d4726bddSHONG Yifan
13*d4726bddSHONG Yifanrust_library(
14*d4726bddSHONG Yifan    name = "common_lib",
15*d4726bddSHONG Yifan    srcs = ["lib.rs"],
16*d4726bddSHONG Yifan    tags = ["manual"],
17*d4726bddSHONG Yifan    deps = [":libcommon_proto_rust"],
18*d4726bddSHONG Yifan)
19*d4726bddSHONG Yifan
20*d4726bddSHONG Yifanrust_binary(
21*d4726bddSHONG Yifan    name = "common_bin",
22*d4726bddSHONG Yifan    srcs = ["main.rs"],
23*d4726bddSHONG Yifan    tags = ["manual"],
24*d4726bddSHONG Yifan    deps = [
25*d4726bddSHONG Yifan        ":common_lib",
26*d4726bddSHONG Yifan        ":libcommon_proto_rust",
27*d4726bddSHONG Yifan    ],
28*d4726bddSHONG Yifan)
29