Skip to content

Commit

Permalink
build: Centralize rust-vmm crates to workspace
Browse files Browse the repository at this point in the history
By centralizing rust-vmm crates to workspace root, effectively reduce
places to look around when updating dependencies manually.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
  • Loading branch information
RuoqingHe authored and epilys committed Oct 15, 2024
1 parent a2a5cd2 commit 4f15927
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 13 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ members = [
[profile.bench]
lto = true
codegen-units = 1

[workspace.dependencies]
vm-memory = "0.15.0"
vmm-sys-util = "0.12.1"
6 changes: 3 additions & 3 deletions virtio-blk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ edition = "2021"
backend-stdio = []

[dependencies]
vm-memory = "0.15.0"
vmm-sys-util = "0.12.1"
vm-memory = { workspace = true }
vmm-sys-util = { workspace = true }
log = "0.4.17"
virtio-queue = { path = "../virtio-queue" }
virtio-device = { path = "../virtio-device" }
virtio-bindings = { path = "../virtio-bindings", version = "0.2.3" }

[dev-dependencies]
vm-memory = { version = "0.15.0", features = ["backend-mmap", "backend-atomic"] }
vm-memory = { workspace = true, features = ["backend-mmap", "backend-atomic"] }
virtio-queue = { path = "../virtio-queue", features = ["test-utils"] }
4 changes: 2 additions & 2 deletions virtio-console/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ edition = "2021"
[dependencies]
virtio-bindings = { path = "../virtio-bindings", version = "0.2.3" }
virtio-queue = { path = "../virtio-queue", version = "0.13.0" }
vm-memory = "0.15.0"
vm-memory = { workspace = true }

[dev-dependencies]
virtio-queue = { path = "../virtio-queue", version = "0.13.0", features = ["test-utils"] }
vm-memory = { version = "0.15.0", features = ["backend-mmap"] }
vm-memory = { workspace = true, features = ["backend-mmap"] }
4 changes: 2 additions & 2 deletions virtio-device/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ license = "Apache-2.0 OR MIT"
edition = "2021"

[dependencies]
vm-memory = "0.15.0"
vm-memory = { workspace = true }
log = "0.4.17"
virtio-bindings = { path = "../virtio-bindings" }
virtio-queue = { path = "../virtio-queue", version = "0.13.0"}

[dev-dependencies]
vm-memory = { version = "0.15.0", features = ["backend-mmap", "backend-atomic"] }
vm-memory = { workspace = true, features = ["backend-mmap", "backend-atomic"] }
2 changes: 1 addition & 1 deletion virtio-queue-ser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ versionize_derive = "0.1.3"
# to prevent accidental changes to the serializer output in a patch release of
# virtio-queue.
virtio-queue = { path = "../virtio-queue", version = "=0.13.0" }
vm-memory = "0.15.0"
vm-memory = { workspace = true }

[dev-dependencies]
virtio-queue = { path = "../virtio-queue", version = "=0.13.0", features = ["test-utils"] }
6 changes: 3 additions & 3 deletions virtio-queue/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ edition = "2021"
test-utils = []

[dependencies]
vm-memory = "0.15.0"
vmm-sys-util = "0.12.1"
vm-memory = { workspace = true }
vmm-sys-util = { workspace = true }
log = "0.4.17"
virtio-bindings = { path="../virtio-bindings", version = "0.2.3" }

[dev-dependencies]
criterion = "0.5.1"
vm-memory = { version = "0.15.0", features = ["backend-mmap", "backend-atomic"] }
vm-memory = { workspace = true, features = ["backend-mmap", "backend-atomic"] }
memoffset = "0.9.0"

[[bench]]
Expand Down
4 changes: 2 additions & 2 deletions virtio-vsock/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ edition = "2021"
# The `path` part gets stripped when publishing the crate.
virtio-queue = { path = "../virtio-queue", version = "0.13.0" }
virtio-bindings = { path = "../virtio-bindings", version = "0.2.3" }
vm-memory = "0.15.0"
vm-memory = { workspace = true }

[dev-dependencies]
virtio-queue = { path = "../virtio-queue", version = "0.13.0", features = ["test-utils"] }
vm-memory = { version = "0.15.0", features = ["backend-mmap", "backend-atomic"] }
vm-memory = { workspace = true, features = ["backend-mmap", "backend-atomic"] }

0 comments on commit 4f15927

Please sign in to comment.