[package]
name = "crosvm"
version = "0.1.0"
authors = ["The ChromiumOS Authors"]
edition = "2021"
default-run = "crosvm"
[[bin]]
name = "crosvm"
path = "src/main.rs"
[profile.release]
panic = 'abort'
opt-level = 3
overflow-checks = true
[profile.release-test]
inherits = 'release'
panic = 'unwind'
[profile.chromeos]
inherits = "release"
strip = "symbols"
[profile.lto]
inherits = "chromeos"
lto = true
[profile.largecodegen]
inherits = "lto"
codegen-units = 1
[workspace]
members = [
"aarch64",
"aarch64_sys_reg",
"acpi_tables",
"android_audio",
"arch",
"argh_helpers",
"audio_util",
"audio_streams_conformance_test",
"base",
"base_tokio",
"bit_field",
"proc_init",
"common/audio_streams",
"common/balloon_control",
"common/data_model",
"common/sync",
"cros_async",
"cros_fdt",
"cros_tracing",
"crosvm_cli",
"crosvm_control",
"devices",
"disk",
"e2e_tests",
"ext2",
"fuse",
"fuzz",
"gpu_display",
"hypervisor",
"hypervisor/hypervisor_test_macro",
"io_uring",
"jail",
"kernel_cmdline",
"kernel_loader",
"kvm_sys",
"libcras_stub",
"linux_input_sys",
"media/ffmpeg",
"metrics",
"metrics_events",
"net_sys",
"net_util",
"power_monitor",
"prebuilts",
"protos",
"proto_build_tools",
"resources",
"riscv64",
"serde_keyvalue",
"snapshot",
"swap",
"system_api",
"third_party/vmm_vhost",
"tools/impl/catapult_converter",
"tube_transporter",
"usb_sys",
"usb_util",
"vendor/generic/anti_tamper",
"vendor/generic/crash_report",
"vendor/generic/crypto",
"vfio_sys",
"vhost",
"virtio_sys",
"vm_control",
"vm_memory",
"win_audio",
"win_util",
"x86_64",
]
exclude = [
"sandbox",
"tools/audio_streams_conformance_test",
"tools/examples/baremetal",
"perfetto",
"media/libvda",
]
[workspace.dependencies]
aarch64 = { path = "aarch64" }
aarch64_sys_reg = { path = "aarch64_sys_reg" }
acpi_tables = { path = "acpi_tables" }
android_audio = { path = "android_audio" }
anti_tamper = { path = "vendor/generic/anti_tamper" }
arch = { path = "arch" }
argh_helpers = { path = "argh_helpers" }
audio_streams = { path = "common/audio_streams" }
audio_streams_conformance_test = { path = "audio_streams_conformance_test" }
audio_util = { path = "audio_util" }
balloon_control = { path = "common/balloon_control" }
base = { path = "base" }
base_tokio = { path = "base_tokio" }
bit_field = { path = "bit_field" }
proc_init = { path = "proc_init" }
catapult_converter = { path = "tools/impl/catapult_converter" }
crash_report = { path = "vendor/generic/crash_report" }
cros_async = { path = "cros_async" }
cros_fdt = { path = "cros_fdt" }
cros_tracing = { path = "cros_tracing" }
crosvm_cli = { path = "crosvm_cli" }
crosvm_control = { path = "crosvm_control" }
crypto = { path = "vendor/generic/crypto", package = "crypto_generic" }
data_model = { path = "common/data_model" }
devices = { path = "devices" }
disk = { path = "disk" }
e2e_tests = { path = "e2e_tests" }
ext2 = { path = "ext2" }
ffmpeg = { path = "media/ffmpeg" }
fuse = { path = "fuse" }
fuzz = { path = "fuzz" }
gpu_display = { path = "gpu_display" }
hypervisor = { path = "hypervisor" }
hypervisor_test_macro = { path = "hypervisor/hypervisor_test_macro" }
io_uring = { path = "io_uring" }
jail = { path = "jail" }
kernel_cmdline = { path = "kernel_cmdline" }
kernel_loader = { path = "kernel_loader" }
kvm_sys = { path = "kvm_sys" }
libcras_stub = { path = "libcras_stub" }
linux_input_sys = { path = "linux_input_sys" }
metrics = { path = "metrics" }
metrics_events = { path = "metrics_events" }
net_sys = { path = "net_sys" }
net_util = { path = "net_util" }
power_monitor = { path = "power_monitor" }
prebuilts = { path = "prebuilts" }
proto_build_tools = { path = "proto_build_tools" }
protos = { path = "protos" }
resources = { path = "resources" }
riscv64 = { path = "riscv64" }
sandbox = { path = "sandbox" }
serde_keyvalue = { path = "serde_keyvalue" }
snapshot = { path = "snapshot" }
swap = { path = "swap" }
sync = { path = "common/sync" }
system_api = { path = "system_api" }
tube_transporter = { path = "tube_transporter" }
usb_sys = { path = "usb_sys" }
usb_util = { path = "usb_util" }
vfio_sys = { path = "vfio_sys" }
vhost = { path = "vhost" }
virtio_sys = { path = "virtio_sys" }
vm_control = { path = "vm_control" }
vm_memory = { path = "vm_memory" }
vmm_vhost = { path = "third_party/vmm_vhost" }
win_audio = { path = "win_audio" }
win_util = { path = "win_util" }
x86_64 = { path = "x86_64" }
anyhow = "1"
argh = "0.1.10"
cfg-if = "1.0.0"
ciborium = "0.2.2"
enumn = "0.1.0"
gdbstub = "0.7.0"
gdbstub_arch = "0.3.0"
libc = "0.2.153"
rand = "0.9.2"
remain = "0.2"
rutabaga_gfx = "=0.1.76-alpha.0"
serde = "1.0"
serde_json = "1"
static_assertions = "1.1"
thiserror = "1.0.23"
tokio = { version = "1.29.1", features = ["net", "rt-multi-thread", "time", "sync", "macros"] }
windows = { version = "=0.61.1" }
[features]
default = ["audio", "balloon", "document-features", "gpu", "qcow", "usb", "libvda-stub", "net", "slirp"]
android-sparse = ["disk/android-sparse"]
audio = ["devices/audio", "vm_control/audio"]
balloon = ["devices/balloon", "vm_control/balloon"]
composite-disk = ["protos/composite-disk", "protobuf", "disk/composite-disk"]
zstd-disk = ["disk/zstd-disk"]
fs_runtime_ugid_map = ["devices/fs_runtime_ugid_map"]
gdb = [
"aarch64/gdb",
"arch/gdb",
"gdbstub",
"gdbstub_arch",
"riscv64/gdb",
"vm_control/gdb",
"x86_64/gdb",
]
net = ["devices/net"]
pci-hotplug = ["devices/pci-hotplug", "vm_control/pci-hotplug"]
pvclock = ["devices/pvclock"]
qcow = ["disk/qcow"]
registered_events = ["protos/registered_events", "protobuf", "base/proto_tube", "vm_control/registered_events", "devices/registered_events"]
swap = ["aarch64/swap", "arch/swap", "devices/swap", "vm_control/swap", "x86_64/swap", "swap/enable"]
stats = ["devices/stats"]
tokio = ["cros_async/tokio"]
usb = ["devices/usb"]
wl-dmabuf = ["devices/gbm"]
x = ["devices/x"]
gpu = ["devices/gpu", "gpu_display", "vm_control/gpu"]
gfxstream = ["rutabaga_gfx/gfxstream"]
gfxstream_display = ["gpu_display/gfxstream_display"]
virgl_renderer = ["devices/virgl_renderer"]
vulkan_display = ["gpu_display/vulkan_display"]
vulkano = ["rutabaga_gfx/vulkano"]
android_display = ["devices/android_display"]
android_display_stub = ["devices/android_display_stub"]
video-decoder = ["devices/video-decoder"]
video-encoder = ["devices/video-encoder"]
ffmpeg = ["devices/ffmpeg"]
vaapi = ["devices/vaapi"]
media = ["devices/media"]
geniezone = ["devices/geniezone", "hypervisor/geniezone"]
gunyah = ["devices/gunyah", "hypervisor/gunyah"]
halla = ["devices/halla", "hypervisor/halla"]
trace_marker = ["cros_tracing/trace_marker"]
seccomp_trace = ["jail/seccomp_trace","base/seccomp_trace","devices/seccomp_trace"]
noncoherent-dma = ["devices/noncoherent-dma", "hypervisor/noncoherent-dma"]
haxm = ["hypervisor/haxm"]
whpx = ["devices/whpx", "hypervisor/whpx"]
slirp = ["devices/slirp", "net_util/slirp"]
slirp-debug = ["net_util/slirp-debug"]
slirp-ring-capture = [
"net_util/slirp-ring-capture",
"devices/slirp-ring-capture",
]
default-no-sandbox = []
arc_quota = ["devices/arc_quota"]
audio_aaudio = ["devices/audio_aaudio"]
libaaudio_stub = ["android_audio/libaaudio_stub"]
audio_cras = ["devices/audio_cras"]
libvda = ["devices/libvda"]
libvda-stub = ["devices/libvda-stub"]
power-monitor-powerd = ["arch/power-monitor-powerd"]
vtpm = ["devices/vtpm"]
crash-report = ["proc_init/crash-report", "crash_report"]
gvm = []
perfetto = []
process-invariants = []
prod-build = []
sandbox = []
all-default = [
"android-sparse",
"arc_quota",
"audio_cras",
"composite-disk",
"crash-report",
"default",
"ffmpeg",
"fs_runtime_ugid_map",
"gdb",
"geniezone",
"gfxstream",
"gfxstream_display",
"libvda-stub",
"media",
"net",
"noncoherent-dma",
"pci-hotplug",
"power-monitor-powerd",
"pvclock",
"registered_events",
"slirp",
"swap",
"tokio",
"trace_marker",
"vaapi",
"video-decoder",
"video-encoder",
"virgl_renderer",
"vtpm",
"wl-dmabuf",
"x",
"zstd-disk"
]
all-aarch64 = [
"audio_aaudio",
"all-default",
"android_display",
"android_display_stub",
"gunyah",
"halla",
"libaaudio_stub",
]
all-riscv64 = [
"gdb",
"default",
]
all-x86_64 = [
"audio_aaudio",
"all-default",
"android_display",
"android_display_stub",
"kvm_sys",
"libaaudio_stub",
"scudo"
]
all-mingw64 = [
"android-sparse",
"audio",
"balloon",
"crash_report",
"gpu",
"haxm",
"net",
"slirp",
"slirp-debug",
"stats",
"vulkan_display",
"pvclock",
]
all-msvc64 = [ "all-mingw64" ]
all-android = [
"android-sparse",
"audio",
"audio_aaudio",
"balloon",
"composite-disk",
"fs_runtime_ugid_map",
"gdb",
"gdbstub",
"gdbstub_arch",
"geniezone",
"gunyah",
"halla",
"libaaudio_stub",
"net",
"qcow",
"usb",
]
[dependencies]
anyhow = { workspace = true }
arch = { workspace = true }
argh = { workspace = true }
argh_helpers = { workspace = true }
aarch64_sys_reg = { workspace = true }
base = { workspace = true }
bit_field = { workspace = true }
proc_init = { workspace = true }
cfg-if = { workspace = true }
crash_report = { workspace = true, optional = true }
cros_async = { workspace = true }
cros_tracing = { workspace = true }
crosvm_cli = { workspace = true }
devices = { workspace = true }
disk = { workspace = true }
document-features = { version = "0.2", optional = true }
enumn = { workspace = true }
ext2 = { workspace = true }
gdbstub = { workspace = true, optional = true }
gdbstub_arch = { workspace = true, optional = true }
rutabaga_gfx = { workspace = true }
hypervisor = { workspace = true }
jail = { workspace = true }
kernel_cmdline = { workspace = true }
kernel_loader = { workspace = true }
kvm_sys = { workspace = true, optional = true }
libc = { workspace = true }
libcras = "*"
log = { version = "0", features = ["release_max_level_debug"]}
metrics = { workspace = true }
metrics_events = { workspace = true }
net_util = { workspace = true }
protobuf = { version = "3.2", optional = true }
protos = { workspace = true, optional = true }
remain = { workspace = true }
resources = { workspace = true }
scudo = { version = "0.1", optional = true }
serde = { workspace = true, features = ["rc"] }
serde_json = { workspace = true }
serde_keyvalue = { workspace = true, features = ["argh_derive"] }
snapshot = { workspace = true }
smallvec = "1.6.1"
static_assertions = { workspace = true }
swap = { workspace = true }
sync = { workspace = true }
thiserror = { workspace = true }
vm_control = { workspace = true }
acpi_tables = { workspace = true }
vm_memory = { workspace = true }
vmm_vhost = { workspace = true }
uuid = { version = "1", features = ["v4"] }
zerocopy = { version = "0.8.13", features = ["derive"] }
[target.'cfg(target_arch = "riscv64")'.dependencies]
riscv64 = { workspace = true }
[target.'cfg(target_arch = "x86_64")'.dependencies]
x86_64 = { workspace = true }
[target.'cfg(target_arch = "aarch64")'.dependencies]
aarch64 = { workspace = true }
[target.'cfg(any(target_os = "android", target_os = "linux"))'.dependencies]
minijail = "*"
p9 = "0.3.1"
vhost = { workspace = true }
android_audio = { workspace = true }
[target.'cfg(windows)'.dependencies]
anti_tamper = { workspace = true }
ctrlc = "3"
futures = "0.3"
gpu_display = { workspace = true, optional = true }
rand = { workspace = true }
sandbox = { workspace = true }
cros_tracing = { workspace = true }
tube_transporter = { workspace = true }
winapi = "0.3"
win_audio = { workspace = true }
win_util = { workspace = true }
[dev-dependencies]
rand = { workspace = true }
tempfile = "3"
[patch.crates-io]
audio_streams = { path = "common/audio_streams" }
libcras = { path = "libcras_stub" }
minijail = { path = "third_party/minijail/rust/minijail" }