[package]
name = "hypervisor"
version = "0.1.0"
authors = ["The ChromiumOS Authors"]
edition = "2021"

[features]
enable_haxm_tests = []
haxm = []
whpx = []
geniezone = []
gvm = []
gunyah = []
noncoherent-dma = []

[dependencies]
anyhow = { workspace = true }
bit_field = { workspace = true }
bitflags = "2.2.1"
cros_fdt = { workspace = true }
data_model = { workspace = true }
downcast-rs = "1.2.0"
enumn = { workspace = true }
fnv = "1"
libc = { workspace = true }
serde = { workspace = true, features = [ "derive" ] }
serde_json = { workspace = true }
snapshot = { workspace = true }
sync = { workspace = true }
base = { workspace = true }
vm_memory = { workspace = true }

[target.'cfg(any(target_os = "android", target_os = "linux"))'.dependencies]
kvm_sys = { workspace = true }

[target.'cfg(any(target_arch = "arm", target_arch = "aarch64"))'.dependencies]
aarch64_sys_reg = { workspace = true }

[target.'cfg(target_arch = "x86_64")'.dev-dependencies]
hypervisor_test_macro = { workspace = true }
zerocopy = { version = "0.8.13", features = ["derive"] }

[target.'cfg(windows)'.dependencies]
thiserror = { workspace = true }
winapi = "0.3"
win_util = { path = "../win_util" }

[target.'cfg(windows)'.dependencies.windows]
workspace = true
features = [
    "Win32_Foundation",
    "Win32_System_Memory",
]

[target.'cfg(windows)'.dev-dependencies]
tempfile = "3"
