blob: 3a3742b785e44a847e4ad4db1830681df9a0ae7c [file] [log] [blame]
Steven Morelandbf50de22022-03-29 20:59:50 +00001cargo-features = ["named-profiles"]
2
Zach Reizner639d9672017-05-01 17:57:18 -07003[package]
4name = "crosvm"
5version = "0.1.0"
6authors = ["The Chromium OS Authors"]
Anton Romanovbed40ad2022-03-08 01:16:09 +00007edition = "2021"
Zach Reiznerc5d6adb2021-04-05 12:17:11 -07008default-run = "crosvm"
Anton Romanovee60fe42022-03-10 19:19:22 +00009# b:223855233
10resolver = "1"
Zach Reizner639d9672017-05-01 17:57:18 -070011
Zach Reizner267f2c82019-07-31 17:07:27 -070012[lib]
13path = "src/crosvm.rs"
14
15[[bin]]
16name = "crosvm"
17path = "src/main.rs"
18
Tomasz Jeznach53f836c2021-03-31 15:08:45 -070019[[bin]]
20name = "crosvm-direct"
21path = "src/main.rs"
22required-features = [ "direct" ]
23
Zach Reizner639d9672017-05-01 17:57:18 -070024[profile.release]
Zach Reizner639d9672017-05-01 17:57:18 -070025panic = 'abort'
Zach Reiznerf6b58e42018-10-15 15:40:09 -070026overflow-checks = true
Zach Reizner639d9672017-05-01 17:57:18 -070027
David Stevens6ae817e2022-03-24 19:15:38 +090028[profile.release-test]
29inherits = 'release'
30panic = 'unwind'
31
Alexandre Courbot4da0e522022-02-08 18:44:10 +090032# Reproduces the options used when building crosvm for Chrome OS.
33[profile.chromeos]
34inherits = "release"
35opt-level = "s"
36
37# Enables LTO to further reduce the size of the binary.
38[profile.lto]
39inherits = "chromeos"
40lto = true
41
Dennis Kempinfa32ced2021-06-23 11:06:38 -070042# 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 Reid939d5882017-11-08 17:33:46 -080047[workspace]
Dennis Kempin0797a552020-11-10 09:34:56 -080048members = [
Dennis Kempin8a1c50d2021-10-27 11:04:03 -070049 "aarch64",
50 "acpi_tables",
51 "arch",
Dennis Kempinef516182022-03-16 12:16:04 -070052 "base",
Dennis Kempin8a1c50d2021-10-27 11:04:03 -070053 "bit_field",
Dennis Kempin55c6a3b2022-03-17 11:26:01 -070054 "cros_async",
Dennis Kempin8a1c50d2021-10-27 11:04:03 -070055 "crosvm-fuzz",
Dennis Kempinef516182022-03-16 12:16:04 -070056 "crosvm_control",
Dennis Kempin8a1c50d2021-10-27 11:04:03 -070057 "crosvm_plugin",
58 "devices",
59 "disk",
60 "fuse",
61 "gpu_display",
62 "hypervisor",
Dennis Kempin0797a552020-11-10 09:34:56 -080063 "integration_tests",
Dennis Kempin0928f912022-03-17 16:40:59 -070064 "io_uring",
Dennis Kempin8a1c50d2021-10-27 11:04:03 -070065 "kernel_cmdline",
66 "kernel_loader",
67 "kvm",
68 "kvm_sys",
Dennis Kempinef516182022-03-16 12:16:04 -070069 "libcras_stub",
Dennis Kempin8a1c50d2021-10-27 11:04:03 -070070 "linux_input_sys",
Alexandre Courbotc7cd0e02022-04-01 16:03:40 +090071 "media/libvda",
Dennis Kempin8a1c50d2021-10-27 11:04:03 -070072 "net_sys",
73 "net_util",
74 "power_monitor",
75 "protos",
76 "qcow_utils",
77 "resources",
78 "rutabaga_gfx",
Alexandre Courbotaa043e82022-02-03 19:39:10 +090079 "serde_keyvalue",
Dennis Kempinef516182022-03-16 12:16:04 -070080 "system_api_stub",
Dennis Kempin8a1c50d2021-10-27 11:04:03 -070081 "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 Kempinef516182022-03-16 12:16:04 -070091 "third_party/vmm_vhost",
Dennis Kempin0797a552020-11-10 09:34:56 -080092]
paulhsiad1eceec2018-12-20 15:44:11 +080093exclude = [
Dennis Kempin8a1c50d2021-10-27 11:04:03 -070094 "common/assertions",
95 "common/audio_streams",
Dennis Kempinef516182022-03-16 12:16:04 -070096 "common/balloon_control",
Dennis Kempin8a1c50d2021-10-27 11:04:03 -070097 "common/cros-fuzz",
98 "common/cros_async",
Chirantan Ekbote7b13ef32021-07-13 15:14:25 +090099 "common/cros_asyncv2",
Dennis Kempin8a1c50d2021-10-27 11:04:03 -0700100 "common/data_model",
Dennis Kempin8a1c50d2021-10-27 11:04:03 -0700101 "common/io_uring",
102 "common/p9",
103 "common/sync",
104 "common/sys_util",
Dennis Kempinef516182022-03-16 12:16:04 -0700105 "common/sys_util_core",
106 "common/win_sys_util",
Dennis Kempin9fbf4982022-03-21 14:44:36 -0700107 "win_util",
paulhsiad1eceec2018-12-20 15:44:11 +0800108]
Dylan Reid939d5882017-11-08 17:33:46 -0800109
Zach Reiznere0983c72018-01-16 17:35:27 -0800110[features]
Dennis Kempin18724772021-10-13 16:25:49 -0700111all-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 Romanov24a22612022-03-03 01:29:26 +0000121win64 = []
Vikram Auradkarf7979862021-07-02 11:42:06 -0700122audio = ["devices/audio"]
Dennis Kempin50a58f92021-06-23 11:34:31 -0700123audio_cras = ["devices/audio_cras"]
Ryo Hashimoto6d924382021-06-21 20:59:04 +0900124chromeos = ["base/chromeos", "audio_cras", "devices/chromeos"]
Vikram Auradkarf7979862021-07-02 11:42:06 -0700125composite-disk = ["protos/composite-disk", "protobuf", "disk/composite-disk"]
126default = ["audio", "gpu", "usb"]
Dmitry Torokhov5e05a832018-05-10 10:25:58 -0700127default-no-sandbox = []
Dmytro Maluka74031b42022-02-25 18:00:17 +0000128direct = ["devices/direct", "arch/direct", "x86_64/direct"]
Daniel Verkamp1349c132021-08-18 14:16:16 -0700129gdb = ["gdbstub", "gdbstub_arch", "arch/gdb", "vm_control/gdb", "x86_64/gdb"]
Vikram Auradkarf7979862021-07-02 11:42:06 -0700130gfxstream = ["devices/gfxstream"]
Zach Reizner3a8100a2017-09-13 19:15:43 -0700131gpu = ["devices/gpu"]
Alexandre Courbotc02960d2021-07-11 23:06:30 +0900132libvda = ["devices/libvda"]
Anton Romanov90922be2022-03-10 00:25:29 +0000133linux-armhf = [
134 "composite-disk",
135 "default",
136 "gdb",
137 "tpm",
138 ]
139linux-x86_64 = ["all-linux", "plugin"]
140linux-aarch64 = ["all-linux"]
Steven Richmanf32d0b42020-06-20 21:45:32 -0700141plugin = ["protos/plugin", "crosvm_plugin", "kvm", "kvm_sys", "protobuf"]
Anton Romanovdb0f4d62022-03-23 21:24:29 +0000142plugin-render-server = []
Alex Lau0d6ae7a2020-11-10 18:24:04 +0900143power-monitor-powerd = ["arch/power-monitor-powerd"]
Noah Gold44306222022-03-24 11:16:33 -0700144slirp = ["devices/slirp"]
David Tolnay48ff4162019-04-06 14:30:04 -0700145tpm = ["devices/tpm"]
Daniel Verkampf1439d42021-05-21 13:55:10 -0700146usb = ["devices/usb"]
Alexandre Courbot580231b2021-07-12 08:37:13 +0900147video-decoder = ["devices/video-decoder"]
148video-encoder = ["devices/video-encoder"]
Vikram Auradkarf7979862021-07-02 11:42:06 -0700149virgl_renderer = ["devices/virgl_renderer"]
150virgl_renderer_next = ["rutabaga_gfx/virgl_renderer_next"]
Gurchetan Singh293913c2020-12-09 10:44:13 -0800151wl-dmabuf = ["devices/minigbm"]
Zach Reiznerf5285c62019-04-16 15:09:20 -0700152x = ["devices/x"]
Zach Reiznere0983c72018-01-16 17:35:27 -0800153
Zach Reizner639d9672017-05-01 17:57:18 -0700154[dependencies]
Daniel Verkamp6b298582021-08-16 15:37:11 -0700155anyhow = "1.0.32"
Sonny Raoed517d12018-02-13 22:09:43 -0800156arch = { path = "arch" }
Dennis Kempin8a1c50d2021-10-27 11:04:03 -0700157assertions = { path = "common/assertions" }
Dylan Reid3082e8e2019-01-07 10:33:48 -0800158audio_streams = "*"
Steven Morelandbc538b32022-04-01 15:11:59 +0000159base = { path = "base" }
Jingkui Wang8cad7512018-05-22 11:22:13 -0700160bit_field = { path = "bit_field" }
Daniel Almeida37f02e92021-12-20 12:49:10 -0300161cfg-if = "1.0.0"
David Tolnay48ff4162019-04-06 14:30:04 -0700162crosvm_plugin = { path = "crosvm_plugin", optional = true }
163data_model = "*"
Dylan Reidd169a8d2017-10-06 15:26:46 -0700164devices = { path = "devices" }
Cody Schuffelen7d533e52019-07-02 16:54:05 -0700165disk = { path = "disk" }
Daniel Verkampc13c0c22021-11-05 16:07:59 -0700166enumn = "0.1.0"
Joel Galenson06392aa2021-08-04 11:44:49 -0700167gdbstub = { version = "0.5.0", optional = true }
168gdbstub_arch = { version = "0.1.0", optional = true }
Gurchetan Singh293913c2020-12-09 10:44:13 -0800169rutabaga_gfx = { path = "rutabaga_gfx"}
Steven Richmanf32d0b42020-06-20 21:45:32 -0700170hypervisor = { path = "hypervisor" }
Sonny Rao6cc352f2018-02-01 17:49:01 -0800171kernel_cmdline = { path = "kernel_cmdline" }
Zach Reizner639d9672017-05-01 17:57:18 -0700172kernel_loader = { path = "kernel_loader" }
Steven Richmanf32d0b42020-06-20 21:45:32 -0700173kvm = { path = "kvm", optional = true }
174kvm_sys = { path = "kvm_sys", optional = true }
Zach Reizner6d6efb22021-04-16 18:12:24 -0700175libc = "0.2.93"
paulhsiaf052cfe2019-01-22 15:22:25 +0800176libcras = "*"
Allen Webbf3024c82020-06-19 07:19:48 -0700177minijail = "*" # provided by ebuild
Jason D. Clinton865323d2017-09-27 22:04:03 -0600178net_util = { path = "net_util" }
Chirantan Ekbote75ba8752020-10-27 18:33:02 +0900179p9 = "*"
David Tolnayfd67ec52019-04-10 17:59:15 -0700180protobuf = { version = "2.3", optional = true }
David Tolnay65928af2019-04-05 20:34:50 -0700181protos = { path = "protos", optional = true }
David Tolnay3df35522019-03-11 12:36:30 -0700182remain = "*"
David Tolnay48ff4162019-04-06 14:30:04 -0700183resources = { path = "resources" }
Chirantan Ekbote520ad432021-12-03 17:43:37 +0900184scudo = { version = "0.1", optional = true }
Hikaru Nishidaa0e381b2021-05-24 17:13:45 +0900185serde_json = "*"
Alexandre Courbotaa043e82022-02-03 19:39:10 +0900186serde_keyvalue = { path = "serde_keyvalue" }
Dennis Kempin8a1c50d2021-10-27 11:04:03 -0700187sync = { path = "common/sync" }
Daniel Verkamp7fd815e2021-09-22 13:10:11 -0700188tempfile = "3"
Daniel Verkamp1349c132021-08-18 14:16:16 -0700189thiserror = { version = "1.0.20" }
Keiichi Watanabe15b47692022-03-10 21:28:44 +0900190uuid = { version = "0.8.2" }
David Tolnay48ff4162019-04-06 14:30:04 -0700191vhost = { path = "vhost" }
192vm_control = { path = "vm_control" }
Chuanxiao Dong91e84032019-11-01 15:18:13 +0800193acpi_tables = { path = "acpi_tables" }
Dylan Reidec058d62020-07-20 20:21:11 -0700194vm_memory = { path = "vm_memory" }
Zach Reizner639d9672017-05-01 17:57:18 -0700195
Zach Reizner3cbded22017-08-30 17:07:01 -0700196[target.'cfg(target_arch = "x86_64")'.dependencies]
197x86_64 = { path = "x86_64" }
Zach Reizner8864cb02018-01-16 17:59:03 -0800198
Sonny Rao2ffa0cb2018-02-26 17:27:40 -0800199[target.'cfg(any(target_arch = "aarch64", target_arch = "arm"))'.dependencies]
200aarch64 = { path = "aarch64" }
201
Zach Reizner8864cb02018-01-16 17:59:03 -0800202[dev-dependencies]
Steven Morelandbc538b32022-04-01 15:11:59 +0000203base = { path = "base" }
Anton Romanovf87295a2022-04-06 21:19:03 +0000204lazy_static = "*"
paulhsiad1eceec2018-12-20 15:44:11 +0800205
206[patch.crates-io]
Dennis Kempin8a1c50d2021-10-27 11:04:03 -0700207assertions = { path = "common/assertions" }
208audio_streams = { path = "common/audio_streams" }
Dennis Kempinef516182022-03-16 12:16:04 -0700209base = { path = "base" }
Vikram Auradkar323006c2022-01-31 15:18:10 -0800210sys_util_core = { path = "common/sys_util_core" }
Dennis Kempin55c6a3b2022-03-17 11:26:01 -0700211cros_async = { path = "cros_async" }
Dennis Kempin6a584d62021-07-23 10:06:40 -0700212cros_fuzz = { path = "common/cros-fuzz" } # ignored by ebuild
Dennis Kempin8a1c50d2021-10-27 11:04:03 -0700213data_model = { path = "common/data_model" }
Dennis Kempin50a58f92021-06-23 11:34:31 -0700214libcras = { path = "libcras_stub" } # ignored by ebuild
Dennis Kempin6a584d62021-07-23 10:06:40 -0700215p9 = { path = "common/p9" } # ignored by ebuild
Dennis Kempin8a1c50d2021-10-27 11:04:03 -0700216sync = { path = "common/sync" }
217sys_util = { path = "common/sys_util" }
Ryo Hashimoto6d924382021-06-21 20:59:04 +0900218system_api = { path = "system_api_stub" } # ignored by ebuild
Dennis Kempin6a584d62021-07-23 10:06:40 -0700219wire_format_derive = { path = "common/p9/wire_format_derive" } # ignored by ebuild
Andrew Walbranbba25442021-08-16 12:36:46 +0000220minijail = { path = "../minijail/rust/minijail" } # ignored by ebuild