Create a Rust API for part of //aos:configuration

Change-Id: I00044634f437e72487aaaca28e9a00fe65a4aa48
Signed-off-by: Brian Silverman <bsilver16384@gmail.com>
diff --git a/aos/for_rust.h b/aos/for_rust.h
new file mode 100644
index 0000000..388a854
--- /dev/null
+++ b/aos/for_rust.h
@@ -0,0 +1,23 @@
+#ifndef AOS_FOR_RUST_H_
+#define AOS_FOR_RUST_H_
+
+// This file has some shared utilities for the for_rust C++ code, which provides
+// autocxx-friendly versions of C++ APIs.
+
+#include <string_view>
+
+#include "cxx.h"
+
+namespace aos {
+
+inline rust::Str StringViewToRustStr(std::string_view s) {
+  return rust::Str(s.data(), s.size());
+}
+
+inline std::string_view RustStrToStringView(rust::Str s) {
+  return std::string_view(s.data(), s.size());
+}
+
+}  // namespace aos
+
+#endif  // AOS_FOR_RUST_H_