blob: 85f2abb134d2f1a3798322440eedf60f6cba9bee [file] [log] [blame]
Bob Badour2efc4762021-02-03 18:36:27 -08001package {
2 default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
Victor Hsieh1fe51c42020-11-05 11:08:10 -08005rust_defaults {
6 name: "authfs_defaults",
7 crate_name: "authfs",
8 srcs: [
Victor Hsieh88ac6ca2020-11-13 15:20:24 -08009 "src/main.rs",
Victor Hsieh1fe51c42020-11-05 11:08:10 -080010 ],
11 edition: "2018",
12 rustlibs: [
Victor Hsiehf01f3232020-12-11 13:31:31 -080013 "authfs_aidl_interface-rust",
Victor Hsiehec184562020-11-06 13:50:31 -080014 "libanyhow",
Victor Hsiehd1cb0d72020-11-06 13:49:55 -080015 "libauthfs_crypto_bindgen",
Victor Hsieh88ac6ca2020-11-13 15:20:24 -080016 "libcfg_if",
17 "libfuse_rust",
Victor Hsieh1fe51c42020-11-05 11:08:10 -080018 "liblibc",
Victor Hsieh88ac6ca2020-11-13 15:20:24 -080019 "libstructopt",
Victor Hsiehd1cb0d72020-11-06 13:49:55 -080020 "libthiserror",
Victor Hsieh1fe51c42020-11-05 11:08:10 -080021 ],
ThiƩbaud Weksteen858a9282021-01-12 12:02:37 +010022 target: {
23 darwin: {
24 enabled: false,
25 },
26 },
Victor Hsiehd1cb0d72020-11-06 13:49:55 -080027 shared_libs: ["libcrypto"],
Victor Hsieh9a0ee7e2021-01-11 15:00:10 -080028 defaults: ["crosvm_defaults"],
Victor Hsieh1fe51c42020-11-05 11:08:10 -080029}
30
Victor Hsiehd1cb0d72020-11-06 13:49:55 -080031// TODO(b/172687320): remove once there is a canonical bindgen.
32rust_bindgen {
33 name: "libauthfs_crypto_bindgen",
34 wrapper_src: "src/crypto.hpp",
35 crate_name: "authfs_crypto_bindgen",
36 source_stem: "bindings",
37 shared_libs: [
38 "libcrypto",
39 ],
40 bindgen_flags: ["--size_t-is-usize"],
41 cflags: ["-D BORINGSSL_NO_CXX"],
Victor Hsieh573c6492021-03-11 14:19:18 -080042 apex_available: ["com.android.virt"],
Victor Hsiehd1cb0d72020-11-06 13:49:55 -080043}
44
Victor Hsieh88ac6ca2020-11-13 15:20:24 -080045rust_binary {
46 name: "authfs",
Victor Hsieh1fe51c42020-11-05 11:08:10 -080047 defaults: ["authfs_defaults"],
Victor Hsieh573c6492021-03-11 14:19:18 -080048 apex_available: ["com.android.virt"],
Victor Hsieh1fe51c42020-11-05 11:08:10 -080049}
50
Victor Hsiehad46e0b2021-01-25 16:07:38 -080051rust_test {
52 name: "authfs_device_test_src_lib",
53 defaults: ["authfs_defaults"],
Victor Hsiehab293ee2021-01-29 17:28:25 -080054 test_suites: ["device-tests"],
Victor Hsieh85b4f732021-03-09 16:02:14 -080055 data: [":authfs_test_files"],
56}
57
58filegroup {
59 name: "authfs_test_files",
60 srcs: [
61 "testdata/cert.der",
Victor Hsiehfa4477a2021-02-08 10:51:50 -080062 "testdata/input.4k",
63 "testdata/input.4k.fsv_sig",
64 "testdata/input.4k.merkle_dump",
65 "testdata/input.4k1",
66 "testdata/input.4k1.fsv_sig",
67 "testdata/input.4k1.merkle_dump",
68 "testdata/input.4m",
69 "testdata/input.4m.fsv_sig",
70 "testdata/input.4m.merkle_dump",
71 "testdata/input.4m.merkle_dump.bad",
72 ],
Victor Hsiehad46e0b2021-01-25 16:07:38 -080073}