1package { 2 default_applicable_licenses: ["Android-Apache-2.0"], 3} 4 5rust_library { 6 name: "libcompos_verify_native_rust", 7 crate_name: "compos_verify_native", 8 srcs: ["lib.rs"], 9 rustlibs: [ 10 "libanyhow", 11 "libcxx", 12 "liblibc", 13 ], 14 static_libs: [ 15 "libcompos_verify_native_cpp", 16 "libcompos_key", 17 ], 18 shared_libs: [ 19 "libcrypto", 20 ], 21 apex_available: ["com.android.compos"], 22} 23 24cc_library_static { 25 name: "libcompos_verify_native_cpp", 26 srcs: ["verify_native.cpp"], 27 static_libs: ["libcompos_key"], 28 shared_libs: [ 29 "libbase", 30 "libcrypto", 31 ], 32 generated_headers: ["compos_verify_native_header"], 33 generated_sources: ["compos_verify_native_code"], 34 apex_available: ["com.android.compos"], 35} 36 37genrule { 38 name: "compos_verify_native_code", 39 tools: ["cxxbridge"], 40 cmd: "$(location cxxbridge) $(in) >> $(out)", 41 srcs: ["lib.rs"], 42 out: ["verify_native_cxx_generated.cc"], 43} 44 45genrule { 46 name: "compos_verify_native_header", 47 tools: ["cxxbridge"], 48 cmd: "$(location cxxbridge) $(in) --header >> $(out)", 49 srcs: ["lib.rs"], 50 out: ["lib.rs.h"], 51} 52