blob: f58e99968f617e237d6a7d7d11f1c0fc1e8a4a4c [file] [log] [blame]
David Brazdil3f0f1e82023-01-12 16:18:43 +00001package {
2 default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
5rust_defaults {
6 name: "virtualizationmanager_defaults",
7 crate_name: "virtualizationmanager",
Shikha Panwar5d6a6752023-12-14 22:08:26 +00008 defaults: [
9 "avf_build_flags_rust",
10 "secretkeeper_use_latest_hal_aidl_rust",
11 "authgraph_use_latest_hal_aidl_rust",
12 ],
David Brazdil3f0f1e82023-01-12 16:18:43 +000013 edition: "2021",
14 // Only build on targets which crosvm builds on.
15 enabled: false,
16 target: {
17 android64: {
18 compile_multilib: "64",
19 enabled: true,
20 },
21 linux_bionic_arm64: {
22 enabled: true,
23 },
24 },
25 prefer_rlib: true,
26 rustlibs: [
27 "android.system.virtualizationcommon-rust",
28 "android.system.virtualizationservice-rust",
29 "android.system.virtualizationservice_internal-rust",
30 "android.system.virtualmachineservice-rust",
31 "android.os.permissions_aidl-rust",
32 "libandroid_logger",
33 "libanyhow",
34 "libapkverify",
Jiyong Parkd7bd2f22023-08-10 20:41:19 +090035 "libavflog",
David Brazdil3f0f1e82023-01-12 16:18:43 +000036 "libbase_rust",
37 "libbinder_rs",
38 "libclap",
39 "libcommand_fds",
40 "libdisk",
Inseob Kim46257382024-01-03 15:41:22 +090041 "libglob",
Seungjae Yoo192e99c2023-12-15 16:42:39 +090042 "libhex",
Alan Stokesc4d5def2023-02-14 17:01:59 +000043 "libhypervisor_props",
David Brazdil3f0f1e82023-01-12 16:18:43 +000044 "liblazy_static",
45 "liblibc",
46 "liblog_rust",
47 "libmicrodroid_metadata",
48 "libmicrodroid_payload_config",
49 "libnested_virt",
50 "libnix",
51 "libonce_cell",
52 "libregex",
53 "librpcbinder_rs",
54 "librustutils",
55 "libsemver",
56 "libselinux_bindgen",
57 "libserde",
58 "libserde_json",
59 "libserde_xml_rs",
60 "libshared_child",
61 "libstatslog_virtualization_rust",
62 "libtombstoned_client_rust",
Seungjae Yooec3bc522023-11-09 10:14:30 +090063 "libvbmeta_rust",
David Brazdil3f0f1e82023-01-12 16:18:43 +000064 "libvm_control",
65 "libvmconfig",
66 "libzip",
67 "libvsock",
Jaewan Kim4cf20aa2023-04-03 10:25:38 +090068 "liblibfdt",
David Brazdil3f0f1e82023-01-12 16:18:43 +000069 // TODO(b/202115393) stabilize the interface
70 "packagemanager_aidl-rust",
71 ],
72 shared_libs: [
David Brazdil3f0f1e82023-01-12 16:18:43 +000073 "libselinux",
74 ],
75}
76
77rust_binary {
78 name: "virtmgr",
79 defaults: ["virtualizationmanager_defaults"],
80 srcs: ["src/main.rs"],
81 apex_available: ["com.android.virt"],
82}
83
84rust_test {
85 name: "virtualizationmanager_device_test",
86 srcs: ["src/main.rs"],
87 defaults: ["virtualizationmanager_defaults"],
88 rustlibs: [
89 "libtempfile",
90 ],
Jaewan Kim4cf20aa2023-04-03 10:25:38 +090091 data: [
Jaewan Kim46b96702023-09-07 15:24:51 +090092 ":test_avf_debug_policy_with_ramdump",
93 ":test_avf_debug_policy_without_ramdump",
Jaewan Kim4cf20aa2023-04-03 10:25:38 +090094 ":test_avf_debug_policy_with_adb",
95 ":test_avf_debug_policy_without_adb",
96 ],
David Brazdil3f0f1e82023-01-12 16:18:43 +000097 test_suites: ["general-tests"],
98}