xref: /aosp_15_r20/external/bazelbuild-rules_rust/proto/protobuf/BUILD.bazel (revision d4726bddaa87cc4778e7472feed243fa4b6c267f)
1*d4726bddSHONG Yifanload("@bazel_skylib//:bzl_library.bzl", "bzl_library")
2*d4726bddSHONG Yifanload("//rust:defs.bzl", "rust_binary")
3*d4726bddSHONG Yifanload(":legacy_proto_toolchain.bzl", "legacy_proto_toolchain")
4*d4726bddSHONG Yifanload(":toolchain.bzl", "rust_proto_toolchain")
5*d4726bddSHONG Yifan
6*d4726bddSHONG Yifanpackage(default_visibility = ["//visibility:public"])
7*d4726bddSHONG Yifan
8*d4726bddSHONG Yifantoolchain_type(
9*d4726bddSHONG Yifan    name = "toolchain_type",
10*d4726bddSHONG Yifan)
11*d4726bddSHONG Yifan
12*d4726bddSHONG Yifanrust_binary(
13*d4726bddSHONG Yifan    name = "optional_output_wrapper",
14*d4726bddSHONG Yifan    srcs = ["optional_output_wrapper.rs"],
15*d4726bddSHONG Yifan    edition = "2018",
16*d4726bddSHONG Yifan    visibility = ["//visibility:public"],
17*d4726bddSHONG Yifan)
18*d4726bddSHONG Yifan
19*d4726bddSHONG Yifantoolchain(
20*d4726bddSHONG Yifan    name = "default-proto-toolchain",
21*d4726bddSHONG Yifan    toolchain = ":default-proto-toolchain-impl",
22*d4726bddSHONG Yifan    toolchain_type = "@rules_rust//proto/protobuf:toolchain_type",
23*d4726bddSHONG Yifan)
24*d4726bddSHONG Yifan
25*d4726bddSHONG Yifanrust_proto_toolchain(
26*d4726bddSHONG Yifan    name = "default-proto-toolchain-impl",
27*d4726bddSHONG Yifan    edition = "2018",
28*d4726bddSHONG Yifan)
29*d4726bddSHONG Yifan
30*d4726bddSHONG Yifanbzl_library(
31*d4726bddSHONG Yifan    name = "bzl_lib",
32*d4726bddSHONG Yifan    srcs = glob(["**/*.bzl"]),
33*d4726bddSHONG Yifan    deps = [
34*d4726bddSHONG Yifan        "//proto/protobuf/3rdparty:bzl_lib",
35*d4726bddSHONG Yifan    ],
36*d4726bddSHONG Yifan)
37*d4726bddSHONG Yifan
38*d4726bddSHONG Yifanlegacy_proto_toolchain(
39*d4726bddSHONG Yifan    name = "legacy_proto_toolchain",
40*d4726bddSHONG Yifan    visibility = ["//visibility:public"],
41*d4726bddSHONG Yifan)
42