blob: 88e9c7027a5dfd20e9c7dee115077953f358859a [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",
Treehugger Robotbf3711e2023-12-07 16:03:20 +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",
Alan Stokesc4d5def2023-02-14 17:01:59 +000041 "libhypervisor_props",
David Brazdil3f0f1e82023-01-12 16:18:43 +000042 "liblazy_static",
43 "liblibc",
44 "liblog_rust",
45 "libmicrodroid_metadata",
46 "libmicrodroid_payload_config",
47 "libnested_virt",
48 "libnix",
49 "libonce_cell",
50 "libregex",
51 "librpcbinder_rs",
52 "librustutils",
53 "libsemver",
54 "libselinux_bindgen",
55 "libserde",
56 "libserde_json",
57 "libserde_xml_rs",
58 "libshared_child",
59 "libstatslog_virtualization_rust",
60 "libtombstoned_client_rust",
Seungjae Yooec3bc522023-11-09 10:14:30 +090061 "libvbmeta_rust",
David Brazdil3f0f1e82023-01-12 16:18:43 +000062 "libvm_control",
63 "libvmconfig",
64 "libzip",
65 "libvsock",
Jaewan Kim4cf20aa2023-04-03 10:25:38 +090066 "liblibfdt",
David Brazdil3f0f1e82023-01-12 16:18:43 +000067 // TODO(b/202115393) stabilize the interface
68 "packagemanager_aidl-rust",
69 ],
70 shared_libs: [
David Brazdil3f0f1e82023-01-12 16:18:43 +000071 "libselinux",
72 ],
73}
74
75rust_binary {
76 name: "virtmgr",
77 defaults: ["virtualizationmanager_defaults"],
78 srcs: ["src/main.rs"],
79 apex_available: ["com.android.virt"],
80}
81
82rust_test {
83 name: "virtualizationmanager_device_test",
84 srcs: ["src/main.rs"],
85 defaults: ["virtualizationmanager_defaults"],
86 rustlibs: [
87 "libtempfile",
88 ],
Jaewan Kim4cf20aa2023-04-03 10:25:38 +090089 data: [
Jaewan Kim46b96702023-09-07 15:24:51 +090090 ":test_avf_debug_policy_with_ramdump",
91 ":test_avf_debug_policy_without_ramdump",
Jaewan Kim4cf20aa2023-04-03 10:25:38 +090092 ":test_avf_debug_policy_with_adb",
93 ":test_avf_debug_policy_without_adb",
94 ],
David Brazdil3f0f1e82023-01-12 16:18:43 +000095 test_suites: ["general-tests"],
96}