From abb5fb127b16ee618300f06cf4f12ac8c4dfd9d8 Mon Sep 17 00:00:00 2001 From: Ruoqing He Date: Wed, 9 Apr 2025 01:29:46 +0000 Subject: [PATCH 1/3] runtime-rs: Extend workspace to cover all crates Only `shim` and `shim-ctl` are incorporated in `runtime-rs`'s workspace, let's extend it to cover all crates in `runtime-rs/crates`. Signed-off-by: Ruoqing He --- src/runtime-rs/Cargo.toml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/runtime-rs/Cargo.toml b/src/runtime-rs/Cargo.toml index bbc401f645..b5df0d4e8f 100644 --- a/src/runtime-rs/Cargo.toml +++ b/src/runtime-rs/Cargo.toml @@ -1,6 +1,13 @@ [workspace] members = [ + "crates/agent", + "crates/hypervisor", + "crates/persist", + "crates/resource", + "crates/runtimes", + "crates/service", "crates/shim", "crates/shim-ctl", -] + "tests/utils", +] From 3769ad9c0dcb7cd06b92ac3d997ca9862ad5169b Mon Sep 17 00:00:00 2001 From: Ruoqing He Date: Wed, 9 Apr 2025 03:50:30 +0000 Subject: [PATCH 2/3] runtime-rs: Group local dependencies Judging by the layout of the `Cargo.toml` files, local dependencies are intentionally separated from other dependencies, let's enforce it workspace-wise. Signed-off-by: Ruoqing He --- src/runtime-rs/crates/agent/Cargo.toml | 3 +- src/runtime-rs/crates/hypervisor/Cargo.toml | 34 +++++++++---------- .../crates/hypervisor/ch-config/Cargo.toml | 5 +-- src/runtime-rs/crates/persist/Cargo.toml | 8 +++-- src/runtime-rs/crates/resource/Cargo.toml | 7 ++-- src/runtime-rs/crates/runtimes/Cargo.toml | 5 +-- .../crates/runtimes/common/Cargo.toml | 4 ++- .../runtimes/linux_container/Cargo.toml | 1 + .../crates/runtimes/virt_container/Cargo.toml | 5 +-- .../crates/runtimes/wasm_container/Cargo.toml | 1 + src/runtime-rs/crates/service/Cargo.toml | 5 +-- src/runtime-rs/crates/shim-ctl/Cargo.toml | 5 +-- src/runtime-rs/crates/shim/Cargo.toml | 5 ++- src/runtime-rs/tests/utils/Cargo.toml | 2 ++ 14 files changed, 54 insertions(+), 36 deletions(-) diff --git a/src/runtime-rs/crates/agent/Cargo.toml b/src/runtime-rs/crates/agent/Cargo.toml index 0213a65a26..8d92a5db0a 100644 --- a/src/runtime-rs/crates/agent/Cargo.toml +++ b/src/runtime-rs/crates/agent/Cargo.toml @@ -22,10 +22,11 @@ tokio = { version = "1.38.0", features = ["fs", "rt"] } tracing = "0.1.36" url = "2.2.2" nix = "0.24.2" +oci-spec = { version = "0.6.8", features = ["runtime"] } +# Local dependencies kata-types = { path = "../../../libs/kata-types"} logging = { path = "../../../libs/logging"} -oci-spec = { version = "0.6.8", features = ["runtime"] } protocols = { path = "../../../libs/protocols", features=["async"] } [features] diff --git a/src/runtime-rs/crates/hypervisor/Cargo.toml b/src/runtime-rs/crates/hypervisor/Cargo.toml index d655d01629..84a14adde0 100644 --- a/src/runtime-rs/crates/hypervisor/Cargo.toml +++ b/src/runtime-rs/crates/hypervisor/Cargo.toml @@ -14,7 +14,6 @@ async-trait = "0.1.48" go-flag = "0.1.0" libc = ">=0.2.39" nix = "0.24.2" -persist = { path = "../persist" } rust-ini = "0.18.0" seccompiler = "0.2.0" serde = { version = "1.0.138", features = ["derive"] } @@ -30,26 +29,28 @@ lazy_static = "1.4" tracing = "0.1.36" ttrpc = { version = "0.8.4", features = ["async"] } protobuf = "=3.7.1" +oci-spec = { version = "0.6.8", features = ["runtime"] } +futures = "0.3.25" +safe-path = "0.1.0" +crossbeam-channel = "0.5.6" +tempdir = "0.3.7" +qapi = { version = "0.14", features = ["qmp", "async-tokio-all"] } +qapi-spec = "0.3.1" +qapi-qmp = "0.14.0" +hyperlocal = "0.8.0" +hyper = { version = "0.14.18", features = ["client"] } +# Local dependencies kata-sys-util = { path = "../../../libs/kata-sys-util" } kata-types = { path = "../../../libs/kata-types" } logging = { path = "../../../libs/logging" } protocols = { path = "../../../libs/protocols", features = ["async"] } shim-interface = { path = "../../../libs/shim-interface" } -oci-spec = { version = "0.6.8", features = ["runtime"] } - +persist = { path = "../persist" } ch-config = { path = "ch-config", optional = true } tests_utils = { path = "../../tests/utils" } -futures = "0.3.25" -safe-path = "0.1.0" -crossbeam-channel = "0.5.6" -tempdir = "0.3.7" - -qapi = { version = "0.14", features = ["qmp", "async-tokio-all"] } -qapi-spec = "0.3.1" -qapi-qmp = "0.14.0" - +# Local dependencies: Dragonball dragonball = { path = "../../../dragonball", features = [ "atomic-guest-memory", "virtio-vsock", @@ -65,8 +66,6 @@ dragonball = { path = "../../../dragonball", features = [ "host-device", ], optional = true } dbs-utils = { path = "../../../dragonball/dbs_utils" } -hyperlocal = "0.8.0" -hyper = { version = "0.14.18", features = ["client"] } [features] default = [] @@ -77,15 +76,14 @@ dragonball = ["dep:dragonball"] cloud-hypervisor = ["ch-config"] [dev-dependencies] +serial_test = "2.0.0" + +# Local dev-dependencies # Force the CH tests to run, even when the feature is not enabled for # a normal build. hypervisor = { path = ".", features = ["cloud-hypervisor"] } - test-utils = { path = "../../../libs/test-utils" } -serial_test = "2.0.0" - - [build-dependencies] ttrpc-codegen = "0.4.2" diff --git a/src/runtime-rs/crates/hypervisor/ch-config/Cargo.toml b/src/runtime-rs/crates/hypervisor/ch-config/Cargo.toml index 7761faadff..0ec956ab65 100644 --- a/src/runtime-rs/crates/hypervisor/ch-config/Cargo.toml +++ b/src/runtime-rs/crates/hypervisor/ch-config/Cargo.toml @@ -14,6 +14,8 @@ anyhow = "1.0.68" serde = { version = "1.0.145", features = ["rc", "derive"] } serde_json = "1.0.91" tokio = { version = "1.38.0", features = ["sync", "rt"] } +nix = "0.26.2" +thiserror = "1.0.38" # Cloud Hypervisor public HTTP API functions # Note that the version specified is not necessarily the version of CH @@ -21,7 +23,6 @@ tokio = { version = "1.38.0", features = ["sync", "rt"] } # which is relatively static. api_client = { git = "https://github.com/cloud-hypervisor/cloud-hypervisor", crate = "api_client", tag = "v27.0" } +# Local dependencies kata-types = { path = "../../../../libs/kata-types"} kata-sys-util = { path = "../../../../libs/kata-sys-util"} -nix = "0.26.2" -thiserror = "1.0.38" diff --git a/src/runtime-rs/crates/persist/Cargo.toml b/src/runtime-rs/crates/persist/Cargo.toml index 2454802473..e59ac05f11 100644 --- a/src/runtime-rs/crates/persist/Cargo.toml +++ b/src/runtime-rs/crates/persist/Cargo.toml @@ -8,10 +8,12 @@ license = "Apache-2.0" [dependencies] async-trait = "0.1.48" anyhow = "^1.0" -kata-sys-util = { path = "../../../libs/kata-sys-util"} -kata-types = { path = "../../../libs/kata-types" } -shim-interface = { path = "../../../libs/shim-interface" } libc = "0.2" serde = { version = "1.0.138", features = ["derive"] } serde_json = "1.0.82" + +# Local dependencies +kata-sys-util = { path = "../../../libs/kata-sys-util"} +kata-types = { path = "../../../libs/kata-types" } +shim-interface = { path = "../../../libs/shim-interface" } safe-path = { path = "../../../libs/safe-path"} diff --git a/src/runtime-rs/crates/resource/Cargo.toml b/src/runtime-rs/crates/resource/Cargo.toml index a8d750dcf1..cbbc6cba9f 100644 --- a/src/runtime-rs/crates/resource/Cargo.toml +++ b/src/runtime-rs/crates/resource/Cargo.toml @@ -6,9 +6,11 @@ edition = "2018" license = "Apache-2.0" [dev-dependencies] -test-utils = { path = "../../../libs/test-utils" } tempfile = "3.2.0" +# Local dev-dependencies +test-utils = { path = "../../../libs/test-utils" } + [dependencies] anyhow = "^1.0" actix-rt = "2.7.0" @@ -33,13 +35,14 @@ slog-scope = "4.4.0" tokio = { version = "1.38.0", features = ["process"] } tracing = "0.1.36" uuid = { version = "0.4", features = ["v4"] } +oci-spec = { version = "0.6.8", features = ["runtime"] } +# Local dependencies agent = { path = "../agent" } hypervisor = { path = "../hypervisor" } kata-types = { path = "../../../libs/kata-types" } kata-sys-util = { path = "../../../libs/kata-sys-util" } logging = { path = "../../../libs/logging" } -oci-spec = { version = "0.6.8", features = ["runtime"] } persist = { path = "../persist"} tests_utils = { path = "../../tests/utils" } diff --git a/src/runtime-rs/crates/runtimes/Cargo.toml b/src/runtime-rs/crates/runtimes/Cargo.toml index 1f1bd04176..21e807cff7 100644 --- a/src/runtime-rs/crates/runtimes/Cargo.toml +++ b/src/runtime-rs/crates/runtimes/Cargo.toml @@ -24,20 +24,21 @@ nix = "0.25.0" url = "2.3.1" procfs = "0.12.0" prometheus = { version = "0.13.0", features = ["process"] } +oci-spec = { version = "0.6.8", features = ["runtime"] } +# Local dependencies agent = { path = "../agent" } common = { path = "./common" } kata-types = { path = "../../../libs/kata-types" } kata-sys-util = { path = "../../../libs/kata-sys-util" } logging = { path = "../../../libs/logging"} runtime-spec = { path = "../../../libs/runtime-spec" } -oci-spec = { version = "0.6.8", features = ["runtime"] } shim-interface = { path = "../../../libs/shim-interface" } persist = { path = "../persist" } hypervisor = { path = "../hypervisor" } resource = { path = "../resource" } -# runtime handler +# Local dependencies: runtime handler linux_container = { path = "./linux_container", optional = true } virt_container = { path = "./virt_container", optional = true } wasm_container = { path = "./wasm_container", optional = true } diff --git a/src/runtime-rs/crates/runtimes/common/Cargo.toml b/src/runtime-rs/crates/runtimes/common/Cargo.toml index 55414c9950..ed3c6fc2c2 100644 --- a/src/runtime-rs/crates/runtimes/common/Cargo.toml +++ b/src/runtime-rs/crates/runtimes/common/Cargo.toml @@ -21,11 +21,13 @@ strum = { version = "0.24.0", features = ["derive"] } thiserror = "^1.0" tokio = { version = "1.38.0", features = ["rt-multi-thread", "process", "fs"] } ttrpc = "0.8.4" +oci-spec = { version = "0.6.8", features = ["runtime"] } + +# Local dependencies persist = { path = "../../persist" } agent = { path = "../../agent" } kata-sys-util = { path = "../../../../libs/kata-sys-util" } kata-types = { path = "../../../../libs/kata-types" } runtime-spec = { path = "../../../../libs/runtime-spec" } -oci-spec = { version = "0.6.8", features = ["runtime"] } resource = { path = "../../resource" } protocols = { path = "../../../../libs/protocols"} diff --git a/src/runtime-rs/crates/runtimes/linux_container/Cargo.toml b/src/runtime-rs/crates/runtimes/linux_container/Cargo.toml index 235087a712..80499f7514 100644 --- a/src/runtime-rs/crates/runtimes/linux_container/Cargo.toml +++ b/src/runtime-rs/crates/runtimes/linux_container/Cargo.toml @@ -9,6 +9,7 @@ anyhow = "^1.0" async-trait = "0.1.48" tokio = { version = "1.38.0" } +# Local dependencies common = { path = "../common" } kata-types = { path = "../../../../libs/kata-types" } resource = { path = "../../resource" } diff --git a/src/runtime-rs/crates/runtimes/virt_container/Cargo.toml b/src/runtime-rs/crates/runtimes/virt_container/Cargo.toml index a2e47e16f7..c1080f6247 100644 --- a/src/runtime-rs/crates/runtimes/virt_container/Cargo.toml +++ b/src/runtime-rs/crates/runtimes/virt_container/Cargo.toml @@ -26,7 +26,10 @@ toml = "0.4.2" url = "2.1.1" async-std = "1.12.0" tracing = "0.1.36" +oci-spec = { version = "0.6.8", features = ["runtime"] } +strum = { version = "0.24.0", features = ["derive"] } +# Local dependencies agent = { path = "../../agent" } common = { path = "../common" } hypervisor = { path = "../../hypervisor", features = ["cloud-hypervisor"] } @@ -34,10 +37,8 @@ kata-sys-util = { path = "../../../../libs/kata-sys-util" } kata-types = { path = "../../../../libs/kata-types" } logging = { path = "../../../../libs/logging"} runtime-spec = { path = "../../../../libs/runtime-spec" } -oci-spec = { version = "0.6.8", features = ["runtime"] } persist = { path = "../../persist"} resource = { path = "../../resource" } -strum = { version = "0.24.0", features = ["derive"] } [features] default = ["cloud-hypervisor"] diff --git a/src/runtime-rs/crates/runtimes/wasm_container/Cargo.toml b/src/runtime-rs/crates/runtimes/wasm_container/Cargo.toml index 4775b5a727..e40fa311ad 100644 --- a/src/runtime-rs/crates/runtimes/wasm_container/Cargo.toml +++ b/src/runtime-rs/crates/runtimes/wasm_container/Cargo.toml @@ -9,6 +9,7 @@ anyhow = "^1.0" async-trait = "0.1.48" tokio = { version = "1.38.0" } +# Local dependencies common = { path = "../common" } kata-types = { path = "../../../../libs/kata-types" } resource = { path = "../../resource" } diff --git a/src/runtime-rs/crates/service/Cargo.toml b/src/runtime-rs/crates/service/Cargo.toml index 03caee1740..780e9911b9 100644 --- a/src/runtime-rs/crates/service/Cargo.toml +++ b/src/runtime-rs/crates/service/Cargo.toml @@ -13,10 +13,11 @@ slog-scope = "4.4.0" tokio = { version = "1.38.0", features = ["rt-multi-thread"] } tracing = "0.1.36" ttrpc = "0.8.4" - -common = { path = "../runtimes/common" } containerd-shim-protos = { version = "0.6.0", features = ["async", "sandbox"] } containerd-shim = { version = "0.6.0", features = ["async"] } + +# Local dependencies +common = { path = "../runtimes/common" } logging = { path = "../../../libs/logging" } kata-types = { path = "../../../libs/kata-types" } runtimes = { path = "../runtimes" } diff --git a/src/runtime-rs/crates/shim-ctl/Cargo.toml b/src/runtime-rs/crates/shim-ctl/Cargo.toml index c1d05f4dc9..52ace58ed0 100644 --- a/src/runtime-rs/crates/shim-ctl/Cargo.toml +++ b/src/runtime-rs/crates/shim-ctl/Cargo.toml @@ -7,8 +7,9 @@ edition = "2021" [dependencies] anyhow = "^1.0" +tokio = { version = "1.38.0", features = [ "rt", "rt-multi-thread" ] } + +# Local dependencies common = { path = "../runtimes/common" } logging = { path = "../../../libs/logging"} runtimes = { path = "../runtimes" } -tokio = { version = "1.38.0", features = [ "rt", "rt-multi-thread" ] } - diff --git a/src/runtime-rs/crates/shim/Cargo.toml b/src/runtime-rs/crates/shim/Cargo.toml index e5adf3f151..4657e712ec 100644 --- a/src/runtime-rs/crates/shim/Cargo.toml +++ b/src/runtime-rs/crates/shim/Cargo.toml @@ -31,12 +31,13 @@ tokio = { version = "1.38.0", features = [ "rt", "rt-multi-thread" ] } unix_socket2 = "0.5.4" tracing = "0.1.36" tracing-opentelemetry = "0.18.0" +oci-spec = { version = "0.6.8", features = ["runtime"] } +# Local dependencies kata-types = { path = "../../../libs/kata-types"} kata-sys-util = { path = "../../../libs/kata-sys-util"} logging = { path = "../../../libs/logging"} runtime-spec = { path = "../../../libs/runtime-spec" } -oci-spec = { version = "0.6.8", features = ["runtime"] } service = { path = "../service" } runtimes = { path = "../runtimes" } @@ -44,4 +45,6 @@ runtimes = { path = "../runtimes" } tempfile = "3.2.0" rand = "0.8.4" serial_test = "0.5.1" + +# Local dev-dependencies tests_utils = { path = "../../tests/utils"} diff --git a/src/runtime-rs/tests/utils/Cargo.toml b/src/runtime-rs/tests/utils/Cargo.toml index d35892da5d..24f934bd89 100644 --- a/src/runtime-rs/tests/utils/Cargo.toml +++ b/src/runtime-rs/tests/utils/Cargo.toml @@ -10,4 +10,6 @@ license = "Apache-2.0" [dependencies] anyhow = "^1.0" rand = "0.8.4" + +# Local dependencies kata-types = { path = "../../../libs/kata-types" } From 28c09ae645e826e585e72d41cb33244be1776021 Mon Sep 17 00:00:00 2001 From: Ruoqing He Date: Wed, 9 Apr 2025 07:30:29 +0000 Subject: [PATCH 3/3] runtime-rs: Put local dependencies into workspace Put local dependencies into workspace to avoid complex path dependencies all over the workspace. This gives an overview of local dependencies this workspace uses, where those crates are located, and simplifies the local dependencies referencing process. Signed-off-by: Ruoqing He --- src/runtime-rs/Cargo.toml | 29 +++++++++++++++++++ src/runtime-rs/crates/agent/Cargo.toml | 6 ++-- src/runtime-rs/crates/hypervisor/Cargo.toml | 24 +++++++-------- .../crates/hypervisor/ch-config/Cargo.toml | 4 +-- src/runtime-rs/crates/persist/Cargo.toml | 8 ++--- src/runtime-rs/crates/resource/Cargo.toml | 16 +++++----- src/runtime-rs/crates/runtimes/Cargo.toml | 26 ++++++++--------- .../crates/runtimes/common/Cargo.toml | 14 ++++----- .../runtimes/linux_container/Cargo.toml | 6 ++-- .../crates/runtimes/virt_container/Cargo.toml | 18 ++++++------ .../crates/runtimes/wasm_container/Cargo.toml | 6 ++-- src/runtime-rs/crates/service/Cargo.toml | 10 +++---- src/runtime-rs/crates/shim-ctl/Cargo.toml | 6 ++-- src/runtime-rs/crates/shim/Cargo.toml | 14 ++++----- src/runtime-rs/tests/utils/Cargo.toml | 2 +- 15 files changed, 109 insertions(+), 80 deletions(-) diff --git a/src/runtime-rs/Cargo.toml b/src/runtime-rs/Cargo.toml index b5df0d4e8f..396abb45f0 100644 --- a/src/runtime-rs/Cargo.toml +++ b/src/runtime-rs/Cargo.toml @@ -11,3 +11,32 @@ members = [ "tests/utils", ] + +[workspace.dependencies] +agent = { path = "crates/agent" } +hypervisor = { path = "crates/hypervisor" } +persist = { path = "crates/persist"} +resource = { path = "crates/resource" } +runtimes = { path = "crates/runtimes" } +service = { path = "crates/service" } +tests_utils = { path = "tests/utils" } + +ch-config = { path = "crates/hypervisor/ch-config" } +common = { path = "crates/runtimes/common" } +linux_container = { path = "crates/runtimes/linux_container" } +virt_container = { path = "crates/runtimes/virt_container" } +wasm_container = { path = "crates/runtimes/wasm_container" } + +# Local dependencies from `src/libs` +kata-sys-util = { path = "../libs/kata-sys-util"} +kata-types = { path = "../libs/kata-types"} +logging = { path = "../libs/logging"} +protocols = { path = "../libs/protocols", features=["async"] } +runtime-spec = { path = "../libs/runtime-spec" } +safe-path = { path = "../libs/safe-path"} +shim-interface = { path = "../libs/shim-interface" } +test-utils = { path = "../libs/test-utils" } + +# Local dependencies from `src/dragonball` +dragonball = { path = "../dragonball" } +dbs-utils = { path = "../dragonball/dbs_utils" } diff --git a/src/runtime-rs/crates/agent/Cargo.toml b/src/runtime-rs/crates/agent/Cargo.toml index 8d92a5db0a..8076358d00 100644 --- a/src/runtime-rs/crates/agent/Cargo.toml +++ b/src/runtime-rs/crates/agent/Cargo.toml @@ -25,9 +25,9 @@ nix = "0.24.2" oci-spec = { version = "0.6.8", features = ["runtime"] } # Local dependencies -kata-types = { path = "../../../libs/kata-types"} -logging = { path = "../../../libs/logging"} -protocols = { path = "../../../libs/protocols", features=["async"] } +kata-types = { workspace = true } +logging = { workspace = true } +protocols = { workspace = true, features=["async"] } [features] default = [] diff --git a/src/runtime-rs/crates/hypervisor/Cargo.toml b/src/runtime-rs/crates/hypervisor/Cargo.toml index 84a14adde0..6310beab7c 100644 --- a/src/runtime-rs/crates/hypervisor/Cargo.toml +++ b/src/runtime-rs/crates/hypervisor/Cargo.toml @@ -41,17 +41,17 @@ hyperlocal = "0.8.0" hyper = { version = "0.14.18", features = ["client"] } # Local dependencies -kata-sys-util = { path = "../../../libs/kata-sys-util" } -kata-types = { path = "../../../libs/kata-types" } -logging = { path = "../../../libs/logging" } -protocols = { path = "../../../libs/protocols", features = ["async"] } -shim-interface = { path = "../../../libs/shim-interface" } -persist = { path = "../persist" } -ch-config = { path = "ch-config", optional = true } -tests_utils = { path = "../../tests/utils" } +kata-sys-util = { workspace = true } +kata-types = { workspace = true } +logging = { workspace = true } +protocols = { workspace = true, features = ["async"] } +shim-interface = { workspace = true } +persist = { workspace = true } +ch-config = { workspace = true, optional = true } +tests_utils = { workspace = true } # Local dependencies: Dragonball -dragonball = { path = "../../../dragonball", features = [ +dragonball = { workspace = true, features = [ "atomic-guest-memory", "virtio-vsock", "hotplug", @@ -65,7 +65,7 @@ dragonball = { path = "../../../dragonball", features = [ "vhost-user-net", "host-device", ], optional = true } -dbs-utils = { path = "../../../dragonball/dbs_utils" } +dbs-utils = { workspace = true } [features] default = [] @@ -81,8 +81,8 @@ serial_test = "2.0.0" # Local dev-dependencies # Force the CH tests to run, even when the feature is not enabled for # a normal build. -hypervisor = { path = ".", features = ["cloud-hypervisor"] } -test-utils = { path = "../../../libs/test-utils" } +hypervisor = { workspace = true, features = ["cloud-hypervisor"] } +test-utils = { workspace = true } [build-dependencies] ttrpc-codegen = "0.4.2" diff --git a/src/runtime-rs/crates/hypervisor/ch-config/Cargo.toml b/src/runtime-rs/crates/hypervisor/ch-config/Cargo.toml index 0ec956ab65..78bd0c3fc7 100644 --- a/src/runtime-rs/crates/hypervisor/ch-config/Cargo.toml +++ b/src/runtime-rs/crates/hypervisor/ch-config/Cargo.toml @@ -24,5 +24,5 @@ thiserror = "1.0.38" api_client = { git = "https://github.com/cloud-hypervisor/cloud-hypervisor", crate = "api_client", tag = "v27.0" } # Local dependencies -kata-types = { path = "../../../../libs/kata-types"} -kata-sys-util = { path = "../../../../libs/kata-sys-util"} +kata-types = { workspace = true } +kata-sys-util = { workspace = true } diff --git a/src/runtime-rs/crates/persist/Cargo.toml b/src/runtime-rs/crates/persist/Cargo.toml index e59ac05f11..896bbac9a3 100644 --- a/src/runtime-rs/crates/persist/Cargo.toml +++ b/src/runtime-rs/crates/persist/Cargo.toml @@ -13,7 +13,7 @@ serde = { version = "1.0.138", features = ["derive"] } serde_json = "1.0.82" # Local dependencies -kata-sys-util = { path = "../../../libs/kata-sys-util"} -kata-types = { path = "../../../libs/kata-types" } -shim-interface = { path = "../../../libs/shim-interface" } -safe-path = { path = "../../../libs/safe-path"} +kata-sys-util = { workspace = true } +kata-types = { workspace = true } +shim-interface = { workspace = true } +safe-path = { workspace = true } diff --git a/src/runtime-rs/crates/resource/Cargo.toml b/src/runtime-rs/crates/resource/Cargo.toml index cbbc6cba9f..3af45f9f38 100644 --- a/src/runtime-rs/crates/resource/Cargo.toml +++ b/src/runtime-rs/crates/resource/Cargo.toml @@ -9,7 +9,7 @@ license = "Apache-2.0" tempfile = "3.2.0" # Local dev-dependencies -test-utils = { path = "../../../libs/test-utils" } +test-utils = { workspace = true } [dependencies] anyhow = "^1.0" @@ -38,12 +38,12 @@ uuid = { version = "0.4", features = ["v4"] } oci-spec = { version = "0.6.8", features = ["runtime"] } # Local dependencies -agent = { path = "../agent" } -hypervisor = { path = "../hypervisor" } -kata-types = { path = "../../../libs/kata-types" } -kata-sys-util = { path = "../../../libs/kata-sys-util" } -logging = { path = "../../../libs/logging" } -persist = { path = "../persist"} -tests_utils = { path = "../../tests/utils" } +agent = { workspace = true } +hypervisor = { workspace = true } +kata-types = { workspace = true } +kata-sys-util = { workspace = true } +logging = { workspace = true } +persist = { workspace = true } +tests_utils = { workspace = true } [features] diff --git a/src/runtime-rs/crates/runtimes/Cargo.toml b/src/runtime-rs/crates/runtimes/Cargo.toml index 21e807cff7..689a431b30 100644 --- a/src/runtime-rs/crates/runtimes/Cargo.toml +++ b/src/runtime-rs/crates/runtimes/Cargo.toml @@ -27,21 +27,21 @@ prometheus = { version = "0.13.0", features = ["process"] } oci-spec = { version = "0.6.8", features = ["runtime"] } # Local dependencies -agent = { path = "../agent" } -common = { path = "./common" } -kata-types = { path = "../../../libs/kata-types" } -kata-sys-util = { path = "../../../libs/kata-sys-util" } -logging = { path = "../../../libs/logging"} -runtime-spec = { path = "../../../libs/runtime-spec" } -shim-interface = { path = "../../../libs/shim-interface" } -persist = { path = "../persist" } -hypervisor = { path = "../hypervisor" } -resource = { path = "../resource" } +agent = { workspace = true } +common = { workspace = true } +kata-types = { workspace = true } +kata-sys-util = { workspace = true } +logging = { workspace = true } +runtime-spec = { workspace = true } +shim-interface = { workspace = true } +persist = { workspace = true } +hypervisor = { workspace = true } +resource = { workspace = true } # Local dependencies: runtime handler -linux_container = { path = "./linux_container", optional = true } -virt_container = { path = "./virt_container", optional = true } -wasm_container = { path = "./wasm_container", optional = true } +linux_container = { workspace = true, optional = true } +virt_container = { workspace = true, optional = true } +wasm_container = { workspace = true, optional = true } [features] default = ["virt"] diff --git a/src/runtime-rs/crates/runtimes/common/Cargo.toml b/src/runtime-rs/crates/runtimes/common/Cargo.toml index ed3c6fc2c2..5ca6117694 100644 --- a/src/runtime-rs/crates/runtimes/common/Cargo.toml +++ b/src/runtime-rs/crates/runtimes/common/Cargo.toml @@ -24,10 +24,10 @@ ttrpc = "0.8.4" oci-spec = { version = "0.6.8", features = ["runtime"] } # Local dependencies -persist = { path = "../../persist" } -agent = { path = "../../agent" } -kata-sys-util = { path = "../../../../libs/kata-sys-util" } -kata-types = { path = "../../../../libs/kata-types" } -runtime-spec = { path = "../../../../libs/runtime-spec" } -resource = { path = "../../resource" } -protocols = { path = "../../../../libs/protocols"} +persist = { workspace = true } +agent = { workspace = true } +kata-sys-util = { workspace = true } +kata-types = { workspace = true } +runtime-spec = { workspace = true } +resource = { workspace = true } +protocols = { workspace = true } diff --git a/src/runtime-rs/crates/runtimes/linux_container/Cargo.toml b/src/runtime-rs/crates/runtimes/linux_container/Cargo.toml index 80499f7514..24464f5299 100644 --- a/src/runtime-rs/crates/runtimes/linux_container/Cargo.toml +++ b/src/runtime-rs/crates/runtimes/linux_container/Cargo.toml @@ -10,6 +10,6 @@ async-trait = "0.1.48" tokio = { version = "1.38.0" } # Local dependencies -common = { path = "../common" } -kata-types = { path = "../../../../libs/kata-types" } -resource = { path = "../../resource" } +common = { workspace = true } +kata-types = { workspace = true } +resource = { workspace = true } diff --git a/src/runtime-rs/crates/runtimes/virt_container/Cargo.toml b/src/runtime-rs/crates/runtimes/virt_container/Cargo.toml index c1080f6247..53bc70c5e6 100644 --- a/src/runtime-rs/crates/runtimes/virt_container/Cargo.toml +++ b/src/runtime-rs/crates/runtimes/virt_container/Cargo.toml @@ -30,15 +30,15 @@ oci-spec = { version = "0.6.8", features = ["runtime"] } strum = { version = "0.24.0", features = ["derive"] } # Local dependencies -agent = { path = "../../agent" } -common = { path = "../common" } -hypervisor = { path = "../../hypervisor", features = ["cloud-hypervisor"] } -kata-sys-util = { path = "../../../../libs/kata-sys-util" } -kata-types = { path = "../../../../libs/kata-types" } -logging = { path = "../../../../libs/logging"} -runtime-spec = { path = "../../../../libs/runtime-spec" } -persist = { path = "../../persist"} -resource = { path = "../../resource" } +agent = { workspace = true } +common = { workspace = true } +hypervisor = { workspace = true, features = ["cloud-hypervisor"] } +kata-sys-util = { workspace = true } +kata-types = { workspace = true } +logging = { workspace = true } +runtime-spec = { workspace = true } +persist = { workspace = true } +resource = { workspace = true } [features] default = ["cloud-hypervisor"] diff --git a/src/runtime-rs/crates/runtimes/wasm_container/Cargo.toml b/src/runtime-rs/crates/runtimes/wasm_container/Cargo.toml index e40fa311ad..c221fa4044 100644 --- a/src/runtime-rs/crates/runtimes/wasm_container/Cargo.toml +++ b/src/runtime-rs/crates/runtimes/wasm_container/Cargo.toml @@ -10,6 +10,6 @@ async-trait = "0.1.48" tokio = { version = "1.38.0" } # Local dependencies -common = { path = "../common" } -kata-types = { path = "../../../../libs/kata-types" } -resource = { path = "../../resource" } +common = { workspace = true } +kata-types = { workspace = true } +resource = { workspace = true } diff --git a/src/runtime-rs/crates/service/Cargo.toml b/src/runtime-rs/crates/service/Cargo.toml index 780e9911b9..18ef74e4b5 100644 --- a/src/runtime-rs/crates/service/Cargo.toml +++ b/src/runtime-rs/crates/service/Cargo.toml @@ -17,8 +17,8 @@ containerd-shim-protos = { version = "0.6.0", features = ["async", "sandbox"] } containerd-shim = { version = "0.6.0", features = ["async"] } # Local dependencies -common = { path = "../runtimes/common" } -logging = { path = "../../../libs/logging" } -kata-types = { path = "../../../libs/kata-types" } -runtimes = { path = "../runtimes" } -persist = { path = "../persist" } +common = { workspace = true } +logging = { workspace = true } +kata-types = { workspace = true } +runtimes = { workspace = true } +persist = { workspace = true } diff --git a/src/runtime-rs/crates/shim-ctl/Cargo.toml b/src/runtime-rs/crates/shim-ctl/Cargo.toml index 52ace58ed0..3417ee7fe2 100644 --- a/src/runtime-rs/crates/shim-ctl/Cargo.toml +++ b/src/runtime-rs/crates/shim-ctl/Cargo.toml @@ -10,6 +10,6 @@ anyhow = "^1.0" tokio = { version = "1.38.0", features = [ "rt", "rt-multi-thread" ] } # Local dependencies -common = { path = "../runtimes/common" } -logging = { path = "../../../libs/logging"} -runtimes = { path = "../runtimes" } +common = { workspace = true } +logging = { workspace = true } +runtimes = { workspace = true } diff --git a/src/runtime-rs/crates/shim/Cargo.toml b/src/runtime-rs/crates/shim/Cargo.toml index 4657e712ec..7d444b3668 100644 --- a/src/runtime-rs/crates/shim/Cargo.toml +++ b/src/runtime-rs/crates/shim/Cargo.toml @@ -34,12 +34,12 @@ tracing-opentelemetry = "0.18.0" oci-spec = { version = "0.6.8", features = ["runtime"] } # Local dependencies -kata-types = { path = "../../../libs/kata-types"} -kata-sys-util = { path = "../../../libs/kata-sys-util"} -logging = { path = "../../../libs/logging"} -runtime-spec = { path = "../../../libs/runtime-spec" } -service = { path = "../service" } -runtimes = { path = "../runtimes" } +kata-types = { workspace = true } +kata-sys-util = { workspace = true } +logging = { workspace = true } +runtime-spec = { workspace = true } +service = { workspace = true } +runtimes = { workspace = true } [dev-dependencies] tempfile = "3.2.0" @@ -47,4 +47,4 @@ rand = "0.8.4" serial_test = "0.5.1" # Local dev-dependencies -tests_utils = { path = "../../tests/utils"} +tests_utils = { workspace = true } diff --git a/src/runtime-rs/tests/utils/Cargo.toml b/src/runtime-rs/tests/utils/Cargo.toml index 24f934bd89..6b11267102 100644 --- a/src/runtime-rs/tests/utils/Cargo.toml +++ b/src/runtime-rs/tests/utils/Cargo.toml @@ -12,4 +12,4 @@ anyhow = "^1.0" rand = "0.8.4" # Local dependencies -kata-types = { path = "../../../libs/kata-types" } +kata-types = { workspace = true }