blob: 60c94fcfcf1fe3e3e9f08b05ef85273d8168e5c0 [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",
Seungjae Yoo192e99c2023-12-15 16:42:39 +090041 "libhex",
Alan Stokesc4d5def2023-02-14 17:01:59 +000042 "libhypervisor_props",
David Brazdil3f0f1e82023-01-12 16:18:43 +000043 "liblazy_static",
44 "liblibc",
45 "liblog_rust",
46 "libmicrodroid_metadata",
47 "libmicrodroid_payload_config",
48 "libnested_virt",
49 "libnix",
50 "libonce_cell",
51 "libregex",
52 "librpcbinder_rs",
53 "librustutils",
54 "libsemver",
55 "libselinux_bindgen",
56 "libserde",
57 "libserde_json",
58 "libserde_xml_rs",
59 "libshared_child",
60 "libstatslog_virtualization_rust",
61 "libtombstoned_client_rust",
Seungjae Yooec3bc522023-11-09 10:14:30 +090062 "libvbmeta_rust",
David Brazdil3f0f1e82023-01-12 16:18:43 +000063 "libvm_control",
64 "libvmconfig",
65 "libzip",
66 "libvsock",
Jaewan Kim4cf20aa2023-04-03 10:25:38 +090067 "liblibfdt",
David Brazdil3f0f1e82023-01-12 16:18:43 +000068 // TODO(b/202115393) stabilize the interface
69 "packagemanager_aidl-rust",
70 ],
71 shared_libs: [
David Brazdil3f0f1e82023-01-12 16:18:43 +000072 "libselinux",
73 ],
74}
75
76rust_binary {
77 name: "virtmgr",
78 defaults: ["virtualizationmanager_defaults"],
79 srcs: ["src/main.rs"],
80 apex_available: ["com.android.virt"],
81}
82
83rust_test {
84 name: "virtualizationmanager_device_test",
85 srcs: ["src/main.rs"],
86 defaults: ["virtualizationmanager_defaults"],
87 rustlibs: [
88 "libtempfile",
89 ],
Jaewan Kim4cf20aa2023-04-03 10:25:38 +090090 data: [
Jaewan Kim46b96702023-09-07 15:24:51 +090091 ":test_avf_debug_policy_with_ramdump",
92 ":test_avf_debug_policy_without_ramdump",
Jaewan Kim4cf20aa2023-04-03 10:25:38 +090093 ":test_avf_debug_policy_with_adb",
94 ":test_avf_debug_policy_without_adb",
95 ],
David Brazdil3f0f1e82023-01-12 16:18:43 +000096 test_suites: ["general-tests"],
97}