xref: /aosp_15_r20/external/bazelbuild-rules_rust/examples/bzlmod/proto/proto_bindings/BUILD.bazel (revision d4726bddaa87cc4778e7472feed243fa4b6c267f)
1load("@rules_proto//proto:defs.bzl", "proto_library")
2load("@rules_rust//proto/prost:defs.bzl", "rust_prost_library")
3
4# Build proto files
5# https://bazelbuild.github.io/rules_rust/rust_proto.html#rust_proto_library
6proto_library(
7    name = "proto_bindings",
8    srcs = [
9        "proto/helloworld.proto",
10    ],
11)
12
13# Generate Rust bindings from the generated proto files
14# https://bazelbuild.github.io/rules_rust/rust_proto.html#rust_prost_library
15rust_prost_library(
16    name = "rust_proto",
17    proto = ":proto_bindings",
18    visibility = ["//visibility:public"],
19)
20