Steven Moreland | bf50de2 | 2022-03-29 20:59:50 +0000 | [diff] [blame] | 1 | cargo-features = ["named-profiles"] |
| 2 | |
Zach Reizner | 639d967 | 2017-05-01 17:57:18 -0700 | [diff] [blame] | 3 | [package] |
| 4 | name = "crosvm" |
| 5 | version = "0.1.0" |
| 6 | authors = ["The Chromium OS Authors"] |
Anton Romanov | bed40ad | 2022-03-08 01:16:09 +0000 | [diff] [blame] | 7 | edition = "2021" |
Zach Reizner | c5d6adb | 2021-04-05 12:17:11 -0700 | [diff] [blame] | 8 | default-run = "crosvm" |
Anton Romanov | ee60fe4 | 2022-03-10 19:19:22 +0000 | [diff] [blame] | 9 | # b:223855233 |
| 10 | resolver = "1" |
Zach Reizner | 639d967 | 2017-05-01 17:57:18 -0700 | [diff] [blame] | 11 | |
Zach Reizner | 267f2c8 | 2019-07-31 17:07:27 -0700 | [diff] [blame] | 12 | [lib] |
| 13 | path = "src/crosvm.rs" |
| 14 | |
| 15 | [[bin]] |
| 16 | name = "crosvm" |
| 17 | path = "src/main.rs" |
| 18 | |
Tomasz Jeznach | 53f836c | 2021-03-31 15:08:45 -0700 | [diff] [blame] | 19 | [[bin]] |
| 20 | name = "crosvm-direct" |
| 21 | path = "src/main.rs" |
| 22 | required-features = [ "direct" ] |
| 23 | |
Zach Reizner | 639d967 | 2017-05-01 17:57:18 -0700 | [diff] [blame] | 24 | [profile.release] |
Zach Reizner | 639d967 | 2017-05-01 17:57:18 -0700 | [diff] [blame] | 25 | panic = 'abort' |
Zach Reizner | f6b58e4 | 2018-10-15 15:40:09 -0700 | [diff] [blame] | 26 | overflow-checks = true |
Zach Reizner | 639d967 | 2017-05-01 17:57:18 -0700 | [diff] [blame] | 27 | |
David Stevens | 6ae817e | 2022-03-24 19:15:38 +0900 | [diff] [blame] | 28 | [profile.release-test] |
| 29 | inherits = 'release' |
| 30 | panic = 'unwind' |
| 31 | |
Alexandre Courbot | 4da0e52 | 2022-02-08 18:44:10 +0900 | [diff] [blame] | 32 | # Reproduces the options used when building crosvm for Chrome OS. |
| 33 | [profile.chromeos] |
| 34 | inherits = "release" |
| 35 | opt-level = "s" |
| 36 | |
| 37 | # Enables LTO to further reduce the size of the binary. |
| 38 | [profile.lto] |
| 39 | inherits = "chromeos" |
| 40 | lto = true |
| 41 | |
Dennis Kempin | fa32ced | 2021-06-23 11:06:38 -0700 | [diff] [blame] | 42 | # We currently need to exclude some crates from the workspace to allow |
| 43 | # these crates to be independently built by portage. These crates will |
| 44 | # eventually be moved into separate repositories. |
| 45 | # The only workspace members that need to be explicitly specified here are those |
| 46 | # that are not dependencies of the crosvm root crate. |
Dylan Reid | 939d588 | 2017-11-08 17:33:46 -0800 | [diff] [blame] | 47 | [workspace] |
Dennis Kempin | 0797a55 | 2020-11-10 09:34:56 -0800 | [diff] [blame] | 48 | members = [ |
Dennis Kempin | 8a1c50d | 2021-10-27 11:04:03 -0700 | [diff] [blame] | 49 | "aarch64", |
| 50 | "acpi_tables", |
| 51 | "arch", |
Dennis Kempin | ef51618 | 2022-03-16 12:16:04 -0700 | [diff] [blame] | 52 | "base", |
Dennis Kempin | 8a1c50d | 2021-10-27 11:04:03 -0700 | [diff] [blame] | 53 | "bit_field", |
Dennis Kempin | 55c6a3b | 2022-03-17 11:26:01 -0700 | [diff] [blame] | 54 | "cros_async", |
Dennis Kempin | 8a1c50d | 2021-10-27 11:04:03 -0700 | [diff] [blame] | 55 | "crosvm-fuzz", |
Dennis Kempin | ef51618 | 2022-03-16 12:16:04 -0700 | [diff] [blame] | 56 | "crosvm_control", |
Dennis Kempin | 8a1c50d | 2021-10-27 11:04:03 -0700 | [diff] [blame] | 57 | "crosvm_plugin", |
| 58 | "devices", |
| 59 | "disk", |
| 60 | "fuse", |
| 61 | "gpu_display", |
| 62 | "hypervisor", |
Dennis Kempin | 0797a55 | 2020-11-10 09:34:56 -0800 | [diff] [blame] | 63 | "integration_tests", |
Dennis Kempin | 0928f91 | 2022-03-17 16:40:59 -0700 | [diff] [blame] | 64 | "io_uring", |
Dennis Kempin | 8a1c50d | 2021-10-27 11:04:03 -0700 | [diff] [blame] | 65 | "kernel_cmdline", |
| 66 | "kernel_loader", |
| 67 | "kvm", |
| 68 | "kvm_sys", |
Dennis Kempin | ef51618 | 2022-03-16 12:16:04 -0700 | [diff] [blame] | 69 | "libcras_stub", |
Dennis Kempin | 8a1c50d | 2021-10-27 11:04:03 -0700 | [diff] [blame] | 70 | "linux_input_sys", |
Alexandre Courbot | c7cd0e0 | 2022-04-01 16:03:40 +0900 | [diff] [blame] | 71 | "media/libvda", |
Dennis Kempin | 8a1c50d | 2021-10-27 11:04:03 -0700 | [diff] [blame] | 72 | "net_sys", |
| 73 | "net_util", |
| 74 | "power_monitor", |
| 75 | "protos", |
| 76 | "qcow_utils", |
| 77 | "resources", |
| 78 | "rutabaga_gfx", |
Alexandre Courbot | aa043e8 | 2022-02-03 19:39:10 +0900 | [diff] [blame] | 79 | "serde_keyvalue", |
Dennis Kempin | ef51618 | 2022-03-16 12:16:04 -0700 | [diff] [blame] | 80 | "system_api_stub", |
Dennis Kempin | 8a1c50d | 2021-10-27 11:04:03 -0700 | [diff] [blame] | 81 | "tpm2", |
| 82 | "tpm2-sys", |
| 83 | "usb_sys", |
| 84 | "usb_util", |
| 85 | "vfio_sys", |
| 86 | "vhost", |
| 87 | "virtio_sys", |
| 88 | "vm_control", |
| 89 | "vm_memory", |
| 90 | "x86_64", |
Dennis Kempin | ef51618 | 2022-03-16 12:16:04 -0700 | [diff] [blame] | 91 | "third_party/vmm_vhost", |
Dennis Kempin | 0797a55 | 2020-11-10 09:34:56 -0800 | [diff] [blame] | 92 | ] |
paulhsia | d1eceec | 2018-12-20 15:44:11 +0800 | [diff] [blame] | 93 | exclude = [ |
Dennis Kempin | 8a1c50d | 2021-10-27 11:04:03 -0700 | [diff] [blame] | 94 | "common/assertions", |
| 95 | "common/audio_streams", |
Dennis Kempin | ef51618 | 2022-03-16 12:16:04 -0700 | [diff] [blame] | 96 | "common/balloon_control", |
Dennis Kempin | 8a1c50d | 2021-10-27 11:04:03 -0700 | [diff] [blame] | 97 | "common/cros-fuzz", |
| 98 | "common/cros_async", |
Chirantan Ekbote | 7b13ef3 | 2021-07-13 15:14:25 +0900 | [diff] [blame] | 99 | "common/cros_asyncv2", |
Dennis Kempin | 8a1c50d | 2021-10-27 11:04:03 -0700 | [diff] [blame] | 100 | "common/data_model", |
Dennis Kempin | 8a1c50d | 2021-10-27 11:04:03 -0700 | [diff] [blame] | 101 | "common/io_uring", |
| 102 | "common/p9", |
| 103 | "common/sync", |
| 104 | "common/sys_util", |
Dennis Kempin | ef51618 | 2022-03-16 12:16:04 -0700 | [diff] [blame] | 105 | "common/sys_util_core", |
| 106 | "common/win_sys_util", |
Dennis Kempin | 9fbf498 | 2022-03-21 14:44:36 -0700 | [diff] [blame] | 107 | "win_util", |
paulhsia | d1eceec | 2018-12-20 15:44:11 +0800 | [diff] [blame] | 108 | ] |
Dylan Reid | 939d588 | 2017-11-08 17:33:46 -0800 | [diff] [blame] | 109 | |
Zach Reizner | e0983c7 | 2018-01-16 17:35:27 -0800 | [diff] [blame] | 110 | [features] |
Dennis Kempin | 1872477 | 2021-10-13 16:25:49 -0700 | [diff] [blame] | 111 | all-linux = [ |
| 112 | # TODO(b/203105868): Enable remaining features on linux builds. |
| 113 | "composite-disk", |
| 114 | "default", |
| 115 | "gdb", |
| 116 | "tpm", |
| 117 | "virgl_renderer_next", |
| 118 | "virgl_renderer", |
| 119 | "x", |
| 120 | ] |
Anton Romanov | 24a2261 | 2022-03-03 01:29:26 +0000 | [diff] [blame] | 121 | win64 = [] |
Vikram Auradkar | f797986 | 2021-07-02 11:42:06 -0700 | [diff] [blame] | 122 | audio = ["devices/audio"] |
Dennis Kempin | 50a58f9 | 2021-06-23 11:34:31 -0700 | [diff] [blame] | 123 | audio_cras = ["devices/audio_cras"] |
Ryo Hashimoto | 6d92438 | 2021-06-21 20:59:04 +0900 | [diff] [blame] | 124 | chromeos = ["base/chromeos", "audio_cras", "devices/chromeos"] |
Vikram Auradkar | f797986 | 2021-07-02 11:42:06 -0700 | [diff] [blame] | 125 | composite-disk = ["protos/composite-disk", "protobuf", "disk/composite-disk"] |
| 126 | default = ["audio", "gpu", "usb"] |
Dmitry Torokhov | 5e05a83 | 2018-05-10 10:25:58 -0700 | [diff] [blame] | 127 | default-no-sandbox = [] |
Dmytro Maluka | 74031b4 | 2022-02-25 18:00:17 +0000 | [diff] [blame] | 128 | direct = ["devices/direct", "arch/direct", "x86_64/direct"] |
Daniel Verkamp | 1349c13 | 2021-08-18 14:16:16 -0700 | [diff] [blame] | 129 | gdb = ["gdbstub", "gdbstub_arch", "arch/gdb", "vm_control/gdb", "x86_64/gdb"] |
Vikram Auradkar | f797986 | 2021-07-02 11:42:06 -0700 | [diff] [blame] | 130 | gfxstream = ["devices/gfxstream"] |
Zach Reizner | 3a8100a | 2017-09-13 19:15:43 -0700 | [diff] [blame] | 131 | gpu = ["devices/gpu"] |
Alexandre Courbot | c02960d | 2021-07-11 23:06:30 +0900 | [diff] [blame] | 132 | libvda = ["devices/libvda"] |
Anton Romanov | 90922be | 2022-03-10 00:25:29 +0000 | [diff] [blame] | 133 | linux-armhf = [ |
| 134 | "composite-disk", |
| 135 | "default", |
| 136 | "gdb", |
| 137 | "tpm", |
| 138 | ] |
| 139 | linux-x86_64 = ["all-linux", "plugin"] |
| 140 | linux-aarch64 = ["all-linux"] |
Steven Richman | f32d0b4 | 2020-06-20 21:45:32 -0700 | [diff] [blame] | 141 | plugin = ["protos/plugin", "crosvm_plugin", "kvm", "kvm_sys", "protobuf"] |
Anton Romanov | db0f4d6 | 2022-03-23 21:24:29 +0000 | [diff] [blame] | 142 | plugin-render-server = [] |
Alex Lau | 0d6ae7a | 2020-11-10 18:24:04 +0900 | [diff] [blame] | 143 | power-monitor-powerd = ["arch/power-monitor-powerd"] |
Noah Gold | 4430622 | 2022-03-24 11:16:33 -0700 | [diff] [blame] | 144 | slirp = ["devices/slirp"] |
David Tolnay | 48ff416 | 2019-04-06 14:30:04 -0700 | [diff] [blame] | 145 | tpm = ["devices/tpm"] |
Daniel Verkamp | f1439d4 | 2021-05-21 13:55:10 -0700 | [diff] [blame] | 146 | usb = ["devices/usb"] |
Alexandre Courbot | 580231b | 2021-07-12 08:37:13 +0900 | [diff] [blame] | 147 | video-decoder = ["devices/video-decoder"] |
| 148 | video-encoder = ["devices/video-encoder"] |
Vikram Auradkar | f797986 | 2021-07-02 11:42:06 -0700 | [diff] [blame] | 149 | virgl_renderer = ["devices/virgl_renderer"] |
| 150 | virgl_renderer_next = ["rutabaga_gfx/virgl_renderer_next"] |
Gurchetan Singh | 293913c | 2020-12-09 10:44:13 -0800 | [diff] [blame] | 151 | wl-dmabuf = ["devices/minigbm"] |
Zach Reizner | f5285c6 | 2019-04-16 15:09:20 -0700 | [diff] [blame] | 152 | x = ["devices/x"] |
Zach Reizner | e0983c7 | 2018-01-16 17:35:27 -0800 | [diff] [blame] | 153 | |
Zach Reizner | 639d967 | 2017-05-01 17:57:18 -0700 | [diff] [blame] | 154 | [dependencies] |
Daniel Verkamp | 6b29858 | 2021-08-16 15:37:11 -0700 | [diff] [blame] | 155 | anyhow = "1.0.32" |
Sonny Rao | ed517d1 | 2018-02-13 22:09:43 -0800 | [diff] [blame] | 156 | arch = { path = "arch" } |
Dennis Kempin | 8a1c50d | 2021-10-27 11:04:03 -0700 | [diff] [blame] | 157 | assertions = { path = "common/assertions" } |
Dylan Reid | 3082e8e | 2019-01-07 10:33:48 -0800 | [diff] [blame] | 158 | audio_streams = "*" |
Steven Moreland | bc538b3 | 2022-04-01 15:11:59 +0000 | [diff] [blame] | 159 | base = { path = "base" } |
Jingkui Wang | 8cad751 | 2018-05-22 11:22:13 -0700 | [diff] [blame] | 160 | bit_field = { path = "bit_field" } |
Daniel Almeida | 37f02e9 | 2021-12-20 12:49:10 -0300 | [diff] [blame] | 161 | cfg-if = "1.0.0" |
David Tolnay | 48ff416 | 2019-04-06 14:30:04 -0700 | [diff] [blame] | 162 | crosvm_plugin = { path = "crosvm_plugin", optional = true } |
| 163 | data_model = "*" |
Dylan Reid | d169a8d | 2017-10-06 15:26:46 -0700 | [diff] [blame] | 164 | devices = { path = "devices" } |
Cody Schuffelen | 7d533e5 | 2019-07-02 16:54:05 -0700 | [diff] [blame] | 165 | disk = { path = "disk" } |
Daniel Verkamp | c13c0c2 | 2021-11-05 16:07:59 -0700 | [diff] [blame] | 166 | enumn = "0.1.0" |
Joel Galenson | 06392aa | 2021-08-04 11:44:49 -0700 | [diff] [blame] | 167 | gdbstub = { version = "0.5.0", optional = true } |
| 168 | gdbstub_arch = { version = "0.1.0", optional = true } |
Gurchetan Singh | 293913c | 2020-12-09 10:44:13 -0800 | [diff] [blame] | 169 | rutabaga_gfx = { path = "rutabaga_gfx"} |
Steven Richman | f32d0b4 | 2020-06-20 21:45:32 -0700 | [diff] [blame] | 170 | hypervisor = { path = "hypervisor" } |
Sonny Rao | 6cc352f | 2018-02-01 17:49:01 -0800 | [diff] [blame] | 171 | kernel_cmdline = { path = "kernel_cmdline" } |
Zach Reizner | 639d967 | 2017-05-01 17:57:18 -0700 | [diff] [blame] | 172 | kernel_loader = { path = "kernel_loader" } |
Steven Richman | f32d0b4 | 2020-06-20 21:45:32 -0700 | [diff] [blame] | 173 | kvm = { path = "kvm", optional = true } |
| 174 | kvm_sys = { path = "kvm_sys", optional = true } |
Zach Reizner | 6d6efb2 | 2021-04-16 18:12:24 -0700 | [diff] [blame] | 175 | libc = "0.2.93" |
paulhsia | f052cfe | 2019-01-22 15:22:25 +0800 | [diff] [blame] | 176 | libcras = "*" |
Allen Webb | f3024c8 | 2020-06-19 07:19:48 -0700 | [diff] [blame] | 177 | minijail = "*" # provided by ebuild |
Jason D. Clinton | 865323d | 2017-09-27 22:04:03 -0600 | [diff] [blame] | 178 | net_util = { path = "net_util" } |
Chirantan Ekbote | 75ba875 | 2020-10-27 18:33:02 +0900 | [diff] [blame] | 179 | p9 = "*" |
David Tolnay | fd67ec5 | 2019-04-10 17:59:15 -0700 | [diff] [blame] | 180 | protobuf = { version = "2.3", optional = true } |
David Tolnay | 65928af | 2019-04-05 20:34:50 -0700 | [diff] [blame] | 181 | protos = { path = "protos", optional = true } |
David Tolnay | 3df3552 | 2019-03-11 12:36:30 -0700 | [diff] [blame] | 182 | remain = "*" |
David Tolnay | 48ff416 | 2019-04-06 14:30:04 -0700 | [diff] [blame] | 183 | resources = { path = "resources" } |
Chirantan Ekbote | 520ad43 | 2021-12-03 17:43:37 +0900 | [diff] [blame] | 184 | scudo = { version = "0.1", optional = true } |
Hikaru Nishida | a0e381b | 2021-05-24 17:13:45 +0900 | [diff] [blame] | 185 | serde_json = "*" |
Alexandre Courbot | aa043e8 | 2022-02-03 19:39:10 +0900 | [diff] [blame] | 186 | serde_keyvalue = { path = "serde_keyvalue" } |
Dennis Kempin | 8a1c50d | 2021-10-27 11:04:03 -0700 | [diff] [blame] | 187 | sync = { path = "common/sync" } |
Daniel Verkamp | 7fd815e | 2021-09-22 13:10:11 -0700 | [diff] [blame] | 188 | tempfile = "3" |
Daniel Verkamp | 1349c13 | 2021-08-18 14:16:16 -0700 | [diff] [blame] | 189 | thiserror = { version = "1.0.20" } |
Keiichi Watanabe | 15b4769 | 2022-03-10 21:28:44 +0900 | [diff] [blame] | 190 | uuid = { version = "0.8.2" } |
David Tolnay | 48ff416 | 2019-04-06 14:30:04 -0700 | [diff] [blame] | 191 | vhost = { path = "vhost" } |
| 192 | vm_control = { path = "vm_control" } |
Chuanxiao Dong | 91e8403 | 2019-11-01 15:18:13 +0800 | [diff] [blame] | 193 | acpi_tables = { path = "acpi_tables" } |
Dylan Reid | ec058d6 | 2020-07-20 20:21:11 -0700 | [diff] [blame] | 194 | vm_memory = { path = "vm_memory" } |
Zach Reizner | 639d967 | 2017-05-01 17:57:18 -0700 | [diff] [blame] | 195 | |
Zach Reizner | 3cbded2 | 2017-08-30 17:07:01 -0700 | [diff] [blame] | 196 | [target.'cfg(target_arch = "x86_64")'.dependencies] |
| 197 | x86_64 = { path = "x86_64" } |
Zach Reizner | 8864cb0 | 2018-01-16 17:59:03 -0800 | [diff] [blame] | 198 | |
Sonny Rao | 2ffa0cb | 2018-02-26 17:27:40 -0800 | [diff] [blame] | 199 | [target.'cfg(any(target_arch = "aarch64", target_arch = "arm"))'.dependencies] |
| 200 | aarch64 = { path = "aarch64" } |
| 201 | |
Zach Reizner | 8864cb0 | 2018-01-16 17:59:03 -0800 | [diff] [blame] | 202 | [dev-dependencies] |
Steven Moreland | bc538b3 | 2022-04-01 15:11:59 +0000 | [diff] [blame] | 203 | base = { path = "base" } |
Anton Romanov | f87295a | 2022-04-06 21:19:03 +0000 | [diff] [blame] | 204 | lazy_static = "*" |
paulhsia | d1eceec | 2018-12-20 15:44:11 +0800 | [diff] [blame] | 205 | |
| 206 | [patch.crates-io] |
Dennis Kempin | 8a1c50d | 2021-10-27 11:04:03 -0700 | [diff] [blame] | 207 | assertions = { path = "common/assertions" } |
| 208 | audio_streams = { path = "common/audio_streams" } |
Dennis Kempin | ef51618 | 2022-03-16 12:16:04 -0700 | [diff] [blame] | 209 | base = { path = "base" } |
Vikram Auradkar | 323006c | 2022-01-31 15:18:10 -0800 | [diff] [blame] | 210 | sys_util_core = { path = "common/sys_util_core" } |
Dennis Kempin | 55c6a3b | 2022-03-17 11:26:01 -0700 | [diff] [blame] | 211 | cros_async = { path = "cros_async" } |
Dennis Kempin | 6a584d6 | 2021-07-23 10:06:40 -0700 | [diff] [blame] | 212 | cros_fuzz = { path = "common/cros-fuzz" } # ignored by ebuild |
Dennis Kempin | 8a1c50d | 2021-10-27 11:04:03 -0700 | [diff] [blame] | 213 | data_model = { path = "common/data_model" } |
Dennis Kempin | 50a58f9 | 2021-06-23 11:34:31 -0700 | [diff] [blame] | 214 | libcras = { path = "libcras_stub" } # ignored by ebuild |
Dennis Kempin | 6a584d6 | 2021-07-23 10:06:40 -0700 | [diff] [blame] | 215 | p9 = { path = "common/p9" } # ignored by ebuild |
Dennis Kempin | 8a1c50d | 2021-10-27 11:04:03 -0700 | [diff] [blame] | 216 | sync = { path = "common/sync" } |
| 217 | sys_util = { path = "common/sys_util" } |
Ryo Hashimoto | 6d92438 | 2021-06-21 20:59:04 +0900 | [diff] [blame] | 218 | system_api = { path = "system_api_stub" } # ignored by ebuild |
Dennis Kempin | 6a584d6 | 2021-07-23 10:06:40 -0700 | [diff] [blame] | 219 | wire_format_derive = { path = "common/p9/wire_format_derive" } # ignored by ebuild |
Andrew Walbran | bba2544 | 2021-08-16 12:36:46 +0000 | [diff] [blame] | 220 | minijail = { path = "../minijail/rust/minijail" } # ignored by ebuild |