Squashed 'third_party/rules_rust/' content from commit bf59038ca

git-subtree-dir: third_party/rules_rust
git-subtree-split: bf59038cac11798cbaef9f3bf965bad8182b97fa
Signed-off-by: Brian Silverman <bsilver16384@gmail.com>
Change-Id: I5a20e403203d670df467ea97dde9a4ac40339a8d
diff --git a/examples/proto/helloworld/BUILD.bazel b/examples/proto/helloworld/BUILD.bazel
new file mode 100644
index 0000000..db30a9d
--- /dev/null
+++ b/examples/proto/helloworld/BUILD.bazel
@@ -0,0 +1,25 @@
+load("@rules_proto//proto:defs.bzl", "proto_library")
+load("@rules_rust//proto:proto.bzl", "rust_grpc_library")
+load("@rules_rust//rust:defs.bzl", "rust_test")
+
+proto_library(
+    name = "helloworld",
+    srcs = ["helloworld.proto"],
+    deps = ["//proto:common"],
+)
+
+rust_grpc_library(
+    name = "helloworld_proto",
+    visibility = ["//proto/helloworld:__subpackages__"],
+    deps = [":helloworld"],
+)
+
+rust_test(
+    name = "helloworld_test",
+    srcs = ["helloworld_test.rs"],
+    data = [
+        "//proto/helloworld/greeter_client",
+        "//proto/helloworld/greeter_server",
+    ],
+    deps = ["@rules_rust//tools/runfiles"],
+)