blob: 33897b2a50827a7dbae535b6b27b5d92bb7fb45d [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",
Trevor Black9f145f22023-12-14 20:29:33 +00008 defaults: ["avf_build_flags_rust"],
David Brazdil3f0f1e82023-01-12 16:18:43 +00009 edition: "2021",
10 // Only build on targets which crosvm builds on.
11 enabled: false,
12 target: {
13 android64: {
14 compile_multilib: "64",
15 enabled: true,
16 },
17 linux_bionic_arm64: {
18 enabled: true,
19 },
20 },
21 prefer_rlib: true,
22 rustlibs: [
23 "android.system.virtualizationcommon-rust",
24 "android.system.virtualizationservice-rust",
25 "android.system.virtualizationservice_internal-rust",
26 "android.system.virtualmachineservice-rust",
27 "android.os.permissions_aidl-rust",
28 "libandroid_logger",
29 "libanyhow",
30 "libapkverify",
Jiyong Parkd7bd2f22023-08-10 20:41:19 +090031 "libavflog",
David Brazdil3f0f1e82023-01-12 16:18:43 +000032 "libbase_rust",
33 "libbinder_rs",
34 "libclap",
35 "libcommand_fds",
36 "libdisk",
Alan Stokesc4d5def2023-02-14 17:01:59 +000037 "libhypervisor_props",
David Brazdil3f0f1e82023-01-12 16:18:43 +000038 "liblazy_static",
39 "liblibc",
40 "liblog_rust",
41 "libmicrodroid_metadata",
42 "libmicrodroid_payload_config",
43 "libnested_virt",
44 "libnix",
45 "libonce_cell",
46 "libregex",
47 "librpcbinder_rs",
48 "librustutils",
49 "libsemver",
50 "libselinux_bindgen",
51 "libserde",
52 "libserde_json",
53 "libserde_xml_rs",
54 "libshared_child",
55 "libstatslog_virtualization_rust",
56 "libtombstoned_client_rust",
Seungjae Yooec3bc522023-11-09 10:14:30 +090057 "libvbmeta_rust",
David Brazdil3f0f1e82023-01-12 16:18:43 +000058 "libvm_control",
59 "libvmconfig",
60 "libzip",
61 "libvsock",
Jaewan Kim4cf20aa2023-04-03 10:25:38 +090062 "liblibfdt",
David Brazdil3f0f1e82023-01-12 16:18:43 +000063 // TODO(b/202115393) stabilize the interface
64 "packagemanager_aidl-rust",
65 ],
66 shared_libs: [
David Brazdil3f0f1e82023-01-12 16:18:43 +000067 "libselinux",
68 ],
69}
70
71rust_binary {
72 name: "virtmgr",
73 defaults: ["virtualizationmanager_defaults"],
74 srcs: ["src/main.rs"],
75 apex_available: ["com.android.virt"],
76}
77
78rust_test {
79 name: "virtualizationmanager_device_test",
80 srcs: ["src/main.rs"],
81 defaults: ["virtualizationmanager_defaults"],
82 rustlibs: [
83 "libtempfile",
84 ],
Jaewan Kim4cf20aa2023-04-03 10:25:38 +090085 data: [
Jaewan Kim46b96702023-09-07 15:24:51 +090086 ":test_avf_debug_policy_with_ramdump",
87 ":test_avf_debug_policy_without_ramdump",
Jaewan Kim4cf20aa2023-04-03 10:25:38 +090088 ":test_avf_debug_policy_with_adb",
89 ":test_avf_debug_policy_without_adb",
90 ],
David Brazdil3f0f1e82023-01-12 16:18:43 +000091 test_suites: ["general-tests"],
92}