2022-06-13 13:11:00 +00:00
|
|
|
package {
|
|
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
|
|
}
|
|
|
|
|
|
|
|
rust_defaults {
|
|
|
|
name: "libvbmeta_rust.defaults",
|
|
|
|
crate_name: "vbmeta",
|
|
|
|
host_supported: true,
|
|
|
|
srcs: ["src/lib.rs"],
|
2022-08-31 12:41:28 +00:00
|
|
|
edition: "2021",
|
2022-06-13 13:11:00 +00:00
|
|
|
rustlibs: [
|
|
|
|
"libavb_bindgen",
|
|
|
|
"libthiserror",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
rust_library {
|
|
|
|
name: "libvbmeta_rust",
|
|
|
|
defaults: ["libvbmeta_rust.defaults"],
|
|
|
|
}
|
|
|
|
|
|
|
|
rust_test_host {
|
|
|
|
name: "libvbmeta_rust.test",
|
|
|
|
defaults: ["libvbmeta_rust.defaults"],
|
|
|
|
prefer_rlib: true,
|
|
|
|
rustlibs: [
|
|
|
|
"libanyhow",
|
|
|
|
"libtempfile",
|
|
|
|
],
|
|
|
|
data: ["tests/data/*"],
|
|
|
|
required: ["avbtool"],
|
|
|
|
test_suites: ["general-tests"],
|
|
|
|
test_options: {
|
|
|
|
unit_test: false,
|
|
|
|
},
|
|
|
|
target: {
|
|
|
|
host: {
|
|
|
|
// TODO(b/204562227): remove once the build does this automatically
|
|
|
|
data: [":avbtool"],
|
|
|
|
data_libs: [
|
|
|
|
"libc++",
|
|
|
|
"libcrypto",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|