• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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        "libauthfs_fsverity_metadata",
18        "libbinder_rpc_unstable_bindgen",
19        "libbinder_rs",
20        "libcfg_if",
21        "libfsverity_digests_proto_rust",
22        "libfuse_rust",
23        "liblibc",
24        "liblog_rust",
25        "libnix",
26        "libprotobuf",
27        "libstructopt",
28        "libthiserror",
29    ],
30    prefer_rlib: true,
31    target: {
32        darwin: {
33            enabled: false,
34        },
35    },
36    shared_libs: [
37        "libcrypto",
38        "libbinder_rpc_unstable",
39    ],
40    defaults: ["crosvm_defaults"],
41}
42
43// TODO(b/172687320): remove once there is a canonical bindgen.
44rust_bindgen {
45    name: "libauthfs_crypto_bindgen",
46    wrapper_src: "src/crypto.hpp",
47    crate_name: "authfs_crypto_bindgen",
48    source_stem: "bindings",
49    shared_libs: [
50        "libcrypto",
51    ],
52    bindgen_flags: ["--size_t-is-usize"],
53    cflags: ["-D BORINGSSL_NO_CXX"],
54    apex_available: ["com.android.virt"],
55}
56
57rust_binary {
58    name: "authfs",
59    defaults: ["authfs_defaults"],
60    apex_available: ["com.android.virt"],
61}
62
63rust_test {
64    name: "authfs_device_test_src_lib",
65    defaults: ["authfs_defaults"],
66    test_suites: ["general-tests"],
67    data: [":authfs_test_files"],
68}
69
70filegroup {
71    name: "authfs_test_files",
72    srcs: [
73        "testdata/cert.der",
74        "testdata/input.4k",
75        "testdata/input.4k.fsv_meta",
76        "testdata/input.4k1",
77        "testdata/input.4k1.fsv_meta",
78        "testdata/input.4m",
79        "testdata/input.4m.fsv_meta",
80        "testdata/input.4m.fsv_meta.bad_merkle",
81    ],
82}
83
84rust_test {
85    name: "libauthfs_crypto_bindgen_test",
86    srcs: [":libauthfs_crypto_bindgen"],
87    crate_name: "authfs_crypto_bindgen_test",
88    test_suites: ["general-tests"],
89    auto_gen_config: true,
90    clippy_lints: "none",
91    lints: "none",
92}
93