mirror of
https://github.com/rust-vmm/vhost-device.git
synced 2026-02-01 09:29:14 +00:00
I plan to add some wrapper errors around vhost errors. These end up nesting other errors all the way to std::error::Error, which has no Eq trait. The implementations were only used for comparisions in tests. While there is a assert_matches!() in nightly [1] it seems unlikely that further testing lib additions are getting standarized soon (or ever). One could use assert!(matches!()), but that would worsen the error messages for test failures. Hence, during review [2] we agreed on introducing the assert_matches crate. It got no dependencies and allows us to keep the good error messages while not needing to depend on nightly. Signed-off-by: Erik Schilling <erik.schilling@linaro.org> [1] https://doc.rust-lang.org/std/assert_matches/macro.assert_matches.html [2] https://github.com/rust-vmm/vhost-device/pull/388#discussion_r1257831748
37 lines
1.1 KiB
TOML
37 lines
1.1 KiB
TOML
[package]
|
|
name = "vhost-device-gpio"
|
|
version = "0.1.0"
|
|
authors = ["Viresh Kumar <viresh.kumar@linaro.org>"]
|
|
description = "vhost gpio backend device"
|
|
repository = "https://github.com/rust-vmm/vhost-device"
|
|
readme = "README.md"
|
|
keywords = ["gpio", "vhost", "virt", "backend"]
|
|
license = "Apache-2.0 OR BSD-3-Clause"
|
|
edition = "2021"
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
[features]
|
|
xen = ["vm-memory/xen", "vhost/xen", "vhost-user-backend/xen"]
|
|
|
|
[dependencies]
|
|
clap = { version = "4.3", features = ["derive"] }
|
|
env_logger = "0.10"
|
|
libc = "0.2"
|
|
log = "0.4"
|
|
thiserror = "1.0"
|
|
vhost = { version = "0.8", features = ["vhost-user-slave"] }
|
|
vhost-user-backend = "0.10"
|
|
virtio-bindings = "0.2.1"
|
|
virtio-queue = "0.9"
|
|
vm-memory = "0.12"
|
|
vmm-sys-util = "0.11"
|
|
|
|
[target.'cfg(target_env = "gnu")'.dependencies]
|
|
libgpiod = { version = "0.1" }
|
|
|
|
[dev-dependencies]
|
|
assert_matches = "1.5"
|
|
virtio-queue = { version = "0.9", features = ["test-utils"] }
|
|
vm-memory = { version = "0.12", features = ["backend-mmap", "backend-atomic"] }
|