Add Bazel rules for Rust flatbuffers

This required exposing things as a provider to properly build up the
file structure, so I refactored the other languages instead of
duplicating the functionality.

logger_test's sha1s changed because we're generating the .fbs files in
the host configuration now so their paths are different.

Change-Id: Idd60c6360efacfa1e5a5b8658a9d5770f37b02c6
Signed-off-by: Brian Silverman <bsilver16384@gmail.com>
diff --git a/third_party/flatbuffers/rust/BUILD.bazel b/third_party/flatbuffers/rust/BUILD.bazel
new file mode 100644
index 0000000..246f5a0
--- /dev/null
+++ b/third_party/flatbuffers/rust/BUILD.bazel
@@ -0,0 +1,16 @@
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+rust_library(
+    name = "rust",
+    srcs = glob(["flatbuffers/**/*.rs"]),
+    crate_name = "flatbuffers",
+    crate_root = "flatbuffers/src/lib.rs",
+    edition = "2018",
+    version = "2.1.1",
+    visibility = ["//visibility:public"],
+    deps = [
+        "@//third_party/cargo:bitflags",
+        "@//third_party/cargo:smallvec",
+        "@//third_party/cargo:thiserror",
+    ],
+)