1package { 2 default_applicable_licenses: ["Android-Apache-2.0"], 3} 4 5rust_defaults { 6 name: "authfs_defaults", 7 crate_name: "authfs", 8 srcs: [ 9 "src/main.rs", 10 ], 11 edition: "2018", 12 rustlibs: [ 13 "authfs_aidl_interface-rust", 14 "libandroid_logger", 15 "libanyhow", 16 "libauthfs_crypto_bindgen", 17 "libcfg_if", 18 "libfuse_rust", 19 "liblibc", 20 "liblog_rust", 21 "libstructopt", 22 "libthiserror", 23 ], 24 target: { 25 darwin: { 26 enabled: false, 27 }, 28 }, 29 shared_libs: ["libcrypto"], 30 defaults: ["crosvm_defaults"], 31} 32 33// TODO(b/172687320): remove once there is a canonical bindgen. 34rust_bindgen { 35 name: "libauthfs_crypto_bindgen", 36 wrapper_src: "src/crypto.hpp", 37 crate_name: "authfs_crypto_bindgen", 38 source_stem: "bindings", 39 shared_libs: [ 40 "libcrypto", 41 ], 42 bindgen_flags: ["--size_t-is-usize"], 43 cflags: ["-D BORINGSSL_NO_CXX"], 44 apex_available: ["com.android.virt"], 45} 46 47rust_binary { 48 name: "authfs", 49 defaults: ["authfs_defaults"], 50 apex_available: ["com.android.virt"], 51} 52 53rust_test { 54 name: "authfs_device_test_src_lib", 55 defaults: ["authfs_defaults"], 56 test_suites: ["device-tests"], 57 data: [":authfs_test_files"], 58} 59 60filegroup { 61 name: "authfs_test_files", 62 srcs: [ 63 "testdata/cert.der", 64 "testdata/input.4k", 65 "testdata/input.4k.fsv_sig", 66 "testdata/input.4k.merkle_dump", 67 "testdata/input.4k1", 68 "testdata/input.4k1.fsv_sig", 69 "testdata/input.4k1.merkle_dump", 70 "testdata/input.4m", 71 "testdata/input.4m.fsv_sig", 72 "testdata/input.4m.merkle_dump", 73 "testdata/input.4m.merkle_dump.bad", 74 ], 75} 76