blob: 9a7375daf7f2ec2e1daa613dd034e9e4a01e8d91 [file] [log] [blame]
Andrew Scull38127252022-06-13 13:11:00 +00001package {
2 default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
5rust_defaults {
6 name: "libvbmeta_rust.defaults",
7 crate_name: "vbmeta",
Nikita Ioffeda1b2732023-09-04 13:46:56 +01008 defaults: ["avf_build_flags_rust"],
Andrew Scull38127252022-06-13 13:11:00 +00009 host_supported: true,
10 srcs: ["src/lib.rs"],
Alan Stokes6472ccd2022-08-31 13:41:28 +010011 edition: "2021",
Andrew Scull38127252022-06-13 13:11:00 +000012 rustlibs: [
13 "libavb_bindgen",
14 "libthiserror",
15 ],
16}
17
18rust_library {
19 name: "libvbmeta_rust",
20 defaults: ["libvbmeta_rust.defaults"],
Seungjae Yooec3bc522023-11-09 10:14:30 +090021 apex_available: [
22 "com.android.virt",
23 ],
Andrew Scull38127252022-06-13 13:11:00 +000024}
25
26rust_test_host {
27 name: "libvbmeta_rust.test",
28 defaults: ["libvbmeta_rust.defaults"],
29 prefer_rlib: true,
30 rustlibs: [
31 "libanyhow",
32 "libtempfile",
33 ],
Alice Wanga3cc9a02022-11-29 09:48:16 +000034 data: [
35 ":avb_testkey_rsa2048",
36 ":avb_testkey_rsa4096",
37 ":avb_testkey_rsa8192",
Nikita Ioffeea99b3d2024-03-27 22:20:19 +000038 ":test_microdroid_vendor_image",
39 ":test_microdroid_vendor_image_no_rollback_index",
Alice Wanga3cc9a02022-11-29 09:48:16 +000040 ],
Andrew Scull38127252022-06-13 13:11:00 +000041 required: ["avbtool"],
42 test_suites: ["general-tests"],
43 test_options: {
44 unit_test: false,
45 },
46 target: {
47 host: {
48 // TODO(b/204562227): remove once the build does this automatically
49 data: [":avbtool"],
50 data_libs: [
51 "libc++",
52 "libcrypto",
53 ],
54 },
55 },
56}