Skip to content

Commit d504926

Browse files
committed
Move all crates to workspace root
Having all the workspace crates under the crates/ directory is unnecessary. Rust documentation itself recommends all crates to be in the root directory: https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html#creating-the-second-package-in-the-workspace I paste the text content here, in case the online page ever changes or becomes unavailable: ## Creating the Second Package in the Workspace Next, let’s create another member package in the workspace and call it add_one. Change the top-level Cargo.toml to specify the add_one path in the members list: Filename: Cargo.toml [workspace] members = [ "adder", "add_one", ] Then generate a new library crate named add_one: $ cargo new add_one --lib Created library `add_one` package Your add directory should now have these directories and files: ├── Cargo.lock ├── Cargo.toml ├── add_one │ ├── Cargo.toml │ └── src │ └── lib.rs ├── adder │ ├── Cargo.toml │ └── src │ └── main.rs └── target Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
1 parent 096786f commit d504926

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+35
-33
lines changed

Cargo.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
[workspace]
22
members = [
3-
"crates/devices/*",
4-
"crates/virtio-bindings",
5-
"crates/virtio-device",
6-
"crates/virtio-queue",
7-
"crates/virtio-queue-ser",
3+
"virtio-bindings",
4+
"virtio-blk",
5+
"virtio-console",
6+
"virtio-device",
7+
"virtio-queue",
8+
"virtio-queue-ser",
9+
"virtio-vsock",
810
]
911

1012
[profile.bench]

README.md

Lines changed: 2 additions & 2 deletions

coverage_config_x86_64.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"coverage_score": 86.98,
3-
"exclude_path": "crates/virtio-bindings|crates/virtio-queue/src/mock\\.rs",
3+
"exclude_path": "virtio-bindings|virtio-queue/src/mock\\.rs",
44
"crate_features": "virtio-blk/backend-stdio"
55
}

fuzz/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ bincode = "1.3.3"
1717
libfuzzer-sys = "0.4"
1818
serde = "1.0.63"
1919
memfd = "0.6.3"
20-
virtio-queue = { path = "../crates/virtio-queue", features = ["test-utils"] }
21-
virtio-vsock = { path = "../crates/devices/virtio-vsock" }
22-
virtio-queue-ser = { path = "../crates/virtio-queue-ser" }
20+
virtio-queue = { path = "../virtio-queue", features = ["test-utils"] }
21+
virtio-vsock = { path = "../virtio-vsock" }
22+
virtio-queue-ser = { path = "../virtio-queue-ser" }
2323
vm-memory = { version = "0.13.1", features = ["backend-mmap", "backend-atomic"] }
2424
common = { path = "common" }
25-
virtio-blk = { path = "../crates/devices/virtio-blk", features = ["backend-stdio"] }
25+
virtio-blk = { path = "../virtio-blk", features = ["backend-stdio"] }
2626

2727
[[bin]]
2828
name = "virtio_queue"

fuzz/common/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ edition = "2021"
88
[dependencies]
99
bincode = "1.3.3"
1010
serde = "1.0.63"
11-
virtio-bindings = { path = "../../crates/virtio-bindings" }
12-
virtio-queue = { path = "../../crates/virtio-queue", features = ["test-utils"] }
13-
virtio-vsock = { path = "../../crates/devices/virtio-vsock" }
14-
virtio-queue-ser = { path = "../../crates/virtio-queue-ser" }
15-
virtio-blk = { path = "../../crates/devices/virtio-blk" }
11+
virtio-bindings = { path = "../../virtio-bindings" }
12+
virtio-queue = { path = "../../virtio-queue", features = ["test-utils"] }
13+
virtio-vsock = { path = "../../virtio-vsock" }
14+
virtio-queue-ser = { path = "../../virtio-queue-ser" }
15+
virtio-blk = { path = "../../virtio-blk" }
1616
vm-memory = { version = "0.13.1", features = ["backend-mmap", "backend-atomic"] }

crates/virtio-bindings/CONTRIBUTING.md renamed to virtio-bindings/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)