Migrate keystore2's Rust system library bindings to bionic.
This is purely a port: it does not add or change any functionality
(other than renaming the library).
Bug: 182498247
Test: Use library.
Change-Id: I4cb8f1c22ca4ca5a398116952fb9957d283d235b
diff --git a/libc/rust/Android.bp b/libc/rust/Android.bp
new file mode 100644
index 0000000..44cf848
--- /dev/null
+++ b/libc/rust/Android.bp
@@ -0,0 +1,30 @@
+rust_bindgen {
+ name: "libsystem_properties_bindgen",
+ wrapper_src: "system_properties_bindgen.hpp",
+ crate_name: "system_properties_bindgen",
+ source_stem: "bindings",
+
+ bindgen_flags: [
+ "--size_t-is-usize",
+ "--allowlist-function=__system_property_find",
+ "--allowlist-function=__system_property_read_callback",
+ "--allowlist-function=__system_property_set",
+ "--allowlist-function=__system_property_wait",
+ ],
+}
+
+rust_library {
+ name: "libsystem_properties-rust",
+ crate_name: "system_properties",
+ srcs: [
+ "system_properties.rs",
+ ],
+ rustlibs: [
+ "libanyhow",
+ "libsystem_properties_bindgen",
+ "libthiserror",
+ ],
+ shared_libs: [
+ "libbase",
+ ],
+}