Improve Rust build infrastructure

Further usage of this (coming in future changes) revealed some issues.

Change-Id: Ib60968c580db4e7bb4bd60c782ce7f93a7fc594d
Signed-off-by: Brian Silverman <bsilver16384@gmail.com>
diff --git a/third_party/cargo/cxx/include.BUILD.bazel b/third_party/cargo/cxx/include.BUILD.bazel
index f6b9f5a..31afbfb 100644
--- a/third_party/cargo/cxx/include.BUILD.bazel
+++ b/third_party/cargo/cxx/include.BUILD.bazel
@@ -6,4 +6,5 @@
     hdrs = ["include/cxx.h"],
     srcs = ["src/cxx.cc"],
     includes = ["include"],
+    target_compatible_with = ["@//tools/platforms/rust:has_support"],
 )
diff --git a/third_party/cargo/remote/BUILD.cxx-1.0.71.bazel b/third_party/cargo/remote/BUILD.cxx-1.0.71.bazel
index 4158d4d..1ede3fc 100644
--- a/third_party/cargo/remote/BUILD.cxx-1.0.71.bazel
+++ b/third_party/cargo/remote/BUILD.cxx-1.0.71.bazel
@@ -81,4 +81,5 @@
     hdrs = ["include/cxx.h"],
     srcs = ["src/cxx.cc"],
     includes = ["include"],
+    target_compatible_with = ["@//tools/platforms/rust:has_support"],
 )