Andrew Scull | 3812725 | 2022-06-13 13:11:00 +0000 | [diff] [blame] | 1 | package { |
| 2 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 3 | } |
| 4 | |
| 5 | rust_defaults { |
| 6 | name: "libvbmeta_rust.defaults", |
| 7 | crate_name: "vbmeta", |
| 8 | host_supported: true, |
| 9 | srcs: ["src/lib.rs"], |
Alan Stokes | 6472ccd | 2022-08-31 13:41:28 +0100 | [diff] [blame] | 10 | edition: "2021", |
Andrew Scull | 3812725 | 2022-06-13 13:11:00 +0000 | [diff] [blame] | 11 | rustlibs: [ |
| 12 | "libavb_bindgen", |
| 13 | "libthiserror", |
| 14 | ], |
| 15 | } |
| 16 | |
| 17 | rust_library { |
| 18 | name: "libvbmeta_rust", |
| 19 | defaults: ["libvbmeta_rust.defaults"], |
| 20 | } |
| 21 | |
| 22 | rust_test_host { |
| 23 | name: "libvbmeta_rust.test", |
| 24 | defaults: ["libvbmeta_rust.defaults"], |
| 25 | prefer_rlib: true, |
| 26 | rustlibs: [ |
| 27 | "libanyhow", |
| 28 | "libtempfile", |
| 29 | ], |
Alice Wang | a3cc9a0 | 2022-11-29 09:48:16 +0000 | [diff] [blame] | 30 | data: [ |
| 31 | ":avb_testkey_rsa2048", |
| 32 | ":avb_testkey_rsa4096", |
| 33 | ":avb_testkey_rsa8192", |
| 34 | ], |
Andrew Scull | 3812725 | 2022-06-13 13:11:00 +0000 | [diff] [blame] | 35 | required: ["avbtool"], |
| 36 | test_suites: ["general-tests"], |
| 37 | test_options: { |
| 38 | unit_test: false, |
| 39 | }, |
| 40 | target: { |
| 41 | host: { |
| 42 | // TODO(b/204562227): remove once the build does this automatically |
| 43 | data: [":avbtool"], |
| 44 | data_libs: [ |
| 45 | "libc++", |
| 46 | "libcrypto", |
| 47 | ], |
| 48 | }, |
| 49 | }, |
| 50 | } |