mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
VmConfig and its nested configuration structs, the VmInfoResponse wrapper and DeviceNode serialize their Option<T> fields as JSON null when unset. The OpenAPI specification types these fields as non-nullable, so strict client generators (for example ogen for Go) reject /vm.info responses and cannot generate a working API client. Apply serde_with's skip_serializing_none to the affected structs so that unset optional fields are omitted from the serialized JSON instead of being emitted as null. API responses now validate against the existing specification unchanged; no nullable annotations are required. Fixes: #7775 Signed-off-by: Max Makarov <maxpain@linux.com> Assisted-by: Claude:claude-opus-4-8 [Claude Code]
113 lines
3.4 KiB
TOML
113 lines
3.4 KiB
TOML
[package]
|
|
authors = ["The Cloud Hypervisor Authors"]
|
|
edition.workspace = true
|
|
name = "vmm"
|
|
rust-version.workspace = true
|
|
version = "0.1.0"
|
|
|
|
[features]
|
|
dbus_api = ["blocking", "futures", "zbus"]
|
|
default = []
|
|
dhat-heap = ["dhat"] # For heap profiling
|
|
fw_cfg = ["devices/fw_cfg"]
|
|
guest_debug = ["gdbstub", "gdbstub_arch", "kvm"]
|
|
igvm = ["dep:igvm", "hex", "igvm_defs", "mshv-bindings", "range_map_vec"]
|
|
io_uring = ["block/io_uring"]
|
|
ivshmem = ["devices/ivshmem"]
|
|
kvm = [
|
|
"arch/kvm",
|
|
"hypervisor/kvm",
|
|
"iommufd-ioctls",
|
|
"pci/kvm",
|
|
"vfio-ioctls/kvm",
|
|
"vfio-ioctls/vfio_cdev",
|
|
"virtio-devices/kvm",
|
|
"vm-device/kvm",
|
|
]
|
|
mshv = [
|
|
"hypervisor/mshv",
|
|
"pci/mshv",
|
|
"vfio-ioctls/mshv",
|
|
"virtio-devices/mshv",
|
|
"vm-device/mshv",
|
|
]
|
|
pvmemcontrol = ["devices/pvmemcontrol"]
|
|
sev_snp = [
|
|
"arch/sev_snp",
|
|
"hypervisor/sev_snp",
|
|
"igvm_defs",
|
|
"virtio-devices/sev_snp",
|
|
]
|
|
tdx = ["arch/tdx", "hypervisor/tdx"]
|
|
tracing = ["tracer/tracing"]
|
|
|
|
[dependencies]
|
|
acpi_tables = { workspace = true }
|
|
anyhow = { workspace = true }
|
|
arch = { path = "../arch" }
|
|
bitflags = { workspace = true }
|
|
block = { path = "../block" }
|
|
blocking = { version = "1.6.2", optional = true }
|
|
cfg-if = { workspace = true }
|
|
clap = { workspace = true }
|
|
devices = { path = "../devices" }
|
|
dhat = { workspace = true, optional = true }
|
|
epoll = { workspace = true }
|
|
event_monitor = { path = "../event_monitor" }
|
|
flume = { workspace = true }
|
|
futures = { version = "0.3.32", optional = true }
|
|
gdbstub = { version = "0.7.10", optional = true }
|
|
gdbstub_arch = { version = "0.3.3", optional = true }
|
|
hex = { version = "0.4.3", optional = true }
|
|
hypervisor = { path = "../hypervisor" }
|
|
igvm = { workspace = true, optional = true }
|
|
igvm_defs = { workspace = true, optional = true }
|
|
iommufd-ioctls = { workspace = true, optional = true }
|
|
landlock = "0.4.5"
|
|
libc = { workspace = true }
|
|
linux-loader = { workspace = true, features = ["bzimage", "elf", "pe"] }
|
|
log = { workspace = true }
|
|
micro_http = { git = "https://github.com/firecracker-microvm/micro-http", branch = "main" }
|
|
mshv-bindings = { workspace = true, features = [
|
|
"fam-wrappers",
|
|
"with-serde",
|
|
], optional = true }
|
|
net_util = { path = "../net_util" }
|
|
option_parser = { path = "../option_parser" }
|
|
pci = { path = "../pci" }
|
|
range_map_vec = { version = "0.2.0", optional = true }
|
|
rate_limiter = { path = "../rate_limiter" }
|
|
seccompiler = { workspace = true }
|
|
serde = { workspace = true, features = ["derive", "rc"] }
|
|
serde_json = { workspace = true }
|
|
serde_with = { workspace = true, features = ["macros"] }
|
|
serial_buffer = { path = "../serial_buffer" }
|
|
sha2 = { workspace = true }
|
|
signal-hook = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
tracer = { path = "../tracer" }
|
|
uuid = { workspace = true }
|
|
vfio-ioctls = { workspace = true, default-features = false }
|
|
vfio_user = { workspace = true }
|
|
vhost = { workspace = true }
|
|
virtio-bindings = { workspace = true }
|
|
virtio-devices = { path = "../virtio-devices" }
|
|
vm-allocator = { path = "../vm-allocator" }
|
|
vm-device = { path = "../vm-device" }
|
|
vm-memory = { workspace = true, features = [
|
|
"backend-atomic",
|
|
"backend-bitmap",
|
|
"backend-mmap",
|
|
] }
|
|
vm-migration = { path = "../vm-migration" }
|
|
vm-virtio = { path = "../vm-virtio" }
|
|
vmm-sys-util = { workspace = true, features = ["with-serde"] }
|
|
zbus = { version = "5.15.0", optional = true }
|
|
zerocopy = { workspace = true, features = ["alloc", "derive"] }
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3"
|
|
|
|
[lints]
|
|
workspace = true
|