Skip to content

Commit 0ba247e

Browse files
committed
chore: move rust-vmm deps to workspace dependencies
Move rust-vmm deps to workspace level for unified management - Migrate rust-vmm related dependencies (e.g. vhost, vm-memory) to workspace-level Cargo.toml for centralized version control - Sub-crates under the staging/ are still managed by the Cargo.toml within staging/, while also declaring the dependencies at the workspace level Signed-off-by: hanbings <hanbings@hanbings.io>
1 parent cde9d12 commit 0ba247e

16 files changed

Lines changed: 129 additions & 111 deletions

File tree

Cargo.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ members = [
1818
"xtask",
1919
]
2020

21+
[workspace.dependencies]
22+
vhost = { version = "0.15", features = ["vhost-user-backend"] }
23+
vhost-user-backend = "0.21"
24+
virtio-bindings = "0.2.5"
25+
virtio-queue = "0.17"
26+
virtio-vsock = "0.11"
27+
vm-memory = "0.17.1"
28+
vmm-sys-util = "0.15"
29+
2130
[workspace.lints.rust]
2231
unsafe_op_in_unsafe_fn = "deny"
2332

staging/Cargo.toml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
[workspace]
22
resolver = "2"
3+
34
members = [
4-
"vhost-device-video",
5+
"vhost-device-video",
56
]
7+
8+
[workspace.dependencies]
9+
vhost = { version = "0.15", features = ["vhost-user-backend"] }
10+
vhost-user-backend = "0.21"
11+
virtio-bindings = "0.2.5"
12+
virtio-queue = "0.17"
13+
vm-memory = "0.17.1"
14+
vmm-sys-util = "0.15"

staging/vhost-device-video/Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ log = "0.4"
2626
libc = "0.2.182"
2727
thiserror = "2.0"
2828
futures-executor = { version = "0.3", features = ["thread-pool"] }
29-
vhost = { version = "0.15", features = ["vhost-user-backend"] }
30-
vhost-user-backend = "0.21"
31-
virtio-bindings = "0.2.5"
32-
virtio-queue = "0.17"
33-
vm-memory = "0.17.1"
34-
vmm-sys-util = "0.15"
29+
vhost = { workspace = true, features = ["vhost-user-backend"] }
30+
vhost-user-backend = { workspace = true }
31+
virtio-bindings = { workspace = true }
32+
virtio-queue = { workspace = true }
33+
vm-memory = { workspace = true }
34+
vmm-sys-util = { workspace = true }
3535
v4l2r = { git = "https://github.com/Gnurou/v4l2r", rev = "110fd77", optional = true }
3636

3737
[dev-dependencies]
3838
assert_matches = "1.5"
3939
rstest = "0.26.1"
4040
tempfile = "3.26.0"
41-
virtio-queue = { version = "0.17", features = ["test-utils"] }
42-
vm-memory = { version = "0.17.1", features = ["backend-mmap", "backend-atomic"] }
41+
virtio-queue = { workspace = true, features = ["test-utils"] }
42+
vm-memory = { workspace = true, features = ["backend-mmap", "backend-atomic"] }

vhost-device-can/Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ log = "0.4"
2121
thiserror = "2.0"
2222
queues = "1.0.2"
2323
socketcan = "3.5.0"
24-
vhost = { version = "0.15", features = ["vhost-user-backend"] }
25-
vhost-user-backend = "0.21"
26-
virtio-bindings = "0.2.5"
27-
virtio-queue = "0.17"
28-
vm-memory = "0.17.1"
29-
vmm-sys-util = "0.15"
24+
vhost = { workspace = true }
25+
vhost-user-backend = { workspace = true }
26+
virtio-bindings = { workspace = true }
27+
virtio-queue = { workspace = true }
28+
vm-memory = { workspace = true }
29+
vmm-sys-util = { workspace = true }
3030

3131
[dev-dependencies]
3232
assert_matches = "1.5"
33-
virtio-queue = { version = "0.17", features = ["test-utils"] }
34-
vm-memory = { version = "0.17.1", features = ["backend-mmap", "backend-atomic"] }
33+
virtio-queue = { workspace = true, features = ["test-utils"] }
34+
vm-memory = { workspace = true, features = ["backend-mmap", "backend-atomic"] }

vhost-device-console/Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ env_logger = "0.11"
2323
epoll = "4.4"
2424
log = "0.4"
2525
thiserror = "2.0"
26-
vhost = { version = "0.15", features = ["vhost-user-backend"] }
27-
vhost-user-backend = "0.21"
28-
virtio-bindings = "0.2.5"
29-
virtio-queue = "0.17"
30-
vm-memory = "0.17.1"
31-
vmm-sys-util = "0.15"
26+
vhost = { workspace = true }
27+
vhost-user-backend = { workspace = true }
28+
virtio-bindings = { workspace = true }
29+
virtio-queue = { workspace = true }
30+
vm-memory = { workspace = true }
31+
vmm-sys-util = { workspace = true }
3232

3333
[dev-dependencies]
3434
assert_matches = "1.5"
35-
virtio-queue = { version = "0.17", features = ["test-utils"] }
36-
vm-memory = { version = "0.17.1", features = ["backend-mmap", "backend-atomic"] }
35+
virtio-queue = { workspace = true, features = ["test-utils"] }
36+
vm-memory = { workspace = true, features = ["backend-mmap", "backend-atomic"] }
3737

3838
[lints]
3939
workspace = true

vhost-device-gpio/Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ env_logger = "0.11"
2121
libc = "0.2"
2222
log = "0.4"
2323
thiserror = "2.0"
24-
vhost = { version = "0.15", features = ["vhost-user-backend"] }
25-
vhost-user-backend = "0.21"
26-
virtio-bindings = "0.2.5"
27-
virtio-queue = "0.17"
28-
vm-memory = "0.17.1"
29-
vmm-sys-util = "0.15"
24+
vhost = { workspace = true }
25+
vhost-user-backend = { workspace = true }
26+
virtio-bindings = { workspace = true }
27+
virtio-queue = { workspace = true }
28+
vm-memory = { workspace = true }
29+
vmm-sys-util = { workspace = true }
3030

3131
[target.'cfg(target_env = "gnu")'.dependencies]
3232
libgpiod = "1.0"
3333

3434
[dev-dependencies]
3535
assert_matches = "1.5"
36-
virtio-queue = { version = "0.17", features = ["test-utils"] }
37-
vm-memory = { version = "0.17.1", features = ["backend-mmap", "backend-atomic"] }
36+
virtio-queue = { workspace = true, features = ["test-utils"] }
37+
vm-memory = { workspace = true, features = ["backend-mmap", "backend-atomic"] }

vhost-device-gpu/Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@ log = "0.4"
2929
rutabaga_gfx = "0.1.75"
3030
thiserror = "2.0.18"
3131
virglrenderer = {version = "0.1.3", optional = true }
32-
vhost = { version = "0.15.0", features = ["vhost-user-backend"] }
33-
vhost-user-backend = "0.21"
34-
virtio-bindings = "0.2.5"
35-
virtio-queue = "0.17.0"
36-
vm-memory = "0.17.1"
37-
vmm-sys-util = "0.15.0"
32+
vhost = { workspace = true }
33+
vhost-user-backend = { workspace = true }
34+
virtio-bindings = { workspace = true }
35+
virtio-queue = { workspace = true }
36+
vm-memory = { workspace = true }
37+
vmm-sys-util = { workspace = true }
3838
bitflags = "2.11.0"
3939

4040
[dev-dependencies]
4141
assert_matches = "1.5"
4242
mockall = "0.14.0"
4343
rusty-fork = "0.3.1"
4444
tempfile = "3.26"
45-
virtio-queue = { version = "0.17", features = ["test-utils"] }
46-
vm-memory = { version = "0.17.1", features = ["backend-mmap", "backend-atomic"] }
45+
virtio-queue = { workspace = true, features = ["test-utils"] }
46+
vm-memory = { workspace = true, features = ["backend-mmap", "backend-atomic"] }

vhost-device-i2c/Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ env_logger = "0.11"
2020
libc = "0.2"
2121
log = "0.4"
2222
thiserror = "2.0"
23-
vhost = { version = "0.15", features = ["vhost-user-backend"] }
24-
vhost-user-backend = "0.21"
25-
virtio-bindings = "0.2.5"
26-
virtio-queue = "0.17"
27-
vm-memory = "0.17.1"
28-
vmm-sys-util = "0.15"
23+
vhost = { workspace = true }
24+
vhost-user-backend = { workspace = true }
25+
virtio-bindings = { workspace = true }
26+
virtio-queue = { workspace = true }
27+
vm-memory = { workspace = true }
28+
vmm-sys-util = { workspace = true }
2929

3030
[dev-dependencies]
3131
assert_matches = "1.5"
32-
virtio-queue = { version = "0.17", features = ["test-utils"] }
33-
vm-memory = { version = "0.17.1", features = ["backend-mmap", "backend-atomic"] }
32+
virtio-queue = { workspace = true, features = ["test-utils"] }
33+
vm-memory = { workspace = true, features = ["backend-mmap", "backend-atomic"] }
3434

3535
[lints]
3636
workspace = true

vhost-device-input/Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@ log = "0.4"
2222
rand = "0.10.0"
2323
tempfile = "3.26"
2424
thiserror = "2.0"
25-
vhost = { version = "0.15", features = ["vhost-user-backend"] }
26-
vhost-user-backend = "0.21"
27-
virtio-bindings = "0.2.5"
28-
virtio-queue = "0.17"
29-
vm-memory = "0.17.1"
30-
vmm-sys-util = "0.15"
25+
vhost = { workspace = true }
26+
vhost-user-backend = { workspace = true }
27+
virtio-bindings = { workspace = true }
28+
virtio-queue = { workspace = true }
29+
vm-memory = { workspace = true }
30+
vmm-sys-util = { workspace = true }
3131
evdev = "0.13"
3232
nix = { version = "0.31", features = ["ioctl"] }
3333

3434
[dev-dependencies]
3535
assert_matches = "1.5"
36-
virtio-queue = { version = "0.17", features = ["test-utils"] }
37-
vm-memory = { version = "0.17", features = ["backend-mmap", "backend-atomic"] }
36+
virtio-queue = { workspace = true, features = ["test-utils"] }
37+
vm-memory = { workspace = true, features = ["backend-mmap", "backend-atomic"] }
3838

3939
[lints]
4040
workspace = true

vhost-device-rng/Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ log = "0.4"
2121
rand = "0.10.0"
2222
tempfile = "3.26"
2323
thiserror = "2.0"
24-
vhost = { version = "0.15", features = ["vhost-user-backend"] }
25-
vhost-user-backend = "0.21"
26-
virtio-bindings = "0.2.5"
27-
virtio-queue = "0.17"
28-
vm-memory = "0.17.1"
29-
vmm-sys-util = "0.15"
24+
vhost = { workspace = true }
25+
vhost-user-backend = { workspace = true }
26+
virtio-bindings = { workspace = true }
27+
virtio-queue = { workspace = true }
28+
vm-memory = { workspace = true }
29+
vmm-sys-util = { workspace = true }
3030

3131
[dev-dependencies]
3232
assert_matches = "1.5"
33-
virtio-queue = { version = "0.17", features = ["test-utils"] }
34-
vm-memory = { version = "0.17", features = ["backend-mmap", "backend-atomic"] }
33+
virtio-queue = { workspace = true, features = ["test-utils"] }
34+
vm-memory = { workspace = true, features = ["backend-mmap", "backend-atomic"] }
3535

3636
[lints]
3737
workspace = true

0 commit comments

Comments
 (0)