# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

[package]
name = "user_driver"
edition.workspace = true
rust-version.workspace = true

[features]
default = ["vfio"]
vfio = [
    "dep:vfio_sys",
    "dep:trycopy",
    "dep:inspect_counters",
    "dep:mesh",
    "dep:nix",
    "dep:pci_core",
    "dep:tracing",
    "dep:uevent",
    "dep:vfio-bindings",
    "dep:vmcore",
]
mmio_simulate_fallback = []

[dependencies]
inspect.workspace = true
pal_async.workspace = true
safeatomic.workspace = true
event-listener.workspace = true
guestmem.workspace = true

anyhow.workspace = true
parking_lot.workspace = true
zerocopy.workspace = true

[target.'cfg(target_os = "linux")'.dependencies]
fs-err.workspace = true
futures.workspace = true
futures-concurrency.workspace = true
inspect_counters = { workspace = true, optional = true }
libc.workspace = true
mesh = { workspace = true, optional = true }
nix = { workspace = true, optional = true }
pal_event.workspace = true
pci_core = { workspace = true, optional = true }
tracing = { workspace = true, optional = true }
trycopy = { workspace = true, optional = true }
uevent = { workspace = true, optional = true }
vfio-bindings = { workspace = true, optional = true }
vfio_sys = { workspace = true, optional = true }
vmcore = { workspace = true, optional = true }

[lints]
workspace = true
