From a7800cec75073661d1f6f25b1597a268544a4352 Mon Sep 17 00:00:00 2001 From: Jiaxiao Zhou Date: Sat, 2 Sep 2023 02:16:00 -0700 Subject: [PATCH] chore: update to the main tip of runwasi and libcontainer (#138) * chore: update to the main tip of runwasi and libcontainer Signed-off-by: jiaxiao zhou --- Cargo.lock | 300 +++- Cargo.toml | 28 +- Makefile | 4 +- containerd-shim-lunatic-v1/Cargo.lock | 404 +++-- containerd-shim-lunatic-v1/Cargo.toml | 11 +- containerd-shim-lunatic-v1/src/common.rs | 6 +- containerd-shim-lunatic-v1/src/executor.rs | 92 +- containerd-shim-lunatic-v1/src/main.rs | 46 +- containerd-shim-slight-v1/Cargo.lock | 1847 ++++++++++---------- containerd-shim-slight-v1/Cargo.toml | 9 +- containerd-shim-slight-v1/src/executor.rs | 94 +- containerd-shim-slight-v1/src/main.rs | 39 +- containerd-shim-spin-v1/Cargo.lock | 594 ++++--- containerd-shim-spin-v1/Cargo.toml | 5 +- containerd-shim-spin-v1/src/executor.rs | 173 +- containerd-shim-spin-v1/src/main.rs | 39 +- containerd-shim-wws-v1/Cargo.lock | 637 +++---- containerd-shim-wws-v1/Cargo.toml | 7 +- containerd-shim-wws-v1/src/executor.rs | 99 +- containerd-shim-wws-v1/src/main.rs | 24 +- deployments/k3d/workload/workload.yaml | 2 + images/lunatic-submillisecond/Dockerfile | 2 +- images/lunatic/Dockerfile | 2 +- images/slight/Dockerfile | 5 +- images/slight/src/lib.rs | 2 + images/spin/Dockerfile | 5 +- scripts/down.sh | 8 + tests/Cargo.toml | 20 + tests/integration_test.rs | 120 -- tests/src/integration_test.rs | 123 ++ tests/{common/mod.rs => src/lib.rs} | 53 +- tests/workloads/workload.yaml | 2 + utils/Cargo.toml | 11 + utils/src/lib.rs | 62 + 34 files changed, 2545 insertions(+), 2330 deletions(-) create mode 100644 tests/Cargo.toml delete mode 100644 tests/integration_test.rs create mode 100644 tests/src/integration_test.rs rename tests/{common/mod.rs => src/lib.rs} (68%) create mode 100644 utils/Cargo.toml create mode 100644 utils/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index b3fbd045..b1da41ce 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,6 +14,12 @@ dependencies = [ "version_check", ] +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -37,7 +43,7 @@ checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.12", + "syn 2.0.29", ] [[package]] @@ -130,7 +136,7 @@ dependencies = [ [[package]] name = "containerd-wasm-shims-tests" -version = "0.7.0" +version = "0.9.0" dependencies = [ "anyhow", "curl", @@ -166,9 +172,9 @@ dependencies = [ [[package]] name = "curl-sys" -version = "0.4.60+curl-7.88.1" +version = "0.4.65+curl-8.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "717abe2cb465a5da6ce06617388a3980c9a2844196734bec8ccb8e575250f13f" +checksum = "961ba061c9ef2fe34bbd12b807152d96f0badd2bebe7b90ce6c8c8b7572a0986" dependencies = [ "cc", "libc", @@ -270,24 +276,34 @@ dependencies = [ ] [[package]] -name = "dirs-next" -version = "2.0.0" +name = "derive_builder" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" dependencies = [ - "cfg-if", - "dirs-sys-next", + "derive_builder_macro", ] [[package]] -name = "dirs-sys-next" -version = "0.1.2" +name = "derive_builder_core" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" dependencies = [ - "libc", - "redox_users", - "winapi", + "darling", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_builder_macro" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" +dependencies = [ + "derive_builder_core", + "syn 1.0.109", ] [[package]] @@ -432,6 +448,18 @@ dependencies = [ "wasi", ] +[[package]] +name = "getset" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e45727250e75cc04ff2846a66397da8ef2b3db8e40e0cef4df67950a07621eb9" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "hashbrown" version = "0.12.3" @@ -439,12 +467,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] -name = "hermit-abi" -version = "0.2.6" +name = "hashbrown" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" dependencies = [ - "libc", + "ahash", + "allocator-api2", +] + +[[package]] +name = "home" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +dependencies = [ + "windows-sys 0.48.0", ] [[package]] @@ -587,7 +625,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", ] [[package]] @@ -639,9 +677,9 @@ dependencies = [ [[package]] name = "k8s-openapi" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd990069640f9db34b3b0f7a1afc62a05ffaa3be9b66aa3c313f58346df7f788" +checksum = "95578de7d6eac4fba42114bc751e38c59a739968769df1be56feba6f17fd148e" dependencies = [ "base64 0.21.2", "bytes", @@ -656,9 +694,9 @@ dependencies = [ [[package]] name = "kube" -version = "0.82.2" +version = "0.85.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc7d3d52dd5c871991679102e80dfb192faaaa09fecdbccdd8c55af264ce7a8f" +checksum = "a189cb8721a47de68d883040713bbb9c956763d784fcf066828018d32c180b96" dependencies = [ "k8s-openapi", "kube-client", @@ -669,16 +707,16 @@ dependencies = [ [[package]] name = "kube-client" -version = "0.82.2" +version = "0.85.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "544339f1665488243f79080441cacb09c997746fd763342303e66eebb9d3ba13" +checksum = "98989b6e1f27695afe22aa29c94136fa06be5e8d28b91222e6dfbe5a460c803f" dependencies = [ "base64 0.20.0", "bytes", "chrono", - "dirs-next", "either", "futures", + "home", "http", "http-body", "hyper", @@ -704,9 +742,9 @@ dependencies = [ [[package]] name = "kube-core" -version = "0.82.2" +version = "0.85.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25983d07f414dfffba08c5951fe110f649113416b1d8e22f7c89c750eb2555a7" +checksum = "c24d23bf764ec9a5652f943442ff062b91fd52318ea6d2fc11115f19d8c84d13" dependencies = [ "chrono", "form_urlencoded", @@ -722,9 +760,9 @@ dependencies = [ [[package]] name = "kube-derive" -version = "0.82.2" +version = "0.85.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5af652b642aca19ef5194de3506aa39f89d788d5326a570da68b13a02d6c5ba2" +checksum = "0bbec4da219dcb02bb32afd762a7ac4dffd47ed92b7e35ac9a7b961d21327117" dependencies = [ "darling", "proc-macro2", @@ -735,15 +773,16 @@ dependencies = [ [[package]] name = "kube-runtime" -version = "0.82.2" +version = "0.85.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "125331201e3073707ac79c294c89021faa76c84da3a566a3749a2a93d295c98a" +checksum = "381224caa8a6fc16f8251cf1fd6d8678cdf5366f33000a923e4c54192e4b25b5" dependencies = [ "ahash", "async-trait", "backoff", "derivative", "futures", + "hashbrown 0.14.0", "json-patch", "k8s-openapi", "kube-client", @@ -760,9 +799,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.140" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libz-sys" @@ -863,20 +902,23 @@ dependencies = [ ] [[package]] -name = "num_cpus" -version = "1.15.0" +name = "oci-spec" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "9421b067205c68dc80af7c68599a9c1eb113f975aafeb874cea7f4d5d41ce3fb" dependencies = [ - "hermit-abi", - "libc", + "derive_builder", + "getset", + "serde", + "serde_json", + "thiserror", ] [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "openssl" @@ -1014,20 +1056,44 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + [[package]] name = "proc-macro2" -version = "1.0.52" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.26" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -1071,17 +1137,6 @@ dependencies = [ "bitflags", ] -[[package]] -name = "redox_users" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" -dependencies = [ - "getrandom", - "redox_syscall", - "thiserror", -] - [[package]] name = "ryu" version = "1.0.13" @@ -1090,11 +1145,11 @@ checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] @@ -1145,9 +1200,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.164" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] @@ -1164,13 +1219,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.164" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.12", + "syn 2.0.29", ] [[package]] @@ -1262,9 +1317,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.12" +version = "2.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79d9531f94112cfc3e4c8f5f02cb2b58f72c97b7efd85f70203cc6d8efda5927" +checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" dependencies = [ "proc-macro2", "quote", @@ -1282,22 +1337,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.12", + "syn 2.0.29", ] [[package]] @@ -1322,12 +1377,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" dependencies = [ "autocfg", - "bytes", "libc", - "memchr", "mio", - "num_cpus", - "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", @@ -1525,6 +1576,14 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "utils" +version = "0.9.0" +dependencies = [ + "anyhow", + "oci-spec", +] + [[package]] name = "vcpkg" version = "0.2.15" @@ -1640,26 +1699,20 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-sys" -version = "0.42.0" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows-targets 0.42.2", ] [[package]] name = "windows-sys" -version = "0.45.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.5", ] [[package]] @@ -1668,13 +1721,28 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -1683,42 +1751,84 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + [[package]] name = "windows_i686_gnu" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + [[package]] name = "windows_i686_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + [[package]] name = "zeroize" version = "1.5.7" diff --git a/Cargo.toml b/Cargo.toml index d24c5900..c5851522 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,19 +1,15 @@ -[package] -name = "containerd-wasm-shims-tests" -version = "0.7.0" +[workspace.package] +version = "0.9.0" edition = "2021" +license = "Apache-2.0" +readme = "README.md" +repository = "https://github.com/deislabs/containerd-wasm-shims" +homepage = "https://github.com/deislabs/containerd-wasm-shims" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] - -[dev-dependencies] -anyhow = "1" -tokio = { version = "1", features = ["full"] } -kube = { version = "0.82.0", features = ["runtime", "derive"] } -k8s-openapi = { version = "0.18.0", features = ["v1_25"] } -http = "0.2" -tower = "0.4" -hyper = "0.14" -curl = "0.4" -rand = "0.8" \ No newline at end of file +[workspace] +resolver = "2" +members = [ + "utils", + "tests" +] \ No newline at end of file diff --git a/Makefile b/Makefile index e2d95319..a710b3af 100644 --- a/Makefile +++ b/Makefile @@ -57,7 +57,9 @@ test/clean: .PHONY: fmt fmt: $(foreach shim,$(SHIMS),cargo fmt --all --manifest-path=containerd-shim-$(shim)-v1/Cargo.toml -- --check;) - $(foreach shim,$(SHIMS),cargo clippy --all-targets --all-features --workspace --manifest-path=containerd-shim-$(shim)-v1/Cargo.toml -- -D warnings;) + $(foreach shim,$(SHIMS),cargo clippy --all-targets --all-features --workspace --manifest-path=containerd-shim-$(shim)-v1/Cargo.toml -- -D warnings;) + cargo fmt --all -- --check + cargo clippy --all-targets --all-features --workspace -- --deny=warnings .PHONY: build build: $(foreach shim,$(SHIMS),build-$(shim)-cross-$(TARGET)) diff --git a/containerd-shim-lunatic-v1/Cargo.lock b/containerd-shim-lunatic-v1/Cargo.lock index 4bca3c37..86905e7f 100644 --- a/containerd-shim-lunatic-v1/Cargo.lock +++ b/containerd-shim-lunatic-v1/Cargo.lock @@ -8,16 +8,16 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "gimli", + "gimli 0.27.3", ] [[package]] name = "addr2line" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli", + "gimli 0.28.0", ] [[package]] @@ -50,9 +50,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a" +checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" dependencies = [ "memchr", ] @@ -80,24 +80,23 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" +checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" [[package]] name = "anstyle-parse" @@ -119,9 +118,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c677ab05e09154296dd37acecd46420c17b9713e8366facafa8fc0885167cf4c" +checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -146,7 +145,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.25", + "time 0.3.28", ] [[package]] @@ -279,16 +278,16 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ - "addr2line 0.20.0", + "addr2line 0.21.0", "cc", "cfg-if 1.0.0", "libc", "miniz_oxide", - "object 0.31.1", + "object 0.32.0", "rustc-demangle", ] @@ -300,9 +299,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "414dcefbc63d77c526a76b3afcf6fbb9b5e2791c19c3aa2297733208750c6e53" [[package]] name = "base64-url" @@ -310,7 +309,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c5b0a88aa36e9f095ee2e2b13fb8c5e4313e022783aedacc123328c0084916d" dependencies = [ - "base64 0.21.2", + "base64 0.21.3", ] [[package]] @@ -436,9 +435,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.82" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "305fe645edc1442a0fa8b6726ba61d422798d37a52e12eaecf4b022ebbb88f01" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", "libc", @@ -468,24 +467,11 @@ dependencies = [ "regex", ] -[[package]] -name = "cgroups-rs" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb3af90c8d48ad5f432d8afb521b5b40c2a2fce46dd60e05912de51c47fba64" -dependencies = [ - "libc", - "log", - "nix 0.25.1", - "regex", - "thiserror", -] - [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "95ed24df0632f708f5f6d8082675bef2596f7084dee3dd55f632290bf35bfe0f" dependencies = [ "android-tzdata", "iana-time-zone", @@ -494,38 +480,36 @@ dependencies = [ "serde", "time 0.1.45", "wasm-bindgen", - "winapi", + "windows-targets 0.48.5", ] [[package]] name = "clap" -version = "4.3.22" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b417ae4361bca3f5de378294fc7472d3c4ed86a5ef9f49e93ae722f432aae8d2" +checksum = "6a13b88d2c62ff462f88e4a121f17a82c1af05693a2f192b5c38d14de73c19f6" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.3.22" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c90dc0f0e42c64bff177ca9d7be6fcc9ddb0f26a6e062174a61c84dd6c644d4" +checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08" dependencies = [ "anstream", "anstyle", "clap_lex", - "once_cell", "strsim", ] [[package]] name = "clap_derive" -version = "4.3.12" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" +checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" dependencies = [ "heck 0.4.1", "proc-macro2", @@ -535,9 +519,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "clone3" @@ -571,7 +555,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46a08af6d8436b911bd47f34dd3478fe28cfbe40e8e3b2c1d61f3abb264e053d" dependencies = [ - "cgroups-rs 0.2.11", + "cgroups-rs", "command-fds", "containerd-shim-protos", "go-flag", @@ -579,7 +563,7 @@ dependencies = [ "libc", "log", "mio", - "nix 0.26.2", + "nix 0.26.4", "oci-spec", "os_pipe", "page_size", @@ -590,7 +574,7 @@ dependencies = [ "serde_json", "signal-hook", "thiserror", - "time 0.3.25", + "time 0.3.28", "windows-sys 0.48.0", ] @@ -610,12 +594,14 @@ dependencies = [ "lunatic-process", "lunatic-process-api", "lunatic-runtime", - "nix 0.26.2", + "nix 0.26.4", + "oci-spec", "openssl", "serde", "serde_json", "thiserror", "tokio", + "utils", ] [[package]] @@ -632,25 +618,26 @@ dependencies = [ [[package]] name = "containerd-shim-wasm" version = "0.2.1" -source = "git+https://github.com/containerd/runwasi?rev=c83ea9629bcc2377f54468700e6abbe4f5320b56#c83ea9629bcc2377f54468700e6abbe4f5320b56" +source = "git+https://github.com/containerd/runwasi?rev=7e978edeaf34b54efb895738357c805cf888b76d#7e978edeaf34b54efb895738357c805cf888b76d" dependencies = [ "anyhow", "caps", - "cgroups-rs 0.3.3", "chrono", "clone3", "command-fds", "containerd-shim", + "crossbeam", "libc", "libcontainer", "log", - "nix 0.26.2", + "nix 0.26.4", "oci-spec", "protobuf 3.2.0", "serde", "serde_json", "thiserror", "ttrpc", + "windows-sys 0.48.0", ] [[package]] @@ -708,7 +695,7 @@ dependencies = [ "cranelift-codegen-shared", "cranelift-entity", "cranelift-isle", - "gimli", + "gimli 0.27.3", "hashbrown 0.13.2", "log", "regalloc2", @@ -794,6 +781,20 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "crossbeam" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2801af0d36612ae591caa9568261fddce32ce6e08a7275ea334a06a4ad021a2c" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-epoch", + "crossbeam-queue", + "crossbeam-utils", +] + [[package]] name = "crossbeam-channel" version = "0.5.8" @@ -828,6 +829,16 @@ dependencies = [ "scopeguard", ] +[[package]] +name = "crossbeam-queue" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.16" @@ -853,7 +864,7 @@ version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a011bbe2c35ce9c1f143b7af6f94f29a167beb4cd1d29e6740ce836f723120e" dependencies = [ - "nix 0.26.2", + "nix 0.26.4", "windows-sys 0.48.0", ] @@ -894,9 +905,9 @@ dependencies = [ [[package]] name = "dashmap" -version = "5.5.0" +version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6943ae99c34386c84a470c499d3414f66502a41340aa895406e0d2e4a207b91d" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if 1.0.0", "hashbrown 0.14.0", @@ -927,9 +938,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7684a49fb1af197853ef7b2ee694bc1f5b4179556f1e5710e1760c5db6f5e929" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" dependencies = [ "serde", ] @@ -1046,9 +1057,9 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "encoding_rs" -version = "0.8.32" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if 1.0.0", ] @@ -1081,9 +1092,9 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ "errno-dragonfly", "libc", @@ -1119,7 +1130,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b0377f1edc77dbd1118507bc7a66e4ab64d2b90c66f90726dc801e73a8c68f9" dependencies = [ "cfg-if 1.0.0", - "rustix 0.38.8", + "rustix 0.38.11", "windows-sys 0.48.0", ] @@ -1203,7 +1214,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d167b646a876ba8fda6b50ac645cfd96242553cbaf0ca4fccaa39afcbf0801f" dependencies = [ "io-lifetimes 1.0.11", - "rustix 0.38.8", + "rustix 0.38.11", "windows-sys 0.48.0", ] @@ -1350,6 +1361,12 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" + [[package]] name = "go-flag" version = "0.1.0" @@ -1361,9 +1378,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.20" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes", "fnv", @@ -1619,7 +1636,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.2", - "rustix 0.38.8", + "rustix 0.38.11", "windows-sys 0.48.0", ] @@ -1697,11 +1714,10 @@ checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libcgroups" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f6fef16f505466473eeeee906244e03a437beaf41ccd85c39355b4077890c9" +source = "git+https://github.com/containers/youki?rev=09e67372a892f22a89eeef62ff429c3cbcac6d41#09e67372a892f22a89eeef62ff429c3cbcac6d41" dependencies = [ "fixedbitset 0.4.2", - "nix 0.26.2", + "nix 0.26.4", "oci-spec", "procfs", "serde", @@ -1712,18 +1728,16 @@ dependencies = [ [[package]] name = "libcontainer" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac48a05819bd5bd31390bd1874f5a94f711c248677fc908801de4789bdd1fbad" +source = "git+https://github.com/containers/youki?rev=09e67372a892f22a89eeef62ff429c3cbcac6d41#09e67372a892f22a89eeef62ff429c3cbcac6d41" dependencies = [ "bitflags 2.4.0", "caps", "chrono", - "clone3", "fastrand", "futures", "libc", "libcgroups", - "nix 0.26.2", + "nix 0.26.4", "oci-spec", "once_cell", "prctl", @@ -2093,9 +2107,9 @@ checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4" [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "5486aed0026218e61b8a01d5fbd5a0a134649abb71a0e53b7bc088529dced86e" [[package]] name = "memfd" @@ -2247,28 +2261,26 @@ dependencies = [ [[package]] name = "nix" -version = "0.25.1" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ - "autocfg", "bitflags 1.3.2", "cfg-if 1.0.0", "libc", + "memoffset 0.7.1", + "pin-utils", ] [[package]] name = "nix" -version = "0.26.2" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "cfg-if 1.0.0", "libc", - "memoffset 0.7.1", - "pin-utils", - "static_assertions", ] [[package]] @@ -2283,9 +2295,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -2335,9 +2347,9 @@ dependencies = [ [[package]] name = "object" -version = "0.31.1" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" dependencies = [ "memchr", ] @@ -2372,11 +2384,11 @@ checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "openssl" -version = "0.10.56" +version = "0.10.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "729b745ad4a5575dd06a3e1af1414bd330ee561c01b3899eb584baeaa8def17e" +checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "cfg-if 1.0.0", "foreign-types", "libc", @@ -2413,9 +2425,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.91" +version = "0.9.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "866b5f16f90776b9bb8dc1e1802ac6f0513de3a7a7465867bfbc563dc737faac" +checksum = "db7e971c2c2bba161b2d2fdf37080177eff520b3bc044787c7f1f5f9e78d869b" dependencies = [ "cc", "libc", @@ -2454,7 +2466,7 @@ dependencies = [ "libc", "redox_syscall 0.3.5", "smallvec", - "windows-targets 0.48.3", + "windows-targets 0.48.5", ] [[package]] @@ -2510,9 +2522,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -2532,14 +2544,14 @@ version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e30165d31df606f5726b090ec7592c308a0eaf61721ff64c9a3018e344a8753e" dependencies = [ - "portable-atomic 1.4.2", + "portable-atomic 1.4.3", ] [[package]] name = "portable-atomic" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f32154ba0af3a075eefa1eda8bb414ee928f62303a54ea85b8d6638ff1a6ee9e" +checksum = "31114a898e107c51bb1609ffaf55a0e011cf6a4d7f1170d0015a165082c0338b" [[package]] name = "ppv-lite86" @@ -2554,7 +2566,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "059a34f111a9dee2ce1ac2826a68b24601c4298cfeb1a587c3cb493d5ab46f52" dependencies = [ "libc", - "nix 0.26.2", + "nix 0.27.1", ] [[package]] @@ -2861,7 +2873,7 @@ checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", "ring", - "time 0.3.25", + "time 0.3.28", "x509-parser", "yasna", ] @@ -2909,9 +2921,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.3" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" +checksum = "12de2eff854e5fa4b1295edd650e227e9d8fb0c9e90b12e7f36d6a6811791a29" dependencies = [ "aho-corasick", "memchr", @@ -2921,9 +2933,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" +checksum = "49530408a136e16e5b486e883fbb6ba058e8e4e8ae6621a77b048b314336e629" dependencies = [ "aho-corasick", "memchr", @@ -2932,17 +2944,17 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "reqwest" -version = "0.11.18" +version = "0.11.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" +checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" dependencies = [ - "base64 0.21.2", + "base64 0.21.3", "bytes", "encoding_rs", "futures-core", @@ -3075,9 +3087,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.8" +version = "0.38.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" +checksum = "c0c3dde1fc030af041adc40e79c0e7fbcf431dd24870053d187d7c66e4b87453" dependencies = [ "bitflags 2.4.0", "errno", @@ -3088,9 +3100,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.20.8" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", "ring", @@ -3116,7 +3128,7 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.2", + "base64 0.21.3", ] [[package]] @@ -3190,18 +3202,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.183" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32ac8da02677876d532745a130fc9d8e6edfa81a269b107c5b00829b91d8eb3c" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.183" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aafe972d60b0b9bee71a91b92fee2d4fb3c9d7e8f6b179aa99f27203d99a4816" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", @@ -3282,9 +3294,9 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] @@ -3363,12 +3375,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - [[package]] name = "strsim" version = "0.10.0" @@ -3426,9 +3432,9 @@ dependencies = [ "cap-std", "fd-lock", "io-lifetimes 2.0.2", - "rustix 0.38.8", + "rustix 0.38.11", "windows-sys 0.48.0", - "winx 0.36.1", + "winx 0.36.2", ] [[package]] @@ -3439,14 +3445,14 @@ checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" [[package]] name = "tempfile" -version = "3.7.1" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc02fddf48964c42031a0b3fe0428320ecf3a73c401040fc0096f97794310651" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if 1.0.0", "fastrand", "redox_syscall 0.3.5", - "rustix 0.38.8", + "rustix 0.38.11", "windows-sys 0.48.0", ] @@ -3492,9 +3498,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea" +checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" dependencies = [ "deranged", "itoa", @@ -3511,9 +3517,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.11" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" +checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" dependencies = [ "time-core", ] @@ -3692,14 +3698,15 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "ttrpc" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb03d0f5219ec54d870cb3d58719a2dc0b8849405b75a2e0968b3590392a5b0" +checksum = "55ea338db445bee75c596cf8a478fbfcefad5a943c9e92a7e1c805c65ed39551" dependencies = [ "byteorder", + "crossbeam", "libc", "log", - "nix 0.26.2", + "nix 0.26.4", "protobuf 3.2.0", "protobuf-codegen 3.2.0", "thiserror", @@ -3767,9 +3774,9 @@ dependencies = [ [[package]] name = "unicase" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" dependencies = [ "version_check", ] @@ -3821,9 +3828,9 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", @@ -3836,6 +3843,14 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +[[package]] +name = "utils" +version = "0.9.0" +dependencies = [ + "anyhow", + "oci-spec", +] + [[package]] name = "uuid" version = "1.4.1" @@ -3991,9 +4006,9 @@ checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "wasm-encoder" -version = "0.31.1" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41763f20eafed1399fff1afb466496d3a959f58241436cfdc17e3f5ca954de16" +checksum = "1ba64e81215916eaeb48fee292f29401d69235d62d8b8fd92a7b2844ec5ae5f7" dependencies = [ "leb128", ] @@ -4056,7 +4071,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c86437fa68626fe896e5afc69234bb2b5894949083586535f200385adfd71213" dependencies = [ "anyhow", - "base64 0.21.2", + "base64 0.21.3", "bincode", "directories-next", "file-per-thread-logger", @@ -4102,7 +4117,7 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli", + "gimli 0.27.3", "log", "object 0.30.4", "target-lexicon", @@ -4121,7 +4136,7 @@ dependencies = [ "anyhow", "cranelift-codegen", "cranelift-native", - "gimli", + "gimli 0.27.3", "object 0.30.4", "target-lexicon", "wasmtime-environ", @@ -4135,7 +4150,7 @@ checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949" dependencies = [ "anyhow", "cranelift-entity", - "gimli", + "gimli 0.27.3", "indexmap", "log", "object 0.30.4", @@ -4170,7 +4185,7 @@ dependencies = [ "bincode", "cfg-if 1.0.0", "cpp_demangle", - "gimli", + "gimli 0.27.3", "ittapi", "log", "object 0.30.4", @@ -4279,9 +4294,9 @@ dependencies = [ [[package]] name = "wast" -version = "62.0.1" +version = "64.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8ae06f09dbe377b889fbd620ff8fa21e1d49d1d9d364983c0cdbf9870cb9f1f" +checksum = "a259b226fd6910225aa7baeba82f9d9933b6d00f2ce1b49b80fa4214328237cc" dependencies = [ "leb128", "memchr", @@ -4291,11 +4306,11 @@ dependencies = [ [[package]] name = "wat" -version = "1.0.69" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "842e15861d203fb4a96d314b0751cdeaf0f6f8b35e8d81d2953af2af5e44e637" +checksum = "53253d920ab413fca1c7dc2161d601c79b4fdf631d0ba51dd4343bf9b556c3f6" dependencies = [ - "wast 62.0.1", + "wast 64.0.0", ] [[package]] @@ -4310,9 +4325,9 @@ dependencies = [ [[package]] name = "webpki" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "f0e74f82d49d545ad128049b7e88f6576df2da6b02e9ce565c6f533be576957e" dependencies = [ "ring", "untrusted", @@ -4418,7 +4433,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.3", + "windows-targets 0.48.5", ] [[package]] @@ -4451,7 +4466,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.3", + "windows-targets 0.48.5", ] [[package]] @@ -4471,17 +4486,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.3" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27f51fb4c64f8b770a823c043c7fad036323e1c48f55287b7bbb7987b2fcdf3b" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.3", - "windows_aarch64_msvc 0.48.3", - "windows_i686_gnu 0.48.3", - "windows_i686_msvc 0.48.3", - "windows_x86_64_gnu 0.48.3", - "windows_x86_64_gnullvm 0.48.3", - "windows_x86_64_msvc 0.48.3", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -4492,9 +4507,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.3" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fde1bb55ae4ce76a597a8566d82c57432bc69c039449d61572a7a353da28f68c" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -4504,9 +4519,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.3" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1513e8d48365a78adad7322fd6b5e4c4e99d92a69db8df2d435b25b1f1f286d4" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -4516,9 +4531,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.3" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60587c0265d2b842298f5858e1a5d79d146f9ee0c37be5782e92a6eb5e1d7a83" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -4528,9 +4543,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.3" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224fe0e0ffff5d2ea6a29f82026c8f43870038a0ffc247aa95a52b47df381ac4" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -4540,9 +4555,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.3" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62fc52a0f50a088de499712cbc012df7ebd94e2d6eb948435449d76a6287e7ad" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" @@ -4552,9 +4567,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.3" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2093925509d91ea3d69bcd20238f4c2ecdb1a29d3c281d026a09705d0dd35f3d" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -4564,17 +4579,18 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.3" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6ade45bc8bf02ae2aa34a9d54ba660a1a58204da34ba793c00d83ca3730b5f1" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi", + "cfg-if 1.0.0", + "windows-sys 0.48.0", ] [[package]] @@ -4590,9 +4606,9 @@ dependencies = [ [[package]] name = "winx" -version = "0.36.1" +version = "0.36.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4857cedf8371f690bb6782a3e2b065c54d1b6661be068aaf3eac8b45e813fdf8" +checksum = "357bb8e2932df531f83b052264b050b81ba0df90ee5a59b2d1d3949f344f81e5" dependencies = [ "bitflags 2.4.0", "windows-sys 0.48.0", @@ -4641,7 +4657,7 @@ dependencies = [ "ring", "rusticata-macros", "thiserror", - "time 0.3.25", + "time 0.3.28", ] [[package]] @@ -4650,7 +4666,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time 0.3.25", + "time 0.3.28", ] [[package]] diff --git a/containerd-shim-lunatic-v1/Cargo.toml b/containerd-shim-lunatic-v1/Cargo.toml index 4b41f2d1..2cd015b9 100644 --- a/containerd-shim-lunatic-v1/Cargo.toml +++ b/containerd-shim-lunatic-v1/Cargo.toml @@ -7,8 +7,8 @@ edition = "2021" [dependencies] containerd-shim = "0.5.0" -containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", rev = "c83ea9629bcc2377f54468700e6abbe4f5320b56", features = ["cgroupsv2"] } -libcontainer = { version = "0.1", features = ["v2"], default-features = false } +containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", rev = "7e978edeaf34b54efb895738357c805cf888b76d", features = ["cgroupsv2"] } +libcontainer = { git = "https://github.com/containers/youki", rev = "09e67372a892f22a89eeef62ff429c3cbcac6d41", features = ["v2"], default-features = false } nix = "0.26.2" serde = "1.0.183" serde_json = "1.0.104" @@ -23,5 +23,10 @@ lunatic-distributed = { git = "https://github.com/lunatic-solutions/lunatic", ta lunatic-runtime = { git = "https://github.com/lunatic-solutions/lunatic", tag = "v0.13.2"} clap = { version = "4.0", features = ["cargo", "derive"] } tokio = "1.30.0" +oci-spec = "0.6.2" +utils = { path = "../utils" } + # https://github.com/sfackler/rust-openssl/issues/603#issuecomment-822619837 -openssl = { version = "0.10", features = ["vendored"] } \ No newline at end of file +openssl = { version = "0.10", features = ["vendored"] } + +[workspace] \ No newline at end of file diff --git a/containerd-shim-lunatic-v1/src/common.rs b/containerd-shim-lunatic-v1/src/common.rs index e372fdd2..80b5d7f3 100644 --- a/containerd-shim-lunatic-v1/src/common.rs +++ b/containerd-shim-lunatic-v1/src/common.rs @@ -41,7 +41,11 @@ pub async fn run_wasm(args: RunWasm) -> Result<()> { let path = args.path; // Set correct command line arguments for the guest - let filename = path.file_name().unwrap().to_string_lossy().to_string(); + let filename = path + .file_name() + .ok_or(anyhow!("Invalid path"))? + .to_string_lossy() + .to_string(); let mut wasi_args = vec![filename]; wasi_args.extend(args.wasm_args); config.set_command_line_arguments(wasi_args); diff --git a/containerd-shim-lunatic-v1/src/executor.rs b/containerd-shim-lunatic-v1/src/executor.rs index b83e6a93..65326389 100644 --- a/containerd-shim-lunatic-v1/src/executor.rs +++ b/containerd-shim-lunatic-v1/src/executor.rs @@ -1,85 +1,65 @@ -use std::{os::fd::RawFd, path::PathBuf, sync::Arc}; +use anyhow::{Context, Result}; +use std::path::PathBuf; +use std::sync::Arc; +use tokio::runtime::Runtime; -use containerd_shim_wasm::sandbox::oci::Spec; -use libc::{STDERR_FILENO, STDIN_FILENO, STDOUT_FILENO}; -use libcontainer::workload::{Executor, ExecutorError}; +use containerd_shim_wasm::libcontainer_instance::LinuxContainerExecutor; +use containerd_shim_wasm::sandbox::Stdio; +use libcontainer::workload::{Executor, ExecutorError, ExecutorValidationError}; use lunatic_process::{ env::{Environments, LunaticEnvironments}, runtimes, }; -use nix::unistd::{dup, dup2}; - -use anyhow::Result; -use tokio::runtime::Runtime; +use oci_spec::runtime::Spec; +use utils::{get_args, is_linux_executable}; use crate::common::{run_wasm, RunWasm}; #[derive(Clone)] pub struct LunaticExecutor { - pub stdin: Option, - pub stdout: Option, - pub stderr: Option, + stdio: Stdio, } -fn prepare_stdio(stdin: Option, stdout: Option, stderr: Option) -> Result<()> { - if let Some(stdin) = stdin { - dup(STDIN_FILENO)?; - dup2(stdin, STDIN_FILENO)?; - } - if let Some(stdout) = stdout { - dup(STDOUT_FILENO)?; - dup2(stdout, STDOUT_FILENO)?; - } - if let Some(stderr) = stderr { - dup(STDERR_FILENO)?; - dup2(stderr, STDERR_FILENO)?; +impl LunaticExecutor { + pub fn new(stdio: Stdio) -> Self { + Self { stdio } } - Ok(()) -} - -fn get_args(spec: &Spec) -> &[String] { - let p = match spec.process() { - None => return &[], - Some(p) => p, - }; - match p.args() { - None => &[], - Some(args) => args.as_slice(), + fn wasm_exec(&self, spec: &Spec) -> anyhow::Result<()> { + self.stdio + .take() + .redirect() + .context("failed to redirect stdio")?; + let cmd = get_args(spec).first().context("no cmd provided")?.clone(); + let rt = Runtime::new().context("failed to create runtime")?; + rt.block_on(async { + log::info!(" >>> building lunatic application"); + crate::executor::exec(cmd).await + }) } } impl Executor for LunaticExecutor { fn exec(&self, spec: &Spec) -> Result<(), ExecutorError> { - prepare_stdio(self.stdin, self.stdout, self.stderr).map_err(|err| { - ExecutorError::Other(format!("failed to prepare stdio for container: {}", err)) - })?; - - let args = get_args(spec); - let cmd = args[0].clone(); - - let rt = Runtime::new().unwrap(); - rt.block_on(async { - log::info!(" >>> building lunatic application"); - - match crate::executor::exec(cmd).await { - Err(error) => log::error!(" >>> error: {:?}", error), - Ok(_) => std::process::exit(0), + if is_linux_executable(spec).is_ok() { + log::info!("executing linux container"); + LinuxContainerExecutor::new(self.stdio.clone()).exec(spec) + } else { + if let Err(e) = self.wasm_exec(spec) { + log::error!(" >>> error: {:?}", e); + std::process::exit(137); } - }); - std::process::exit(137); - } - - fn can_handle(&self, _spec: &Spec) -> bool { - true + std::process::exit(0); + } } - fn name(&self) -> &'static str { - "lunatic" + fn validate(&self, _spec: &Spec) -> Result<(), ExecutorValidationError> { + Ok(()) } } pub async fn exec(cmd: String) -> Result<()> { + log::info!(" >>> lunatic wasm binary: {:?}", cmd); // Create wasmtime runtime let wasmtime_config = runtimes::wasmtime::default_config(); let runtime = runtimes::wasmtime::WasmtimeRuntime::new(&wasmtime_config)?; diff --git a/containerd-shim-lunatic-v1/src/main.rs b/containerd-shim-lunatic-v1/src/main.rs index 0e66bf8e..3fa6337e 100644 --- a/containerd-shim-lunatic-v1/src/main.rs +++ b/containerd-shim-lunatic-v1/src/main.rs @@ -1,24 +1,19 @@ use std::{ - os::fd::IntoRawFd, path::PathBuf, sync::{Arc, Condvar, Mutex}, }; use containerd_shim::run; +use containerd_shim_wasm::sandbox::instance_utils::determine_rootdir; +use containerd_shim_wasm::sandbox::stdio::Stdio; use containerd_shim_wasm::{ libcontainer_instance::LibcontainerInstance, - sandbox::{ - instance::ExitCode, - instance_utils::{determine_rootdir, maybe_open_stdio}, - Error, InstanceConfig, ShimCli, - }, -}; -use libcontainer::{ - container::{builder::ContainerBuilder, Container}, - syscall::syscall::create_syscall, + sandbox::{instance::ExitCode, Error, InstanceConfig, ShimCli}, }; +use libcontainer::container::{builder::ContainerBuilder, Container}; +use libcontainer::syscall::syscall::SyscallType; -use anyhow::{Context, Result}; +use anyhow::Result; use crate::executor::LunaticExecutor; @@ -32,9 +27,7 @@ pub struct Wasi { exit_code: ExitCode, bundle: String, rootdir: PathBuf, - stdin: String, - stdout: String, - stderr: String, + stdio: Stdio, } impl LibcontainerInstance for Wasi { @@ -54,9 +47,7 @@ impl LibcontainerInstance for Wasi { ) .unwrap(), bundle, - stdin: cfg.get_stdin().unwrap_or_default(), - stdout: cfg.get_stdout().unwrap_or_default(), - stderr: cfg.get_stderr().unwrap_or_default(), + stdio: Stdio::init_from_cfg(cfg).expect("failed to open stdio"), } } @@ -75,32 +66,15 @@ impl LibcontainerInstance for Wasi { fn build_container(&self) -> Result { log::info!("Building container"); - let stdin = maybe_open_stdio(&self.stdin) - .context("could not open stdin")? - .map(|f| f.into_raw_fd()); - let stdout = maybe_open_stdio(&self.stdout) - .context("could not open stdout")? - .map(|f| f.into_raw_fd()); - let stderr = maybe_open_stdio(&self.stderr) - .context("could not open stderr")? - .map(|f| f.into_raw_fd()); - - let syscall = create_syscall(); let err_msg = |err| format!("failed to create container: {}", err); - let container = ContainerBuilder::new(self.id.clone(), syscall.as_ref()) - .with_executor(vec![Box::new(LunaticExecutor { - stdin, - stdout, - stderr, - })]) - .map_err(|err| Error::Others(err_msg(err)))? + let container = ContainerBuilder::new(self.id.clone(), SyscallType::Linux) + .with_executor(LunaticExecutor::new(self.stdio.take())) .with_root_path(self.rootdir.clone()) .map_err(|err| Error::Others(err_msg(err)))? .as_init(&self.bundle) .with_systemd(false) .build() .map_err(|err| Error::Others(err_msg(err)))?; - log::info!(">>> Container built."); Ok(container) } diff --git a/containerd-shim-slight-v1/Cargo.lock b/containerd-shim-slight-v1/Cargo.lock index d559dd51..054bd675 100644 --- a/containerd-shim-slight-v1/Cargo.lock +++ b/containerd-shim-slight-v1/Cargo.lock @@ -14,7 +14,16 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "gimli", + "gimli 0.27.3", +] + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli 0.28.0", ] [[package]] @@ -90,24 +99,24 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.1" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" dependencies = [ "memchr", ] [[package]] name = "ambient-authority" -version = "0.0.1" +version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec8ad6edb4840b78c5c3d88de606b22252d552b55f3a4699fbb10fc070ec3049" +checksum = "e9d4ee0d472d1cd2e28c97dfa124b3d8d992e10eb0a035f33f5d12e3a177ba3b" [[package]] -name = "ambient-authority" -version = "0.0.2" +name = "android-tzdata" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9d4ee0d472d1cd2e28c97dfa124b3d8d992e10eb0a035f33f5d12e3a177ba3b" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" [[package]] name = "android_system_properties" @@ -120,30 +129,29 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" +checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" [[package]] name = "anstyle-parse" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" dependencies = [ "utf8parse", ] @@ -159,9 +167,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -169,9 +177,15 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" + +[[package]] +name = "arbitrary" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "e2d098ff73c1ca148721f37baad5ea6a465a13f9573aba8641fbbbae8164a54e" [[package]] name = "as-any" @@ -192,9 +206,9 @@ dependencies = [ [[package]] name = "async-channel" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", "event-listener", @@ -244,7 +258,7 @@ dependencies = [ "log", "parking", "polling", - "rustix 0.37.18", + "rustix 0.37.23", "slab", "socket2 0.4.9", "waker-fn", @@ -252,9 +266,9 @@ dependencies = [ [[package]] name = "async-lock" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" dependencies = [ "event-listener", ] @@ -304,7 +318,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.29", ] [[package]] @@ -315,13 +329,13 @@ checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.29", ] [[package]] @@ -358,7 +372,7 @@ dependencies = [ "http", "hyper", "ring", - "time 0.3.20", + "time 0.3.28", "tokio", "tower", "tracing", @@ -553,8 +567,8 @@ dependencies = [ "once_cell", "percent-encoding", "regex", - "sha2 0.10.6", - "time 0.3.20", + "sha2 0.10.7", + "time 0.3.28", "tracing", ] @@ -587,7 +601,7 @@ dependencies = [ "md-5", "pin-project-lite", "sha1 0.10.5", - "sha2 0.10.6", + "sha2 0.10.7", "tracing", ] @@ -710,7 +724,7 @@ dependencies = [ "itoa", "num-integer", "ryu", - "time 0.3.20", + "time 0.3.28", ] [[package]] @@ -740,9 +754,9 @@ dependencies = [ [[package]] name = "axum" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8175979259124331c1d7bf6586ee7e0da434155e4b2d48ec2c8386281d8df39" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" dependencies = [ "async-trait", "axum-core", @@ -797,7 +811,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "sha2 0.10.6", + "sha2 0.10.7", "surf", "url", ] @@ -813,7 +827,7 @@ dependencies = [ "bytes 1.4.0", "dyn-clone", "futures", - "getrandom 0.2.9", + "getrandom 0.2.10", "http-types", "log", "paste", @@ -824,7 +838,7 @@ dependencies = [ "serde", "serde-xml-rs", "serde_json", - "time 0.3.20", + "time 0.3.28", "url", "uuid", ] @@ -836,11 +850,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32568c56fda7f2f1173430298bddeb507ed44e99bd989ba1156a25534bff5d98" dependencies = [ "async-trait", - "base64 0.21.0", + "base64 0.21.3", "bytes 1.4.0", "dyn-clone", "futures", - "getrandom 0.2.9", + "getrandom 0.2.10", "http-types", "log", "paste", @@ -851,7 +865,7 @@ dependencies = [ "rustc_version 0.4.0", "serde", "serde_json", - "time 0.3.20", + "time 0.3.28", "url", "uuid", ] @@ -868,8 +882,8 @@ dependencies = [ "hmac 0.12.1", "log", "ring", - "sha2 0.10.6", - "time 0.3.20", + "sha2 0.10.7", + "time 0.3.28", "url", ] @@ -892,8 +906,8 @@ dependencies = [ "serde-xml-rs", "serde_derive", "serde_json", - "sha2 0.10.6", - "time 0.3.20", + "sha2 0.10.7", + "time 0.3.28", "url", "uuid", ] @@ -915,8 +929,8 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "sha2 0.10.6", - "time 0.3.20", + "sha2 0.10.7", + "time 0.3.28", "url", "uuid", ] @@ -939,7 +953,7 @@ dependencies = [ "serde-xml-rs", "serde_derive", "serde_json", - "time 0.3.20", + "time 0.3.28", "url", "uuid", ] @@ -960,11 +974,26 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "time 0.3.20", + "time 0.3.28", "url", "uuid", ] +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line 0.21.0", + "cc", + "cfg-if 1.0.0", + "libc", + "miniz_oxide", + "object 0.32.0", + "rustc-demangle", +] + [[package]] name = "base-x" version = "0.2.11" @@ -985,9 +1014,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.0" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +checksum = "414dcefbc63d77c526a76b3afcf6fbb9b5e2791c19c3aa2297733208750c6e53" [[package]] name = "base64-simd" @@ -1070,9 +1099,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.12.1" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b1ce199063694f33ffb7dd4e0ee620741495c32833cde5aa08f02a0bf96f0c8" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] name = "byteorder" @@ -1104,96 +1133,93 @@ dependencies = [ [[package]] name = "cap-fs-ext" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1742f5106155d46a41eac5f730ee189bf92fde6ae109fbf2cdb67176726ca5d" +checksum = "58bc48200a1a0fa6fba138b1802ad7def18ec1cdd92f7b2a04e21f1bd887f7b9" dependencies = [ - "cap-primitives 1.0.14", - "cap-std 1.0.14", - "io-lifetimes 1.0.10", + "cap-primitives 1.0.15", + "cap-std 1.0.15", + "io-lifetimes 1.0.11", "windows-sys 0.48.0", ] [[package]] name = "cap-primitives" -version = "0.24.4" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb8fca3e81fae1d91a36e9784ca22a39ef623702b5f7904d89dc31f10184a178" +checksum = "a4b6df5b295dca8d56f35560be8c391d59f0420f72e546997154e24e765e6451" dependencies = [ - "ambient-authority 0.0.1", - "errno 0.2.8", - "fs-set-times 0.15.0", - "io-extras 0.13.2", - "io-lifetimes 0.5.3", + "ambient-authority", + "fs-set-times 0.19.2", + "io-extras 0.17.4", + "io-lifetimes 1.0.11", "ipnet", "maybe-owned", - "rustix 0.33.7", - "winapi", - "winapi-util", - "winx 0.31.0", + "rustix 0.37.23", + "windows-sys 0.48.0", + "winx 0.35.1", ] [[package]] name = "cap-primitives" -version = "1.0.14" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42068f579028e856717d61423645c85d2d216dde8eff62c9b30140e725c79177" +checksum = "2bf30c373a3bee22c292b1b6a7a26736a38376840f1af3d2d806455edf8c3899" dependencies = [ - "ambient-authority 0.0.2", - "fs-set-times 0.19.1", - "io-extras 0.17.4", - "io-lifetimes 1.0.10", + "ambient-authority", + "fs-set-times 0.20.0", + "io-extras 0.18.0", + "io-lifetimes 2.0.2", "ipnet", "maybe-owned", - "rustix 0.37.18", + "rustix 0.38.10", "windows-sys 0.48.0", - "winx 0.35.1", + "winx 0.36.1", ] [[package]] name = "cap-rand" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3be2ededc13f42a5921c08e565b854cb5ff9b88753e2c6ec12c58a24e7e8d4e" +checksum = "4d25555efacb0b5244cf1d35833d55d21abc916fff0eaad254b8e2453ea9b8ab" dependencies = [ - "ambient-authority 0.0.2", + "ambient-authority", "rand 0.8.5", ] [[package]] name = "cap-std" -version = "0.24.4" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2247568946095c7765ad2b441a56caffc08027734c634a6d5edda648f04e32eb" +checksum = "3373a62accd150b4fcba056d4c5f3b552127f0ec86d3c8c102d60b978174a012" dependencies = [ - "cap-primitives 0.24.4", - "io-extras 0.13.2", - "io-lifetimes 0.5.3", - "ipnet", - "rustix 0.33.7", + "cap-primitives 1.0.15", + "io-extras 0.17.4", + "io-lifetimes 1.0.11", + "rustix 0.37.23", ] [[package]] name = "cap-std" -version = "1.0.14" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "559ad6fab5fedcc9bd5877160e1433fcd481f8af615068d6ca49472b1201cc6c" +checksum = "84bade423fa6403efeebeafe568fdb230e8c590a275fba2ba978dd112efcf6e9" dependencies = [ - "cap-primitives 1.0.14", - "io-extras 0.17.4", - "io-lifetimes 1.0.10", - "rustix 0.37.18", + "cap-primitives 2.0.0", + "io-extras 0.18.0", + "io-lifetimes 2.0.2", + "rustix 0.38.10", ] [[package]] name = "cap-time-ext" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a74e04cd32787bfa3a911af745b0fd5d99d4c3fc16c64449e1622c06fa27c8e" +checksum = "e95002993b7baee6b66c8950470e59e5226a23b3af39fc59c47fe416dd39821a" dependencies = [ - "cap-primitives 1.0.14", + "cap-primitives 1.0.15", "once_cell", - "rustix 0.37.18", + "rustix 0.37.23", "winx 0.35.1", ] @@ -1215,11 +1241,12 @@ checksum = "a2698f953def977c68f935bb0dfa959375ad4638570e969e2f1e9f433cbf1af6" [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -1246,33 +1273,20 @@ dependencies = [ "regex", ] -[[package]] -name = "cgroups-rs" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb3af90c8d48ad5f432d8afb521b5b40c2a2fce46dd60e05912de51c47fba64" -dependencies = [ - "libc", - "log", - "nix 0.25.1", - "regex", - "thiserror", -] - [[package]] name = "chrono" -version = "0.4.24" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +checksum = "95ed24df0632f708f5f6d8082675bef2596f7084dee3dd55f632290bf35bfe0f" dependencies = [ + "android-tzdata", "iana-time-zone", "js-sys", - "num-integer", "num-traits", "serde", "time 0.1.45", "wasm-bindgen", - "winapi", + "windows-targets 0.48.5", ] [[package]] @@ -1286,9 +1300,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.2.7" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34d21f9bf1b425d2968943631ec91202fe5e837264063503708b83013f8fc938" +checksum = "7c8d502cbaec4595d2e7d5f61e318f05417bd2b66fdc3809498f0d3fdf0bea27" dependencies = [ "clap_builder", "clap_derive", @@ -1297,34 +1311,33 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.2.7" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914c8c79fb560f238ef6429439a30023c862f7a28e688c58f7203f12b29970bd" +checksum = "5891c7bc0edb3e1c2204fc5e94009affabeb1821c9e5fdc3959536c5c0bb984d" dependencies = [ "anstream", "anstyle", - "bitflags 1.3.2", "clap_lex", "strsim", ] [[package]] name = "clap_derive" -version = "4.2.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4" +checksum = "c9fd1a5729c4548118d7d70ff234a44868d00489a4b6597b0b020918a0e91a1a" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.29", ] [[package]] name = "clap_lex" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1" +checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "clone3" @@ -1345,16 +1358,6 @@ dependencies = [ "cc", ] -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - [[package]] name = "colorchoice" version = "1.0.0" @@ -1408,7 +1411,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46a08af6d8436b911bd47f34dd3478fe28cfbe40e8e3b2c1d61f3abb264e053d" dependencies = [ - "cgroups-rs 0.2.11", + "cgroups-rs", "command-fds", "containerd-shim-protos", "go-flag", @@ -1416,7 +1419,7 @@ dependencies = [ "libc", "log", "mio", - "nix 0.26.2", + "nix 0.26.4", "oci-spec", "os_pipe", "page_size", @@ -1427,7 +1430,7 @@ dependencies = [ "serde_json", "signal-hook", "thiserror", - "time 0.3.20", + "time 0.3.28", "windows-sys 0.48.0", ] @@ -1456,7 +1459,7 @@ dependencies = [ "libc", "libcontainer", "log", - "nix 0.26.2", + "nix 0.26.4", "oci-spec", "openssl", "openssl-sys", @@ -1465,34 +1468,36 @@ dependencies = [ "slight", "tokio", "tokio-util", - "toml 0.7.3", + "toml 0.7.6", "tracing", "tracing-subscriber", + "utils", "wasmtime", ] [[package]] name = "containerd-shim-wasm" version = "0.2.1" -source = "git+https://github.com/containerd/runwasi?rev=c83ea9629bcc2377f54468700e6abbe4f5320b56#c83ea9629bcc2377f54468700e6abbe4f5320b56" +source = "git+https://github.com/containerd/runwasi?rev=7e978edeaf34b54efb895738357c805cf888b76d#7e978edeaf34b54efb895738357c805cf888b76d" dependencies = [ "anyhow", "caps", - "cgroups-rs 0.3.3", "chrono", "clone3", "command-fds", "containerd-shim", + "crossbeam", "libc", "libcontainer", "log", - "nix 0.26.2", + "nix 0.26.4", "oci-spec", "protobuf 3.2.0", "serde", "serde_json", "thiserror", "ttrpc", + "windows-sys 0.48.0", ] [[package]] @@ -1539,9 +1544,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -1554,26 +1559,27 @@ checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" [[package]] name = "cranelift-bforest" -version = "0.95.1" +version = "0.97.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1277fbfa94bc82c8ec4af2ded3e639d49ca5f7f3c7eeab2c66accd135ece4e70" +checksum = "5c289b8eac3a97329a524e953b5fd68a8416ca629e1a37287f12d9e0760aadbc" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.95.1" +version = "0.97.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6e8c31ad3b2270e9aeec38723888fe1b0ace3bea2b06b3f749ccf46661d3220" +checksum = "7bf07ba80f53fa7f7dc97b11087ea867f7ae4621cfca21a909eca92c0b96c7d9" dependencies = [ "bumpalo", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", + "cranelift-control", "cranelift-entity", "cranelift-isle", - "gimli", + "gimli 0.27.3", "hashbrown 0.13.2", "log", "regalloc2", @@ -1583,33 +1589,42 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.95.1" +version = "0.97.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8ac5ac30d62b2d66f12651f6b606dbdfd9c2cfd0908de6b387560a277c5c9da" +checksum = "40a7ca088173130c5c033e944756e3e441fbf3f637f32b4f6eb70252580c6dd4" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.95.1" +version = "0.97.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd82b8b376247834b59ed9bdc0ddeb50f517452827d4a11bccf5937b213748b8" +checksum = "0114095ec7d2fbd658ed100bd007006360bc2530f57c6eee3d3838869140dbf9" + +[[package]] +name = "cranelift-control" +version = "0.97.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d56031683a55a949977e756d21826eb17a1f346143a1badc0e120a15615cd38" +dependencies = [ + "arbitrary", +] [[package]] name = "cranelift-entity" -version = "0.95.1" +version = "0.97.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40099d38061b37e505e63f89bab52199037a72b931ad4868d9089ff7268660b0" +checksum = "d6565198b5684367371e2b946ceca721eb36965e75e3592fad12fc2e15f65d7b" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.95.1" +version = "0.97.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a25d9d0a0ae3079c463c34115ec59507b4707175454f0eee0891e83e30e82d" +checksum = "25f28cc44847c8b98cb921e6bfc0f7b228f4d27519376fea724d181da91709a6" dependencies = [ "cranelift-codegen", "log", @@ -1619,15 +1634,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.95.1" +version = "0.97.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80de6a7d0486e4acbd5f9f87ec49912bf4c8fb6aea00087b989685460d4469ba" +checksum = "80b658177e72178c438f7de5d6645c56d97af38e17fcb0b500459007b4e05cc5" [[package]] name = "cranelift-native" -version = "0.95.1" +version = "0.97.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6b03e0e03801c4b3fd8ce0758a94750c07a44e7944cc0ffbf0d3f2e7c79b00" +checksum = "bf1c7de7221e6afcc5e13ced3b218faab3bc65b47eac67400046a05418aecd6a" dependencies = [ "cranelift-codegen", "libc", @@ -1636,9 +1651,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.95.1" +version = "0.97.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff3220489a3d928ad91e59dd7aeaa8b3de18afb554a6211213673a71c90737ac" +checksum = "76b0d28ebe8edb6b503630c489aa4669f1e2d13b97bec7271a0fcb0e159be3ad" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -1646,7 +1661,7 @@ dependencies = [ "itertools", "log", "smallvec", - "wasmparser 0.102.0", + "wasmparser 0.107.0", "wasmtime-types", ] @@ -1661,9 +1676,9 @@ dependencies = [ [[package]] name = "crc32c" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dfea2db42e9927a3845fb268a10a72faed6d416065f77873f05e411457c363e" +checksum = "d8f48d60e5b4d2c53d5c2b1d8a58c849a70ae5e5509b08a48d047e3b65714a74" dependencies = [ "rustc_version 0.4.0", ] @@ -1677,6 +1692,20 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "crossbeam" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2801af0d36612ae591caa9568261fddce32ce6e08a7275ea334a06a4ad021a2c" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-epoch", + "crossbeam-queue", + "crossbeam-utils", +] + [[package]] name = "crossbeam-channel" version = "0.5.8" @@ -1700,22 +1729,32 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.14" +version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ "autocfg", "cfg-if 1.0.0", "crossbeam-utils", - "memoffset 0.8.0", + "memoffset 0.9.0", "scopeguard", ] +[[package]] +name = "crossbeam-queue" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if 1.0.0", ] @@ -1732,24 +1771,14 @@ dependencies = [ [[package]] name = "crypto-mac" -version = "0.10.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff07008ec701e8028e2ceb8f83f0e4274ee62bd2dbdc4fefff2e9a91824081a" +checksum = "4857fd85a0c34b3c3297875b747c1e02e06b6a0ea32dd892d8192b9ce0813ea6" dependencies = [ "generic-array", "subtle", ] -[[package]] -name = "ctor" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" -dependencies = [ - "quote", - "syn 1.0.109", -] - [[package]] name = "ctr" version = "0.6.0" @@ -1776,9 +1805,9 @@ dependencies = [ [[package]] name = "curl-sys" -version = "0.4.61+curl-8.0.1" +version = "0.4.65+curl-8.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14d05c10f541ae6f3bc5b3d923c20001f47db7d5f0b2bc6ad16490133842db79" +checksum = "961ba061c9ef2fe34bbd12b807152d96f0badd2bebe7b90ce6c8c8b7572a0986" dependencies = [ "cc", "libc", @@ -1803,50 +1832,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "cxx" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" -dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", -] - -[[package]] -name = "cxx-build" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" -dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn 2.0.15", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.15", -] - [[package]] name = "darling" version = "0.14.4" @@ -1884,9 +1869,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb" +checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" [[package]] name = "debug-helper" @@ -1894,6 +1879,15 @@ version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f578e8e2c440e7297e008bb5486a3a8a194775224bbc23729b0dbdfaeebf162e" +[[package]] +name = "debugid" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" +dependencies = [ + "uuid", +] + [[package]] name = "der" version = "0.4.5" @@ -1903,6 +1897,15 @@ dependencies = [ "const-oid", ] +[[package]] +name = "deranged" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +dependencies = [ + "serde", +] + [[package]] name = "derive-new" version = "0.5.9" @@ -1962,9 +1965,9 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", "crypto-common", @@ -2020,9 +2023,9 @@ checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" [[package]] name = "ed25519" @@ -2047,15 +2050,15 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "encoding_rs" -version = "0.8.32" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if 1.0.0", ] @@ -2074,21 +2077,16 @@ dependencies = [ ] [[package]] -name = "errno" -version = "0.2.8" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" -dependencies = [ - "errno-dragonfly", - "libc", - "winapi", -] +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ "errno-dragonfly", "libc", @@ -2162,20 +2160,20 @@ checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" [[package]] name = "fd-lock" -version = "3.0.12" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ae6b3d9530211fb3b12a95374b8b0823be812f53d09e18c5675c0146b09642" +checksum = "0b0377f1edc77dbd1118507bc7a66e4ab64d2b90c66f90726dc801e73a8c68f9" dependencies = [ "cfg-if 1.0.0", - "rustix 0.37.18", + "rustix 0.38.10", "windows-sys 0.48.0", ] [[package]] name = "file-per-thread-logger" -version = "0.1.6" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84f2e425d9790201ba4af4630191feac6dcc98765b118d4d18e91d23c2353866" +checksum = "8a3cc21c33af89af0930c8cae4ade5e6fdc17b5d2c97b3d2e2edb67a1cf683f3" dependencies = [ "env_logger", "log", @@ -2183,13 +2181,13 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.3.5", "windows-sys 0.48.0", ] @@ -2207,9 +2205,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" dependencies = [ "crc32fast", "miniz_oxide", @@ -2249,43 +2247,32 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] [[package]] name = "fs-set-times" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7df62ee66ee2d532ea8d567b5a3f0d03ecd64636b98bad5be1e93dcc918b92aa" -dependencies = [ - "io-lifetimes 0.5.3", - "rustix 0.33.7", - "winapi", -] - -[[package]] -name = "fs-set-times" -version = "0.18.1" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "857cf27edcb26c2a36d84b2954019573d335bb289876113aceacacdca47a4fd4" +checksum = "6d167b646a876ba8fda6b50ac645cfd96242553cbaf0ca4fccaa39afcbf0801f" dependencies = [ - "io-lifetimes 1.0.10", - "rustix 0.36.13", - "windows-sys 0.45.0", + "io-lifetimes 1.0.11", + "rustix 0.38.10", + "windows-sys 0.48.0", ] [[package]] name = "fs-set-times" -version = "0.19.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7833d0f115a013d51c55950a3b09d30e4b057be9961b709acb9b5b17a1108861" +checksum = "dd738b84894214045e8414eaded76359b4a5773f0a0a56b16575110739cdcf39" dependencies = [ - "io-lifetimes 1.0.10", - "rustix 0.37.18", + "io-lifetimes 2.0.2", + "rustix 0.38.10", "windows-sys 0.48.0", ] @@ -2361,7 +2348,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.29", ] [[package]] @@ -2403,6 +2390,19 @@ dependencies = [ "byteorder", ] +[[package]] +name = "fxprof-processed-profile" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27d12c0aed7f1e24276a241aadc4cb8ea9f83000f34bc062b7cc2d51e3b0fabd" +dependencies = [ + "bitflags 2.4.0", + "debugid", + "fxhash", + "serde", + "serde_json", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -2426,9 +2426,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -2461,15 +2461,21 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" dependencies = [ "fallible-iterator", - "indexmap", + "indexmap 1.9.3", "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" + [[package]] name = "gloo-timers" version = "0.2.6" @@ -2493,9 +2499,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.18" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f8a914c2987b688368b5138aa05321db91f4090cf26118185672ad588bce21" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes 1.4.0", "fnv", @@ -2503,7 +2509,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", "tokio-util", @@ -2525,6 +2531,12 @@ dependencies = [ "ahash", ] +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + [[package]] name = "heck" version = "0.3.3" @@ -2542,18 +2554,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "hex" @@ -2587,7 +2590,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", ] [[package]] @@ -2656,9 +2659,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -2668,9 +2671,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes 1.4.0", "futures-channel", @@ -2699,8 +2702,8 @@ dependencies = [ "http", "hyper", "log", - "rustls 0.20.8", - "rustls-native-certs 0.6.2", + "rustls 0.20.9", + "rustls-native-certs 0.6.3", "tokio", "tokio-rustls", ] @@ -2732,9 +2735,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.56" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -2746,12 +2749,11 @@ dependencies = [ [[package]] name = "iana-time-zone-haiku" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "cxx", - "cxx-build", + "cc", ] [[package]] @@ -2768,9 +2770,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -2787,6 +2789,16 @@ dependencies = [ "serde", ] +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", +] + [[package]] name = "infer" version = "0.2.3" @@ -2804,56 +2816,55 @@ dependencies = [ [[package]] name = "io-extras" -version = "0.13.2" +version = "0.17.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c937cc9891c12eaa8c63ad347e4a288364b1328b924886970b47a14ab8f8f8" +checksum = "fde93d48f0d9277f977a333eca8313695ddd5301dc96f7e02aeddcb0dd99096f" dependencies = [ - "io-lifetimes 0.5.3", - "winapi", + "io-lifetimes 1.0.11", + "windows-sys 0.48.0", ] [[package]] name = "io-extras" -version = "0.17.4" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fde93d48f0d9277f977a333eca8313695ddd5301dc96f7e02aeddcb0dd99096f" +checksum = "9d3c230ee517ee76b1cc593b52939ff68deda3fae9e41eca426c6b4993df51c4" dependencies = [ - "io-lifetimes 1.0.10", + "io-lifetimes 2.0.2", "windows-sys 0.48.0", ] [[package]] name = "io-lifetimes" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec58677acfea8a15352d42fc87d11d63596ade9239e0a7c9352914417515dbe6" - -[[package]] -name = "io-lifetimes" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi", "libc", "windows-sys 0.48.0", ] +[[package]] +name = "io-lifetimes" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bffb4def18c48926ccac55c1223e02865ce1a821751a95920448662696e7472c" + [[package]] name = "ipnet" -version = "2.7.2" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "is-terminal" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes 1.0.10", - "rustix 0.37.18", + "hermit-abi", + "rustix 0.38.10", "windows-sys 0.48.0", ] @@ -2918,15 +2929,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "ittapi" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e648c437172ce7d3ac35ca11a068755072054826fa455a916b43524fa4a62a7" +checksum = "41e0d0b7b3b53d92a7e8b80ede3400112a6b8b4c98d1f5b8b16bb787c780582c" dependencies = [ "anyhow", "ittapi-sys", @@ -2935,9 +2946,9 @@ dependencies = [ [[package]] name = "ittapi-sys" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9b32a4d23f72548178dde54f3c12c6b6a08598e25575c0d0fa5bd861e0dc1a5" +checksum = "f2f8763c96e54e6d6a0dccc2990d8b5e33e3313aaeae6185921a3f4c1614a77c" dependencies = [ "cc", ] @@ -2953,9 +2964,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.61" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] @@ -2996,11 +3007,10 @@ checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libcgroups" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f6fef16f505466473eeeee906244e03a437beaf41ccd85c39355b4077890c9" +source = "git+https://github.com/containers/youki?rev=09e67372a892f22a89eeef62ff429c3cbcac6d41#09e67372a892f22a89eeef62ff429c3cbcac6d41" dependencies = [ "fixedbitset 0.4.2", - "nix 0.26.2", + "nix 0.26.4", "oci-spec", "procfs", "serde", @@ -3011,18 +3021,16 @@ dependencies = [ [[package]] name = "libcontainer" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac48a05819bd5bd31390bd1874f5a94f711c248677fc908801de4789bdd1fbad" +source = "git+https://github.com/containers/youki?rev=09e67372a892f22a89eeef62ff429c3cbcac6d41#09e67372a892f22a89eeef62ff429c3cbcac6d41" dependencies = [ "bitflags 2.4.0", "caps", "chrono", - "clone3", "fastrand 2.0.0", "futures", "libc", "libcgroups", - "nix 0.26.2", + "nix 0.26.4", "oci-spec", "once_cell", "prctl", @@ -3049,9 +3057,9 @@ dependencies = [ [[package]] name = "libnghttp2-sys" -version = "0.1.7+1.45.0" +version = "0.1.8+1.55.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57ed28aba195b38d5ff02b9170cbff627e336a20925e43b4945390401c5dc93f" +checksum = "4fae956c192dadcdb5dace96db71fa0b827333cce7c7b38dc71446f024d8a340" dependencies = [ "cc", "libc", @@ -3059,9 +3067,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.9" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ee889ecc9568871456d42f603d6a0ce59ff328d291063a45cbdf0036baf6db" +checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" dependencies = [ "cc", "cmake", @@ -3070,38 +3078,29 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "link-cplusplus" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" -dependencies = [ - "cc", -] - [[package]] name = "linux-raw-sys" -version = "0.0.42" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5284f00d480e1c39af34e72f8ad60b94f47007e3481cd3b731c1d67190ddc7b7" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "linux-raw-sys" -version = "0.1.4" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.3.6" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b64f40e5e03e0d54f03845c8197d0291253cdbedfb1cb46b13c2c117554a9f4c" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ "autocfg", "scopeguard", @@ -3109,11 +3108,10 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" dependencies = [ - "cfg-if 1.0.0", "value-bag", ] @@ -3137,9 +3135,9 @@ dependencies = [ [[package]] name = "matchit" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" +checksum = "ed1202b2a6f884ae56f04cff409ab315c5ce26b5e58d7412e484f01fd52f52ef" [[package]] name = "maybe-owned" @@ -3153,7 +3151,7 @@ version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", ] [[package]] @@ -3164,9 +3162,9 @@ checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "5486aed0026218e61b8a01d5fbd5a0a134649abb71a0e53b7bc088529dced86e" [[package]] name = "memfd" @@ -3174,7 +3172,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" dependencies = [ - "rustix 0.37.18", + "rustix 0.37.23", ] [[package]] @@ -3204,6 +3202,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + [[package]] name = "mime" version = "0.3.17" @@ -3231,14 +3238,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -3308,7 +3315,7 @@ dependencies = [ "serde_json", "serde_nanos", "serde_repr", - "time 0.3.20", + "time 0.3.28", "url", "webpki 0.21.4", "winapi", @@ -3340,28 +3347,26 @@ dependencies = [ [[package]] name = "nix" -version = "0.25.1" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ - "autocfg", "bitflags 1.3.2", "cfg-if 1.0.0", "libc", + "memoffset 0.7.1", + "pin-utils", ] [[package]] name = "nix" -version = "0.26.2" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "cfg-if 1.0.0", "libc", - "memoffset 0.7.1", - "pin-utils", - "static_assertions", ] [[package]] @@ -3373,7 +3378,7 @@ dependencies = [ "byteorder", "data-encoding", "ed25519-dalek", - "getrandom 0.2.9", + "getrandom 0.2.10", "log", "rand 0.8.5", "signatory", @@ -3411,20 +3416,20 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi", "libc", ] @@ -3439,13 +3444,22 @@ dependencies = [ [[package]] name = "object" -version = "0.30.3" +version = "0.30.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" +checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" dependencies = [ "crc32fast", "hashbrown 0.13.2", - "indexmap", + "indexmap 1.9.3", + "memchr", +] + +[[package]] +name = "object" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" +dependencies = [ "memchr", ] @@ -3476,11 +3490,11 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.52" +version = "0.10.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b8574602df80f7b85fdfc5392fa884a4e3b3f4f35402c070ab34c3d3f78d56" +checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "cfg-if 1.0.0", "foreign-types", "libc", @@ -3497,7 +3511,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.29", ] [[package]] @@ -3508,18 +3522,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "111.25.3+1.1.1t" +version = "111.27.0+1.1.1v" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "924757a6a226bf60da5f7dd0311a34d2b52283dd82ddeb103208ddc66362f80c" +checksum = "06e8f197c82d7511c5b014030c9b1efeda40d7d5f99d23b4ceed3524a5e63f02" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.87" +version = "0.9.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e17f59264b2809d77ae94f0e1ebabc434773f370d6ca667bd223ea10e06cc7e" +checksum = "db7e971c2c2bba161b2d2fdf37080177eff520b3bc044787c7f1f5f9e78d869b" dependencies = [ "cc", "libc", @@ -3538,15 +3552,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "output_vt100" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66" -dependencies = [ - "winapi", -] - [[package]] name = "outref" version = "0.5.1" @@ -3587,22 +3592,22 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.7" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.3.5", "smallvec", - "windows-sys 0.45.0", + "windows-targets 0.48.5", ] [[package]] name = "paste" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pem-rfc7468" @@ -3615,9 +3620,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "petgraph" @@ -3626,62 +3631,62 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" dependencies = [ "fixedbitset 0.2.0", - "indexmap", + "indexmap 1.9.3", ] [[package]] name = "petgraph" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset 0.4.2", - "indexmap", + "indexmap 2.0.0", ] [[package]] name = "phf" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928c6535de93548188ef63bb7c4036bd415cd8f36ad25af44b9789b2ee72a48c" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ "phf_shared", ] [[package]] name = "phf_shared" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fb5f6f826b772a8d4c0394209441e7d37cbbb967ae9c7e0e8134365c9ee676" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ "siphasher", ] [[package]] name = "pin-project" -version = "1.0.12" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.12" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.29", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -3736,9 +3741,9 @@ dependencies = [ [[package]] name = "postgres" -version = "0.19.5" +version = "0.19.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bed5017bc2ff49649c0075d0d7a9d676933c1292480c1d137776fb205b5cd18" +checksum = "2843af30d9b6dccec9f8779eb50d56cfbec54b38c7b1bbaf50b37d6c8a4f8959" dependencies = [ "bytes 1.4.0", "fallible-iterator", @@ -3750,11 +3755,11 @@ dependencies = [ [[package]] name = "postgres-protocol" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b7fa9f396f51dffd61546fd8573ee20592287996568e6175ceb0f8699ad75d" +checksum = "49b6c5ef183cd3ab4ba005f1ca64c21e8bd97ce4699cfea9e8d9a2c4958ca520" dependencies = [ - "base64 0.21.0", + "base64 0.21.3", "byteorder", "bytes 1.4.0", "fallible-iterator", @@ -3762,15 +3767,15 @@ dependencies = [ "md-5", "memchr", "rand 0.8.5", - "sha2 0.10.6", + "sha2 0.10.7", "stringprep", ] [[package]] name = "postgres-types" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f028f05971fe20f512bcc679e2c10227e57809a3af86a7606304435bc8896cd6" +checksum = "8d2234cdee9408b523530a9b6d2d6b373d1db34f6a8e51dc03ded1828d7fb67c" dependencies = [ "bytes 1.4.0", "fallible-iterator", @@ -3790,18 +3795,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "059a34f111a9dee2ce1ac2826a68b24601c4298cfeb1a587c3cb493d5ab46f52" dependencies = [ "libc", - "nix 0.26.2", + "nix 0.27.1", ] [[package]] name = "pretty_assertions" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a25e9bcb20aa780fd0bb16b72403a9064d6b3f22f026946029acb941a50af755" +checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" dependencies = [ - "ctor", "diff", - "output_vt100", "yansi", ] @@ -3847,9 +3850,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.56" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] @@ -3866,7 +3869,7 @@ dependencies = [ "flate2", "hex", "lazy_static", - "rustix 0.36.13", + "rustix 0.36.15", ] [[package]] @@ -3919,7 +3922,7 @@ dependencies = [ "lazy_static", "log", "multimap", - "petgraph 0.6.3", + "petgraph 0.6.4", "prettyplease", "prost 0.11.9", "prost-types 0.11.9", @@ -4022,7 +4025,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d39b14605eaa1f6a340aec7f320b34064feb26c93aec35d6a9a2272a8ddfa49" dependencies = [ "anyhow", - "indexmap", + "indexmap 1.9.3", "log", "protobuf 3.2.0", "protobuf-support", @@ -4072,9 +4075,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.26" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -4138,7 +4141,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", ] [[package]] @@ -4210,33 +4213,34 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", "redox_syscall 0.2.16", "thiserror", ] [[package]] name = "regalloc2" -version = "0.6.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80535183cae11b149d618fbd3c37e38d7cda589d82d7769e196ca9a9042d7621" +checksum = "5b4dcbd3a2ae7fb94b5813fa0e957c6ab51bf5d0a8ee1b69e0c2d0f1e6eb8485" dependencies = [ - "fxhash", + "hashbrown 0.13.2", "log", + "rustc-hash", "slice-group-by", "smallvec", ] [[package]] name = "regex" -version = "1.9.3" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" +checksum = "12de2eff854e5fa4b1295edd650e227e9d8fb0c9e90b12e7f36d6a6811791a29" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.6", - "regex-syntax 0.7.4", + "regex-automata 0.3.7", + "regex-syntax 0.7.5", ] [[package]] @@ -4250,13 +4254,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" +checksum = "49530408a136e16e5b486e883fbb6ba058e8e4e8ae6621a77b048b314336e629" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.4", + "regex-syntax 0.7.5", ] [[package]] @@ -4267,17 +4271,17 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "reqwest" -version = "0.11.17" +version = "0.11.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13293b639a097af28fc8a90f22add145a9c954e49d77da06263d58cf44d5fb91" +checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" dependencies = [ - "base64 0.21.0", + "base64 0.21.3", "bytes 1.4.0", "encoding_rs", "futures-core", @@ -4375,6 +4379,12 @@ version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + [[package]] name = "rustc_version" version = "0.2.3" @@ -4390,51 +4400,50 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.17", + "semver 1.0.18", ] [[package]] name = "rustix" -version = "0.33.7" +version = "0.36.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938a344304321a9da4973b9ff4f9f8db9caf4597dfd9dda6a60b523340a0fff0" +checksum = "c37f1bd5ef1b5422177b7646cba67430579cfe2ace80f284fee876bca52ad941" dependencies = [ "bitflags 1.3.2", - "errno 0.2.8", - "io-lifetimes 0.5.3", - "itoa", + "errno", + "io-lifetimes 1.0.11", "libc", - "linux-raw-sys 0.0.42", - "once_cell", - "winapi", + "linux-raw-sys 0.1.4", + "windows-sys 0.45.0", ] [[package]] name = "rustix" -version = "0.36.13" +version = "0.37.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a38f9520be93aba504e8ca974197f46158de5dcaa9fa04b57c57cd6a679d658" +checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" dependencies = [ "bitflags 1.3.2", - "errno 0.3.1", - "io-lifetimes 1.0.10", + "errno", + "io-lifetimes 1.0.11", + "itoa", "libc", - "linux-raw-sys 0.1.4", - "windows-sys 0.45.0", + "linux-raw-sys 0.3.8", + "once_cell", + "windows-sys 0.48.0", ] [[package]] name = "rustix" -version = "0.37.18" +version = "0.38.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bbfc1d1c7c40c01715f47d71444744a81669ca84e8b63e25a55e169b1f86433" +checksum = "ed6248e1caa625eb708e266e06159f135e8c26f2bb7ceb72dc4b2766d0340964" dependencies = [ - "bitflags 1.3.2", - "errno 0.3.1", - "io-lifetimes 1.0.10", + "bitflags 2.4.0", + "errno", "itoa", "libc", - "linux-raw-sys 0.3.6", + "linux-raw-sys 0.4.5", "once_cell", "windows-sys 0.48.0", ] @@ -4454,14 +4463,14 @@ dependencies = [ [[package]] name = "rustls" -version = "0.20.8" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", "ring", "sct 0.7.0", - "webpki 0.22.0", + "webpki 0.22.1", ] [[package]] @@ -4478,12 +4487,12 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls-pemfile 1.0.2", + "rustls-pemfile 1.0.3", "schannel", "security-framework", ] @@ -4499,24 +4508,24 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.0", + "base64 0.21.3", ] [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "safe-path" @@ -4529,24 +4538,18 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "scratch" -version = "1.0.5" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" @@ -4570,9 +4573,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.8.2" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -4583,9 +4586,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.8.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -4602,9 +4605,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" [[package]] name = "semver-parser" @@ -4614,9 +4617,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.160" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] @@ -4635,20 +4638,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.160" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.29", ] [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" dependencies = [ "itoa", "ryu", @@ -4677,20 +4680,20 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.12" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" +checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.29", ] [[package]] name = "serde_spanned" -version = "0.6.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0efd8caf556a6cebd3b285caf480045fcc1ac04f6bd786b09a6f11af30c4fcf4" +checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" dependencies = [ "serde", ] @@ -4724,7 +4727,7 @@ checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.6", + "digest 0.10.7", ] [[package]] @@ -4748,13 +4751,13 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.6", + "digest 0.10.7", ] [[package]] @@ -4789,9 +4792,9 @@ dependencies = [ [[package]] name = "signal-hook" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" dependencies = [ "libc", "signal-hook-registry", @@ -4826,15 +4829,15 @@ checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" [[package]] name = "siphasher" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] @@ -4847,8 +4850,8 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slight" -version = "0.5.0" -source = "git+https://github.com/deislabs/spiderlightning#a9f1afbd4009cda6f89e7987588104d7b57ce0fc" +version = "0.5.1" +source = "git+https://github.com/deislabs/spiderlightning#88b5089d30e873cc190e614b5c2eafcaac1f97d1" dependencies = [ "anyhow", "as-any", @@ -4870,7 +4873,7 @@ dependencies = [ "slight-sql", "tar", "tokio", - "toml 0.7.3", + "toml 0.7.6", "tracing", "tracing-subscriber", "wit-bindgen-wasmtime 0.2.0 (git+https://github.com/fermyon/wit-bindgen-backport)", @@ -4880,7 +4883,7 @@ dependencies = [ [[package]] name = "slight-blob-store" version = "0.1.0" -source = "git+https://github.com/deislabs/spiderlightning#a9f1afbd4009cda6f89e7987588104d7b57ce0fc" +source = "git+https://github.com/deislabs/spiderlightning#88b5089d30e873cc190e614b5c2eafcaac1f97d1" dependencies = [ "anyhow", "async-trait", @@ -4902,7 +4905,7 @@ dependencies = [ [[package]] name = "slight-common" version = "0.1.0" -source = "git+https://github.com/deislabs/spiderlightning#a9f1afbd4009cda6f89e7987588104d7b57ce0fc" +source = "git+https://github.com/deislabs/spiderlightning#88b5089d30e873cc190e614b5c2eafcaac1f97d1" dependencies = [ "anyhow", "as-any", @@ -4914,22 +4917,22 @@ dependencies = [ [[package]] name = "slight-core" -version = "0.5.0" -source = "git+https://github.com/deislabs/spiderlightning#a9f1afbd4009cda6f89e7987588104d7b57ce0fc" +version = "0.5.1" +source = "git+https://github.com/deislabs/spiderlightning#88b5089d30e873cc190e614b5c2eafcaac1f97d1" dependencies = [ "anyhow", "clap", "rand 0.8.5", - "semver 1.0.17", + "semver 1.0.18", "short-crypt", "slight-file", - "toml 0.7.3", + "toml 0.7.6", ] [[package]] name = "slight-distributed-locking" version = "0.1.0" -source = "git+https://github.com/deislabs/spiderlightning#a9f1afbd4009cda6f89e7987588104d7b57ce0fc" +source = "git+https://github.com/deislabs/spiderlightning#88b5089d30e873cc190e614b5c2eafcaac1f97d1" dependencies = [ "anyhow", "async-trait", @@ -4947,31 +4950,31 @@ dependencies = [ [[package]] name = "slight-file" version = "0.1.0" -source = "git+https://github.com/deislabs/spiderlightning#a9f1afbd4009cda6f89e7987588104d7b57ce0fc" +source = "git+https://github.com/deislabs/spiderlightning#88b5089d30e873cc190e614b5c2eafcaac1f97d1" dependencies = [ "anyhow", "serde", - "toml 0.7.3", + "toml 0.7.6", "tracing", ] [[package]] name = "slight-http-api" version = "0.1.0" -source = "git+https://github.com/deislabs/spiderlightning#a9f1afbd4009cda6f89e7987588104d7b57ce0fc" +source = "git+https://github.com/deislabs/spiderlightning#88b5089d30e873cc190e614b5c2eafcaac1f97d1" dependencies = [ "anyhow", "async-trait", "hyper", "wasmtime", - "wit-bindgen-wasmtime 0.2.0 (git+https://github.com/danbugs/wit-bindgen?branch=backport-http-server)", + "wit-bindgen-wasmtime 0.2.0 (git+https://github.com/mossaka/wit-bindgen?branch=backport-http-server)", "wit-error-rs", ] [[package]] name = "slight-http-client" version = "0.1.0" -source = "git+https://github.com/deislabs/spiderlightning#a9f1afbd4009cda6f89e7987588104d7b57ce0fc" +source = "git+https://github.com/deislabs/spiderlightning#88b5089d30e873cc190e614b5c2eafcaac1f97d1" dependencies = [ "anyhow", "async-trait", @@ -4984,7 +4987,7 @@ dependencies = [ [[package]] name = "slight-http-server" version = "0.1.0" -source = "git+https://github.com/deislabs/spiderlightning#a9f1afbd4009cda6f89e7987588104d7b57ce0fc" +source = "git+https://github.com/deislabs/spiderlightning#88b5089d30e873cc190e614b5c2eafcaac1f97d1" dependencies = [ "anyhow", "crossbeam-channel", @@ -4998,14 +5001,14 @@ dependencies = [ "tokio", "tracing", "url", - "wit-bindgen-wasmtime 0.2.0 (git+https://github.com/danbugs/wit-bindgen?branch=backport-http-server)", + "wit-bindgen-wasmtime 0.2.0 (git+https://github.com/mossaka/wit-bindgen?branch=backport-http-server)", "wit-error-rs", ] [[package]] name = "slight-keyvalue" version = "0.1.0" -source = "git+https://github.com/deislabs/spiderlightning#a9f1afbd4009cda6f89e7987588104d7b57ce0fc" +source = "git+https://github.com/deislabs/spiderlightning#88b5089d30e873cc190e614b5c2eafcaac1f97d1" dependencies = [ "anyhow", "async-trait", @@ -5029,7 +5032,7 @@ dependencies = [ [[package]] name = "slight-messaging" version = "0.1.0" -source = "git+https://github.com/deislabs/spiderlightning#a9f1afbd4009cda6f89e7987588104d7b57ce0fc" +source = "git+https://github.com/deislabs/spiderlightning#88b5089d30e873cc190e614b5c2eafcaac1f97d1" dependencies = [ "anyhow", "async-channel", @@ -5054,7 +5057,7 @@ dependencies = [ [[package]] name = "slight-runtime" version = "0.1.0" -source = "git+https://github.com/deislabs/spiderlightning#a9f1afbd4009cda6f89e7987588104d7b57ce0fc" +source = "git+https://github.com/deislabs/spiderlightning#88b5089d30e873cc190e614b5c2eafcaac1f97d1" dependencies = [ "anyhow", "as-any", @@ -5072,7 +5075,7 @@ dependencies = [ [[package]] name = "slight-runtime-configs" version = "0.1.0" -source = "git+https://github.com/deislabs/spiderlightning#a9f1afbd4009cda6f89e7987588104d7b57ce0fc" +source = "git+https://github.com/deislabs/spiderlightning#88b5089d30e873cc190e614b5c2eafcaac1f97d1" dependencies = [ "anyhow", "async-trait", @@ -5083,7 +5086,7 @@ dependencies = [ "slight-common", "slight-core", "slight-file", - "toml 0.7.3", + "toml 0.7.6", "tracing", "wit-bindgen-wasmtime 0.2.0 (git+https://github.com/fermyon/wit-bindgen-backport)", "wit-error-rs", @@ -5092,7 +5095,7 @@ dependencies = [ [[package]] name = "slight-sql" version = "0.1.0" -source = "git+https://github.com/deislabs/spiderlightning#a9f1afbd4009cda6f89e7987588104d7b57ce0fc" +source = "git+https://github.com/deislabs/spiderlightning#88b5089d30e873cc190e614b5c2eafcaac1f97d1" dependencies = [ "anyhow", "async-trait", @@ -5120,9 +5123,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "socket2" @@ -5136,9 +5139,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d283f86695ae989d1e18440a943880967156325ba025f05049946bff47bcc2b" +checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" dependencies = [ "libc", "windows-sys 0.48.0", @@ -5168,6 +5171,12 @@ dependencies = [ "der", ] +[[package]] +name = "sptr" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b9b39299b249ad65f3b7e96443bad61c02ca5cd3589f46cb6d610a0fd6c0d6a" + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -5183,12 +5192,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - [[package]] name = "stdweb" version = "0.4.20" @@ -5240,9 +5243,9 @@ checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" [[package]] name = "stringprep" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" +checksum = "db3737bde7edce97102e0e2b15365bf7a20bfdb5f60f4f9e8d7004258a51a8da" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -5256,9 +5259,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "subtle" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "surf" @@ -5271,7 +5274,7 @@ dependencies = [ "cfg-if 1.0.0", "encoding_rs", "futures-util", - "getrandom 0.2.9", + "getrandom 0.2.10", "http-client", "http-types", "log", @@ -5296,9 +5299,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.15" +version = "2.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" +checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" dependencies = [ "proc-macro2", "quote", @@ -5313,25 +5316,25 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "system-interface" -version = "0.25.7" +version = "0.25.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928ebd55ab758962e230f51ca63735c5b283f26292297c81404289cda5d78631" +checksum = "10081a99cbecbc363d381b9503563785f0b02735fccbb0d4c1a2cb3d39f7e7fe" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "cap-fs-ext", - "cap-std 1.0.14", + "cap-std 1.0.15", "fd-lock", - "io-lifetimes 1.0.10", - "rustix 0.37.18", + "io-lifetimes 2.0.2", + "rustix 0.38.10", "windows-sys 0.48.0", - "winx 0.35.1", + "winx 0.36.1", ] [[package]] name = "tar" -version = "0.4.38" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" +checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" dependencies = [ "filetime", "libc", @@ -5340,21 +5343,21 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.7" +version = "0.12.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" +checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" [[package]] name = "tempfile" -version = "3.5.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if 1.0.0", - "fastrand 1.9.0", + "fastrand 2.0.0", "redox_syscall 0.3.5", - "rustix 0.37.18", - "windows-sys 0.45.0", + "rustix 0.38.10", + "windows-sys 0.48.0", ] [[package]] @@ -5368,22 +5371,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.29", ] [[package]] @@ -5424,23 +5427,24 @@ dependencies = [ [[package]] name = "time" -version = "0.3.20" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" +checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" dependencies = [ + "deranged", "itoa", "libc", "num_threads", "serde", "time-core", - "time-macros 0.2.8", + "time-macros 0.2.14", ] [[package]] name = "time-core" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" @@ -5454,9 +5458,9 @@ dependencies = [ [[package]] name = "time-macros" -version = "0.2.8" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" +checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" dependencies = [ "time-core", ] @@ -5491,11 +5495,11 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.0" +version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c786bf8134e5a3a166db9b29ab8f48134739014a3eca7bc6bfa95d673b136f" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ - "autocfg", + "backtrace", "bytes 1.4.0", "libc", "mio", @@ -5503,7 +5507,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.4.9", + "socket2 0.5.3", "tokio-macros", "windows-sys 0.48.0", ] @@ -5526,7 +5530,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.29", ] [[package]] @@ -5541,9 +5545,9 @@ dependencies = [ [[package]] name = "tokio-postgres" -version = "0.7.8" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e89f6234aa8fd43779746012fcf53603cdb91fdd8399aa0de868c2d56b6dde1" +checksum = "d340244b32d920260ae7448cb72b6e238bddc3d4f7603394e7dd46ed8e48f5b8" dependencies = [ "async-trait", "byteorder", @@ -5558,9 +5562,11 @@ dependencies = [ "pin-project-lite", "postgres-protocol", "postgres-types", - "socket2 0.5.2", + "rand 0.8.5", + "socket2 0.5.3", "tokio", "tokio-util", + "whoami", ] [[package]] @@ -5569,9 +5575,9 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls 0.20.8", + "rustls 0.20.9", "tokio", - "webpki 0.22.0", + "webpki 0.22.1", ] [[package]] @@ -5610,9 +5616,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.3" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b403acf6f2bb0859c93c7f0d967cb4a75a7ac552100f9322faf64dc047669b21" +checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" dependencies = [ "serde", "serde_spanned", @@ -5622,20 +5628,20 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.8" +version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ - "indexmap", + "indexmap 2.0.0", "serde", "serde_spanned", "toml_datetime", @@ -5695,7 +5701,7 @@ checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ "futures-core", "futures-util", - "indexmap", + "indexmap 1.9.3", "pin-project", "pin-project-lite", "rand 0.8.5", @@ -5734,20 +5740,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.29", ] [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ "once_cell", "valuable", @@ -5800,14 +5806,15 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "ttrpc" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb03d0f5219ec54d870cb3d58719a2dc0b8849405b75a2e0968b3590392a5b0" +checksum = "55ea338db445bee75c596cf8a478fbfcefad5a943c9e92a7e1c805c65ed39551" dependencies = [ "byteorder", + "crossbeam", "libc", "log", - "nix 0.26.2", + "nix 0.26.4", "protobuf 3.2.0", "protobuf-codegen 3.2.0", "thiserror", @@ -5875,9 +5882,9 @@ dependencies = [ [[package]] name = "unicase" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" dependencies = [ "version_check", ] @@ -5890,9 +5897,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" @@ -5923,9 +5930,9 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "universal-hash" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" +checksum = "8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402" dependencies = [ "generic-array", "subtle", @@ -5939,9 +5946,9 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.3.1" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", @@ -5951,9 +5958,9 @@ dependencies = [ [[package]] name = "urlencoding" -version = "2.1.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8db7427f936968176eaa7cdf81b7f98b980b18495ec28f1b5791ac3bfe3eea9" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "utf8parse" @@ -5961,13 +5968,21 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +[[package]] +name = "utils" +version = "0.9.0" +dependencies = [ + "anyhow", + "oci-spec", +] + [[package]] name = "uuid" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dad5567ad0cf5b760e5665964bec1b47dfd077ba8a2544b513f3556d3d239a2" +checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", ] [[package]] @@ -5978,13 +5993,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "value-bag" -version = "1.0.0-alpha.9" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55" -dependencies = [ - "ctor", - "version_check", -] +checksum = "d92ccd67fb88503048c01b59152a04effd0782d035a83a6d256ce6085f08f4a3" [[package]] name = "vcpkg" @@ -6012,11 +6023,10 @@ checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -6040,53 +6050,53 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasi-cap-std-sync" -version = "8.0.1" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "612510e6c7b6681f7d29ce70ef26e18349c26acd39b7d89f1727d90b7f58b20e" +checksum = "291862f1014dd7e674f93b263d57399de4dd1907ea37e74cf7d36454536ba2f0" dependencies = [ "anyhow", "async-trait", "cap-fs-ext", "cap-rand", - "cap-std 1.0.14", + "cap-std 1.0.15", "cap-time-ext", - "fs-set-times 0.18.1", + "fs-set-times 0.19.2", "io-extras 0.17.4", - "io-lifetimes 1.0.10", + "io-lifetimes 1.0.11", "is-terminal", "once_cell", - "rustix 0.36.13", + "rustix 0.37.23", "system-interface", "tracing", "wasi-common", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "wasi-common" -version = "8.0.1" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "008136464e438c5049a614b6ea1bae9f6c4d354ce9ee2b4d9a1ac6e73f31aafc" +checksum = "3b422ae2403cae9ca603864272a402cf5001dd6fef8632e090e00c4fb475741b" dependencies = [ "anyhow", "bitflags 1.3.2", "cap-rand", - "cap-std 1.0.14", + "cap-std 1.0.15", "io-extras 0.17.4", "log", - "rustix 0.36.13", + "rustix 0.37.23", "thiserror", "tracing", "wasmtime", "wiggle", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "wasm-bindgen" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -6094,24 +6104,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.29", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.34" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -6121,9 +6131,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6131,46 +6141,55 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.29", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.84" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" + +[[package]] +name = "wasm-encoder" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" +checksum = "18c41dbd92eaebf3612a39be316540b8377c871cb9bde6b064af962984912881" +dependencies = [ + "leb128", +] [[package]] name = "wasm-encoder" -version = "0.25.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eff853c4f09eec94d76af527eddad4e9de13b11d6286a1ef7134bc30135a2b7" +checksum = "b2f8e9778e04cbf44f58acc301372577375a666b966c50b03ef46144f80436a8" dependencies = [ "leb128", ] [[package]] name = "wasm-encoder" -version = "0.26.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05d0b6fcd0aeb98adf16e7975331b3c17222aa815148f5b976370ce589d80ef" +checksum = "1ba64e81215916eaeb48fee292f29401d69235d62d8b8fd92a7b2844ec5ae5f7" dependencies = [ "leb128", ] [[package]] name = "wasm-streams" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bbae3363c08332cadccd13b67db371814cd214c2524020932f0804b8cf7c078" +checksum = "b4609d447824375f43e1ffbc051b50ad8f4b3ae8219680c94452ea05eb240ac7" dependencies = [ "futures-util", "js-sys", @@ -6181,90 +6200,116 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.102.0" +version = "0.106.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48134de3d7598219ab9eaf6b91b15d8e50d31da76b8519fe4ecfcec2cf35104b" +checksum = "d014e33793cab91655fa6349b0bc974984de106b2e0f6b0dfe6f6594b260624d" dependencies = [ - "indexmap", + "indexmap 1.9.3", "url", ] [[package]] name = "wasmparser" -version = "0.103.0" +version = "0.107.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c437373cac5ea84f1113d648d51f71751ffbe3d90c00ae67618cf20d0b5ee7b" +checksum = "29e3ac9b780c7dda0cac7a52a5d6d2d6707cc6e3451c9db209b6c758f40d7acb" dependencies = [ - "indexmap", - "url", + "indexmap 1.9.3", + "semver 1.0.18", +] + +[[package]] +name = "wasmparser" +version = "0.112.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e986b010f47fcce49cf8ea5d5f9e5d2737832f12b53ae8ae785bbe895d0877bf" +dependencies = [ + "indexmap 2.0.0", + "semver 1.0.18", +] + +[[package]] +name = "wasmprinter" +version = "0.2.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34ddf5892036cd4b780d505eff1194a0cbc10ed896097656fdcea3744b5e7c2f" +dependencies = [ + "anyhow", + "wasmparser 0.112.0", ] [[package]] name = "wasmtime" -version = "8.0.1" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f907fdead3153cb9bfb7a93bbd5b62629472dc06dee83605358c64c52ed3dda9" +checksum = "cd02b992d828b91efaf2a7499b21205fe4ab3002e401e3fe0f227aaeb4001d93" dependencies = [ "anyhow", "async-trait", "bincode", + "bumpalo", "cfg-if 1.0.0", - "indexmap", + "encoding_rs", + "fxprof-processed-profile", + "indexmap 1.9.3", "libc", "log", - "object", + "object 0.30.4", "once_cell", "paste", "psm", "rayon", "serde", + "serde_json", "target-lexicon", - "wasmparser 0.102.0", + "wasmparser 0.107.0", "wasmtime-cache", "wasmtime-component-macro", + "wasmtime-component-util", "wasmtime-cranelift", "wasmtime-environ", "wasmtime-fiber", "wasmtime-jit", "wasmtime-runtime", + "wasmtime-winch", "wat", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "wasmtime-asm-macros" -version = "8.0.1" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b9daa7c14cd4fa3edbf69de994408d5f4b7b0959ac13fa69d465f6597f810d" +checksum = "284466ef356ce2d909bc0ad470b60c4d0df5df2de9084457e118131b3c779b92" dependencies = [ "cfg-if 1.0.0", ] [[package]] name = "wasmtime-cache" -version = "8.0.1" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c86437fa68626fe896e5afc69234bb2b5894949083586535f200385adfd71213" +checksum = "efc78cfe1a758d1336f447a47af6ec05e0df2c03c93440d70faf80e17fbb001e" dependencies = [ "anyhow", - "base64 0.21.0", + "base64 0.21.3", "bincode", "directories-next", "file-per-thread-logger", "log", - "rustix 0.36.13", + "rustix 0.37.23", "serde", - "sha2 0.10.6", + "sha2 0.10.7", "toml 0.5.11", - "windows-sys 0.45.0", + "windows-sys 0.48.0", "zstd", ] [[package]] name = "wasmtime-component-macro" -version = "8.0.1" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267096ed7cc93b4ab15d3daa4f195e04dbb7e71c7e5c6457ae7d52e9dd9c3607" +checksum = "b8e916103436a6d84faa4c2083e2e98612a323c2cc6147ec419124f67c764c9c" dependencies = [ "anyhow", "proc-macro2", @@ -6272,141 +6317,148 @@ dependencies = [ "syn 1.0.109", "wasmtime-component-util", "wasmtime-wit-bindgen", - "wit-parser 0.6.4", + "wit-parser 0.8.0", ] [[package]] name = "wasmtime-component-util" -version = "8.0.1" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74e02ca7a4a3c69d72b88f26f0192e333958df6892415ac9ab84dcc42c9000c2" +checksum = "f20a5135ec5ef01080e674979b02d6fa5eebaa2b0c2d6660513ee9956a1bf624" [[package]] name = "wasmtime-cranelift" -version = "8.0.1" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1cefde0cce8cb700b1b21b6298a3837dba46521affd7b8c38a9ee2c869eee04" +checksum = "8e1aa99cbf3f8edb5ad8408ba380f5ab481528ecd8a5053acf758e006d6727fd" dependencies = [ "anyhow", "cranelift-codegen", + "cranelift-control", "cranelift-entity", "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli", + "gimli 0.27.3", "log", - "object", + "object 0.30.4", "target-lexicon", "thiserror", - "wasmparser 0.102.0", + "wasmparser 0.107.0", "wasmtime-cranelift-shared", "wasmtime-environ", ] [[package]] name = "wasmtime-cranelift-shared" -version = "8.0.1" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd041e382ef5aea1b9fc78442394f1a4f6d676ce457e7076ca4cb3f397882f8b" +checksum = "cce31fd55978601acc103acbb8a26f81c89a6eae12d3a1c59f34151dfa609484" dependencies = [ "anyhow", "cranelift-codegen", + "cranelift-control", "cranelift-native", - "gimli", - "object", + "gimli 0.27.3", + "object 0.30.4", "target-lexicon", "wasmtime-environ", ] [[package]] name = "wasmtime-environ" -version = "8.0.1" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949" +checksum = "41f9e58e0ee7d43ff13e75375c726b16bce022db798d3a099a65eeaa7d7a544b" dependencies = [ "anyhow", "cranelift-entity", - "gimli", - "indexmap", + "gimli 0.27.3", + "indexmap 1.9.3", "log", - "object", + "object 0.30.4", "serde", "target-lexicon", "thiserror", - "wasmparser 0.102.0", + "wasm-encoder 0.29.0", + "wasmparser 0.107.0", + "wasmprinter", + "wasmtime-component-util", "wasmtime-types", ] [[package]] name = "wasmtime-fiber" -version = "8.0.1" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab182d5ab6273a133ab88db94d8ca86dc3e57e43d70baaa4d98f94ddbd7d10a" +checksum = "14309cbdf2c395258b124a24757c727403070c0465a28bcc780c4f82f4bca5ff" dependencies = [ "cc", "cfg-if 1.0.0", - "rustix 0.36.13", + "rustix 0.37.23", "wasmtime-asm-macros", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "wasmtime-jit" -version = "8.0.1" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de48df552cfca1c9b750002d3e07b45772dd033b0b206d5c0968496abf31244" +checksum = "5f0f2eaeb01bb67266416507829bd8e0bb60278444e4cbd048e280833ebeaa02" dependencies = [ - "addr2line", + "addr2line 0.19.0", "anyhow", "bincode", "cfg-if 1.0.0", "cpp_demangle", - "gimli", + "gimli 0.27.3", "ittapi", "log", - "object", + "object 0.30.4", "rustc-demangle", + "rustix 0.37.23", "serde", "target-lexicon", "wasmtime-environ", "wasmtime-jit-debug", "wasmtime-jit-icache-coherence", "wasmtime-runtime", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "wasmtime-jit-debug" -version = "8.0.1" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0554b84c15a27d76281d06838aed94e13a77d7bf604bbbaf548aa20eb93846" +checksum = "f42e59d62542bfb73ce30672db7eaf4084a60b434b688ac4f05b287d497de082" dependencies = [ - "object", + "object 0.30.4", "once_cell", - "rustix 0.36.13", + "rustix 0.37.23", ] [[package]] name = "wasmtime-jit-icache-coherence" -version = "8.0.1" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aecae978b13f7f67efb23bd827373ace4578f2137ec110bbf6a4a7cde4121bbd" +checksum = "2b49ceb7e2105a8ebe5614d7bbab6f6ef137a284e371633af60b34925493081f" dependencies = [ "cfg-if 1.0.0", "libc", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "wasmtime-runtime" -version = "8.0.1" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658cf6f325232b6760e202e5255d823da5e348fdea827eff0a2a22319000b441" +checksum = "3a5de4762421b0b2b19e02111ca403632852b53e506e03b4b227ffb0fbfa63c2" dependencies = [ "anyhow", "cc", "cfg-if 1.0.0", - "indexmap", + "encoding_rs", + "indexmap 1.9.3", "libc", "log", "mach", @@ -6414,49 +6466,80 @@ dependencies = [ "memoffset 0.8.0", "paste", "rand 0.8.5", - "rustix 0.36.13", + "rustix 0.37.23", + "sptr", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-fiber", "wasmtime-jit-debug", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "wasmtime-types" -version = "8.0.1" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4f6fffd2a1011887d57f07654dd112791e872e3ff4a2e626aee8059ee17f06f" +checksum = "dcbb7c138f797192f46afdd3ec16f85ef007c3bb45fa8e5174031f17b0be4c4a" dependencies = [ "cranelift-entity", "serde", "thiserror", - "wasmparser 0.102.0", + "wasmparser 0.107.0", ] [[package]] name = "wasmtime-wasi" -version = "8.0.1" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3b5cb7606625ec229f0e33394a1637b34a58ad438526eba859b5fdb422ac1e" +checksum = "01686e859249d4dffe3d7ce9957ae35bcf4161709dfafd165ee136bd54d179f1" dependencies = [ "anyhow", + "async-trait", + "bitflags 1.3.2", + "cap-fs-ext", + "cap-rand", + "cap-std 1.0.15", + "cap-time-ext", + "fs-set-times 0.19.2", + "io-extras 0.17.4", "libc", + "rustix 0.37.23", + "system-interface", + "thiserror", + "tracing", "wasi-cap-std-sync", "wasi-common", "wasmtime", "wiggle", + "windows-sys 0.48.0", +] + +[[package]] +name = "wasmtime-winch" +version = "10.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60160d8f7d2b301790730dac8ff25156c61d4fed79481e7074c21dd1283cfe2f" +dependencies = [ + "anyhow", + "cranelift-codegen", + "gimli 0.27.3", + "object 0.30.4", + "target-lexicon", + "wasmparser 0.107.0", + "wasmtime-cranelift-shared", + "wasmtime-environ", + "winch-codegen", ] [[package]] name = "wasmtime-wit-bindgen" -version = "8.0.1" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "983db9cc294d1adaa892a53ff6a0dc6605fc0ab1a4da5d8a2d2d4bde871ff7dd" +checksum = "d3334b0466a4d340de345cda83474d1d2c429770c3d667877971407672bc618a" dependencies = [ "anyhow", "heck 0.4.1", - "wit-parser 0.6.4", + "wit-parser 0.8.0", ] [[package]] @@ -6470,30 +6553,30 @@ dependencies = [ [[package]] name = "wast" -version = "57.0.0" +version = "64.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eb0f5ed17ac4421193c7477da05892c2edafd67f9639e3c11a82086416662dc" +checksum = "a259b226fd6910225aa7baeba82f9d9933b6d00f2ce1b49b80fa4214328237cc" dependencies = [ "leb128", "memchr", "unicode-width", - "wasm-encoder 0.26.0", + "wasm-encoder 0.32.0", ] [[package]] name = "wat" -version = "1.0.63" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab9ab0d87337c3be2bb6fc5cd331c4ba9fd6bcb4ee85048a0dd59ed9ecf92e53" +checksum = "53253d920ab413fca1c7dc2161d601c79b4fdf631d0ba51dd4343bf9b556c3f6" dependencies = [ - "wast 57.0.0", + "wast 64.0.0", ] [[package]] name = "web-sys" -version = "0.3.61" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ "js-sys", "wasm-bindgen", @@ -6511,9 +6594,9 @@ dependencies = [ [[package]] name = "webpki" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "f0e74f82d49d545ad128049b7e88f6576df2da6b02e9ce565c6f533be576957e" dependencies = [ "ring", "untrusted", @@ -6530,11 +6613,21 @@ dependencies = [ "once_cell", ] +[[package]] +name = "whoami" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" +dependencies = [ + "wasm-bindgen", + "web-sys", +] + [[package]] name = "wiggle" -version = "8.0.1" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b16a7462893c46c6d3dd2a1f99925953bdbb921080606e1a4c9344864492fa4" +checksum = "ea93d31f59f2b2fa4196990b684771500072d385eaac12587c63db2bc185d705" dependencies = [ "anyhow", "async-trait", @@ -6547,9 +6640,9 @@ dependencies = [ [[package]] name = "wiggle-generate" -version = "8.0.1" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489499e186ab24c8ac6d89e9934c54ced6f19bd473730e6a74f533bd67ecd905" +checksum = "7df96ee6bea595fabf0346c08c553f684b08e88fad6fdb125e6efde047024f7b" dependencies = [ "anyhow", "heck 0.4.1", @@ -6562,9 +6655,9 @@ dependencies = [ [[package]] name = "wiggle-macro" -version = "8.0.1" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9142e7fce24a4344c85a43c8b719ef434fc6155223bade553e186cb4183b6cc" +checksum = "8649011a011ecca6197c4db6ee630735062ba20595ea56ce58529b3b1c20aa2f" dependencies = [ "proc-macro2", "quote", @@ -6604,27 +6697,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows" -version = "0.48.0" +name = "winch-codegen" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "525fdd0d4e82d1bd3083bd87e8ca8014abfbdc5bf290d1d5371dac440d351e89" dependencies = [ - "windows-targets 0.48.0", + "anyhow", + "cranelift-codegen", + "gimli 0.27.3", + "regalloc2", + "smallvec", + "target-lexicon", + "wasmparser 0.107.0", + "wasmtime-environ", ] [[package]] -name = "windows-sys" -version = "0.42.0" +name = "windows" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets 0.48.5", ] [[package]] @@ -6642,7 +6736,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -6662,17 +6756,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -6683,9 +6777,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -6695,9 +6789,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -6707,9 +6801,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -6719,9 +6813,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -6731,9 +6825,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" @@ -6743,9 +6837,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -6755,63 +6849,63 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.4.6" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" dependencies = [ "memchr", ] [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi", + "cfg-if 1.0.0", + "windows-sys 0.48.0", ] [[package]] name = "winx" -version = "0.31.0" +version = "0.35.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d5973cb8cd94a77d03ad7e23bbe14889cb29805da1cec0e4aff75e21aebded" +checksum = "1c52a121f0fbf9320d5f2a9a5d82f6cb7557eda5e8b47fc3e7f359ec866ae960" dependencies = [ "bitflags 1.3.2", - "io-lifetimes 0.5.3", - "winapi", + "io-lifetimes 1.0.11", + "windows-sys 0.48.0", ] [[package]] name = "winx" -version = "0.35.1" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c52a121f0fbf9320d5f2a9a5d82f6cb7557eda5e8b47fc3e7f359ec866ae960" +checksum = "4857cedf8371f690bb6782a3e2b065c54d1b6661be068aaf3eac8b45e813fdf8" dependencies = [ - "bitflags 1.3.2", - "io-lifetimes 1.0.10", + "bitflags 2.4.0", "windows-sys 0.48.0", ] [[package]] name = "wit-bindgen-gen-core" version = "0.2.0" -source = "git+https://github.com/danbugs/wit-bindgen?branch=backport-http-server#303103066e72f52d0ef84d101cdaa009f694987d" +source = "git+https://github.com/mossaka/wit-bindgen?branch=backport-http-server#25c1bfba42cbb830c85a75bc44eab92ab875b26f" dependencies = [ "anyhow", - "wit-parser 0.2.0 (git+https://github.com/danbugs/wit-bindgen?branch=backport-http-server)", + "wit-parser 0.2.0 (git+https://github.com/mossaka/wit-bindgen?branch=backport-http-server)", ] [[package]] name = "wit-bindgen-gen-core" version = "0.2.0" -source = "git+https://github.com/fermyon/wit-bindgen-backport#ba1636af0338623b54db84e2224be9a124e231f6" +source = "git+https://github.com/fermyon/wit-bindgen-backport#b89d5079ba5b07b319631a1b191d2139f126c976" dependencies = [ "anyhow", "wit-parser 0.2.0 (git+https://github.com/fermyon/wit-bindgen-backport)", @@ -6820,16 +6914,16 @@ dependencies = [ [[package]] name = "wit-bindgen-gen-rust" version = "0.2.0" -source = "git+https://github.com/danbugs/wit-bindgen?branch=backport-http-server#303103066e72f52d0ef84d101cdaa009f694987d" +source = "git+https://github.com/mossaka/wit-bindgen?branch=backport-http-server#25c1bfba42cbb830c85a75bc44eab92ab875b26f" dependencies = [ "heck 0.3.3", - "wit-bindgen-gen-core 0.2.0 (git+https://github.com/danbugs/wit-bindgen?branch=backport-http-server)", + "wit-bindgen-gen-core 0.2.0 (git+https://github.com/mossaka/wit-bindgen?branch=backport-http-server)", ] [[package]] name = "wit-bindgen-gen-rust" version = "0.2.0" -source = "git+https://github.com/fermyon/wit-bindgen-backport#ba1636af0338623b54db84e2224be9a124e231f6" +source = "git+https://github.com/fermyon/wit-bindgen-backport#b89d5079ba5b07b319631a1b191d2139f126c976" dependencies = [ "heck 0.3.3", "wit-bindgen-gen-core 0.2.0 (git+https://github.com/fermyon/wit-bindgen-backport)", @@ -6838,17 +6932,17 @@ dependencies = [ [[package]] name = "wit-bindgen-gen-wasmtime" version = "0.2.0" -source = "git+https://github.com/danbugs/wit-bindgen?branch=backport-http-server#303103066e72f52d0ef84d101cdaa009f694987d" +source = "git+https://github.com/mossaka/wit-bindgen?branch=backport-http-server#25c1bfba42cbb830c85a75bc44eab92ab875b26f" dependencies = [ "heck 0.3.3", - "wit-bindgen-gen-core 0.2.0 (git+https://github.com/danbugs/wit-bindgen?branch=backport-http-server)", - "wit-bindgen-gen-rust 0.2.0 (git+https://github.com/danbugs/wit-bindgen?branch=backport-http-server)", + "wit-bindgen-gen-core 0.2.0 (git+https://github.com/mossaka/wit-bindgen?branch=backport-http-server)", + "wit-bindgen-gen-rust 0.2.0 (git+https://github.com/mossaka/wit-bindgen?branch=backport-http-server)", ] [[package]] name = "wit-bindgen-gen-wasmtime" version = "0.2.0" -source = "git+https://github.com/fermyon/wit-bindgen-backport#ba1636af0338623b54db84e2224be9a124e231f6" +source = "git+https://github.com/fermyon/wit-bindgen-backport#b89d5079ba5b07b319631a1b191d2139f126c976" dependencies = [ "heck 0.3.3", "wit-bindgen-gen-core 0.2.0 (git+https://github.com/fermyon/wit-bindgen-backport)", @@ -6858,20 +6952,20 @@ dependencies = [ [[package]] name = "wit-bindgen-wasmtime" version = "0.2.0" -source = "git+https://github.com/danbugs/wit-bindgen?branch=backport-http-server#303103066e72f52d0ef84d101cdaa009f694987d" +source = "git+https://github.com/mossaka/wit-bindgen?branch=backport-http-server#25c1bfba42cbb830c85a75bc44eab92ab875b26f" dependencies = [ "anyhow", "async-trait", "bitflags 1.3.2", "thiserror", "wasmtime", - "wit-bindgen-wasmtime-impl 0.2.0 (git+https://github.com/danbugs/wit-bindgen?branch=backport-http-server)", + "wit-bindgen-wasmtime-impl 0.2.0 (git+https://github.com/mossaka/wit-bindgen?branch=backport-http-server)", ] [[package]] name = "wit-bindgen-wasmtime" version = "0.2.0" -source = "git+https://github.com/fermyon/wit-bindgen-backport#ba1636af0338623b54db84e2224be9a124e231f6" +source = "git+https://github.com/fermyon/wit-bindgen-backport#b89d5079ba5b07b319631a1b191d2139f126c976" dependencies = [ "anyhow", "async-trait", @@ -6884,18 +6978,18 @@ dependencies = [ [[package]] name = "wit-bindgen-wasmtime-impl" version = "0.2.0" -source = "git+https://github.com/danbugs/wit-bindgen?branch=backport-http-server#303103066e72f52d0ef84d101cdaa009f694987d" +source = "git+https://github.com/mossaka/wit-bindgen?branch=backport-http-server#25c1bfba42cbb830c85a75bc44eab92ab875b26f" dependencies = [ "proc-macro2", "syn 1.0.109", - "wit-bindgen-gen-core 0.2.0 (git+https://github.com/danbugs/wit-bindgen?branch=backport-http-server)", - "wit-bindgen-gen-wasmtime 0.2.0 (git+https://github.com/danbugs/wit-bindgen?branch=backport-http-server)", + "wit-bindgen-gen-core 0.2.0 (git+https://github.com/mossaka/wit-bindgen?branch=backport-http-server)", + "wit-bindgen-gen-wasmtime 0.2.0 (git+https://github.com/mossaka/wit-bindgen?branch=backport-http-server)", ] [[package]] name = "wit-bindgen-wasmtime-impl" version = "0.2.0" -source = "git+https://github.com/fermyon/wit-bindgen-backport#ba1636af0338623b54db84e2224be9a124e231f6" +source = "git+https://github.com/fermyon/wit-bindgen-backport#b89d5079ba5b07b319631a1b191d2139f126c976" dependencies = [ "proc-macro2", "syn 1.0.109", @@ -6915,7 +7009,7 @@ dependencies = [ [[package]] name = "wit-parser" version = "0.2.0" -source = "git+https://github.com/danbugs/wit-bindgen?branch=backport-http-server#303103066e72f52d0ef84d101cdaa009f694987d" +source = "git+https://github.com/mossaka/wit-bindgen?branch=backport-http-server#25c1bfba42cbb830c85a75bc44eab92ab875b26f" dependencies = [ "anyhow", "id-arena", @@ -6927,7 +7021,7 @@ dependencies = [ [[package]] name = "wit-parser" version = "0.2.0" -source = "git+https://github.com/fermyon/wit-bindgen-backport#ba1636af0338623b54db84e2224be9a124e231f6" +source = "git+https://github.com/fermyon/wit-bindgen-backport#b89d5079ba5b07b319631a1b191d2139f126c976" dependencies = [ "anyhow", "id-arena", @@ -6938,15 +7032,16 @@ dependencies = [ [[package]] name = "wit-parser" -version = "0.6.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f887c3da527a51b321076ebe6a7513026a4757b6d4d144259946552d6fc728b3" +checksum = "6daec9f093dbaea0e94043eeb92ece327bbbe70c86b1f41aca9bbfefd7f050f0" dependencies = [ "anyhow", "id-arena", - "indexmap", + "indexmap 1.9.3", "log", "pulldown-cmark", + "semver 1.0.18", "unicode-xid", "url", ] @@ -6965,34 +7060,34 @@ dependencies = [ [[package]] name = "wizer" -version = "1.6.1-beta.4" -source = "git+https://github.com/bytecodealliance/wizer?rev=3acc39cc561e7f985f163a2c8e89259a0dfc2f2f#3acc39cc561e7f985f163a2c8e89259a0dfc2f2f" +version = "3.0.1" +source = "git+https://github.com/bytecodealliance/wizer?rev=c7e07054d04c27e7f1bfe72e16dae6d73b3f3023#c7e07054d04c27e7f1bfe72e16dae6d73b3f3023" dependencies = [ "anyhow", - "cap-std 0.24.4", + "cap-std 2.0.0", "log", "rayon", "wasi-cap-std-sync", - "wasm-encoder 0.25.0", - "wasmparser 0.103.0", + "wasm-encoder 0.30.0", + "wasmparser 0.106.0", "wasmtime", "wasmtime-wasi", ] [[package]] name = "xattr" -version = "0.2.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" +checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" dependencies = [ "libc", ] [[package]] name = "xml-rs" -version = "0.8.4" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" +checksum = "47430998a7b5d499ccee752b41567bc3afc57e1327dc855b1a2aa44ce29b5fa1" [[package]] name = "xmlparser" @@ -7023,7 +7118,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.29", ] [[package]] diff --git a/containerd-shim-slight-v1/Cargo.toml b/containerd-shim-slight-v1/Cargo.toml index c1e2a290..ed8f7b37 100644 --- a/containerd-shim-slight-v1/Cargo.toml +++ b/containerd-shim-slight-v1/Cargo.toml @@ -14,23 +14,24 @@ Containerd shim for running Slight workloads. chrono = "0.4" clap = { version = "4.1", features = ["derive", "env"] } containerd-shim = "0.5.0" -containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", rev = "c83ea9629bcc2377f54468700e6abbe4f5320b56", features = ["cgroupsv2"]} +containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", rev = "7e978edeaf34b54efb895738357c805cf888b76d", features = ["cgroupsv2"] } +libcontainer = { git = "https://github.com/containers/youki", rev = "09e67372a892f22a89eeef62ff429c3cbcac6d41", features = ["v2"], default-features = false } log = "0.4" tokio = { version = "1", features = [ "full" ] } tokio-util = { version = "0.7", features = [ "codec" ]} -wasmtime = "8.0" +wasmtime = "10.0" toml = "0.7" tracing-subscriber = { version = "0.3", features = ["env-filter"] } tracing = { version = "0.1", features = ["log"] } -slight = { git = "https://github.com/deislabs/spiderlightning", version = "0.5.0" } +slight = { git = "https://github.com/deislabs/spiderlightning", version = "0.5.1" } openssl = { version = "0.10", features = ["vendored"] } -libcontainer = { version = "0.1", features = ["v2"], default-features = false } oci-spec = "0.6.2" libc = "0.2.147" nix = "0.26.2" anyhow = "1.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" +utils = { path = "../utils" } [dependencies.openssl-sys] features = ["vendored"] diff --git a/containerd-shim-slight-v1/src/executor.rs b/containerd-shim-slight-v1/src/executor.rs index 51d4e1c2..30680e49 100644 --- a/containerd-shim-slight-v1/src/executor.rs +++ b/containerd-shim-slight-v1/src/executor.rs @@ -1,80 +1,58 @@ -use anyhow::Result; -use log::info; -use nix::unistd::{dup, dup2}; -use std::{os::fd::RawFd, path::PathBuf}; +use anyhow::{Context, Result}; +use std::path::PathBuf; use tokio::runtime::Runtime; -use containerd_shim_wasm::sandbox::oci; -use libc::{STDERR_FILENO, STDIN_FILENO, STDOUT_FILENO}; -use libcontainer::workload::{Executor, ExecutorError}; +use containerd_shim_wasm::libcontainer_instance::LinuxContainerExecutor; +use containerd_shim_wasm::sandbox::Stdio; +use libcontainer::workload::{Executor, ExecutorError, ExecutorValidationError}; use oci_spec::runtime::Spec; use slight_lib::commands::run::{handle_run, RunArgs}; +use utils::is_linux_executable; -const EXECUTOR_NAME: &str = "slight"; - +#[derive(Clone)] pub struct SlightExecutor { - pub stdin: Option, - pub stdout: Option, - pub stderr: Option, + stdio: Stdio, } -impl SlightExecutor {} - -impl Executor for SlightExecutor { - fn exec(&self, spec: &Spec) -> Result<(), ExecutorError> { - let args = oci::get_args(spec); - if args.is_empty() { - return Err(ExecutorError::InvalidArg); - } +impl SlightExecutor { + pub fn new(stdio: Stdio) -> Self { + Self { stdio } + } + fn wasm_exec(&self) -> anyhow::Result<()> { + self.stdio + .take() + .redirect() + .context("failed to redirect stdio")?; let mod_path = PathBuf::from("/slightfile.toml"); let wasm_path = PathBuf::from("/app.wasm"); - - prepare_stdio(self.stdin, self.stdout, self.stderr).map_err(|err| { - ExecutorError::Other(format!("failed to prepare stdio for container: {}", err)) - })?; - - let rt = Runtime::new().unwrap(); + let rt = Runtime::new().context("failed to create runtime")?; let args = RunArgs { module: wasm_path, - slightfile: PathBuf::from(&mod_path), + slightfile: mod_path, io_redirects: None, link_all_capabilities: true, }; - rt.block_on(async { - let f = handle_run(args); - info!(" >>> notifying main thread we are about to start"); - tokio::select! { - _ = f => { - log::info!(" >>> server shut down: exiting"); - std::process::exit(0); - }, - }; - }); - std::process::exit(137); - } - - fn can_handle(&self, _spec: &Spec) -> bool { - true - } - - fn name(&self) -> &'static str { - EXECUTOR_NAME + rt.block_on(handle_run(args)) } } -fn prepare_stdio(stdin: Option, stdout: Option, stderr: Option) -> Result<()> { - if let Some(stdin) = stdin { - dup(STDIN_FILENO)?; - dup2(stdin, STDIN_FILENO)?; - } - if let Some(stdout) = stdout { - dup(STDOUT_FILENO)?; - dup2(stdout, STDOUT_FILENO)?; +impl Executor for SlightExecutor { + fn exec(&self, spec: &Spec) -> Result<(), ExecutorError> { + if is_linux_executable(spec).is_ok() { + log::info!("executing linux container"); + LinuxContainerExecutor::new(self.stdio.clone()).exec(spec) + } else { + if let Err(err) = self.wasm_exec() { + log::error!(" >>> error: {:?}", err); + std::process::exit(137); + } + log::info!(" >>> slight shut down: exiting"); + std::process::exit(0); + } } - if let Some(stderr) = stderr { - dup(STDERR_FILENO)?; - dup2(stderr, STDERR_FILENO)?; + + fn validate(&self, _spec: &Spec) -> Result<(), ExecutorValidationError> { + Ok(()) } - Ok(()) } diff --git a/containerd-shim-slight-v1/src/main.rs b/containerd-shim-slight-v1/src/main.rs index acfce947..c75783eb 100644 --- a/containerd-shim-slight-v1/src/main.rs +++ b/containerd-shim-slight-v1/src/main.rs @@ -1,18 +1,16 @@ use std::option::Option; use std::path::PathBuf; -use anyhow::Context; use containerd_shim as shim; use containerd_shim_wasm::libcontainer_instance::LibcontainerInstance; -use containerd_shim_wasm::libcontainer_instance::LinuxContainerExecutor; use containerd_shim_wasm::sandbox::instance::ExitCode; -use containerd_shim_wasm::sandbox::instance_utils::{determine_rootdir, maybe_open_stdio}; +use containerd_shim_wasm::sandbox::instance_utils::determine_rootdir; +use containerd_shim_wasm::sandbox::stdio::Stdio; use containerd_shim_wasm::sandbox::{error::Error, InstanceConfig, ShimCli}; use executor::SlightExecutor; use libcontainer::container::builder::ContainerBuilder; use libcontainer::container::Container; -use libcontainer::syscall::syscall::create_syscall; -use std::os::fd::IntoRawFd; +use libcontainer::syscall::syscall::SyscallType; mod executor; @@ -21,9 +19,7 @@ static DEFAULT_CONTAINER_ROOT_DIR: &str = "/run/containerd/slight"; pub struct Wasi { exit_code: ExitCode, id: String, - stdin: String, - stdout: String, - stderr: String, + stdio: Stdio, bundle: String, rootdir: PathBuf, } @@ -43,9 +39,7 @@ impl LibcontainerInstance for Wasi { Wasi { exit_code: Default::default(), id, - stdin: cfg.get_stdin().unwrap(), - stdout: cfg.get_stdout().unwrap(), - stderr: cfg.get_stderr().unwrap(), + stdio: Stdio::init_from_cfg(cfg).expect("failed to open stdio"), bundle, rootdir, } @@ -64,27 +58,10 @@ impl LibcontainerInstance for Wasi { } fn build_container(&self) -> std::result::Result { - let syscall = create_syscall(); - let stdin = maybe_open_stdio(&self.stdin) - .context("could not open stdin")? - .map(|f| f.into_raw_fd()); - let stdout = maybe_open_stdio(&self.stdout) - .context("could not open stdout")? - .map(|f| f.into_raw_fd()); - let stderr = maybe_open_stdio(&self.stderr) - .context("could not open stderr")? - .map(|f| f.into_raw_fd()); let err_others = |err| Error::Others(format!("failed to create container: {}", err)); - let spin_executor = Box::new(SlightExecutor { - stdin, - stdout, - stderr, - }); - let default_executor = Box::::default(); - - let container = ContainerBuilder::new(self.id.clone(), syscall.as_ref()) - .with_executor(vec![default_executor, spin_executor]) - .map_err(err_others)? + let slight_executor = SlightExecutor::new(self.stdio.take()); + let container = ContainerBuilder::new(self.id.clone(), SyscallType::Linux) + .with_executor(slight_executor) .with_root_path(self.rootdir.clone()) .map_err(err_others)? .as_init(&self.bundle) diff --git a/containerd-shim-spin-v1/Cargo.lock b/containerd-shim-spin-v1/Cargo.lock index a3122479..d2c02c2c 100644 --- a/containerd-shim-spin-v1/Cargo.lock +++ b/containerd-shim-spin-v1/Cargo.lock @@ -14,16 +14,16 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "gimli", + "gimli 0.27.3", ] [[package]] name = "addr2line" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli", + "gimli 0.28.0", ] [[package]] @@ -56,9 +56,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" dependencies = [ "memchr", ] @@ -98,24 +98,23 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" +checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" [[package]] name = "anstyle-parse" @@ -137,9 +136,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -147,9 +146,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.72" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "arbitrary" @@ -183,9 +182,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b74f44609f0f91493e3082d3734d98497e094777144380ea4db9f9905dd5b6" +checksum = "d495b6dc0184693324491a5ac05f559acc97bf937ab31d7a1c33dd0016be6d2b" dependencies = [ "flate2", "futures-core", @@ -196,13 +195,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.72" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.29", ] [[package]] @@ -229,7 +228,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32568c56fda7f2f1173430298bddeb507ed44e99bd989ba1156a25534bff5d98" dependencies = [ "async-trait", - "base64 0.21.2", + "base64 0.21.3", "bytes", "dyn-clone", "futures", @@ -243,7 +242,7 @@ dependencies = [ "rustc_version", "serde", "serde_json", - "time 0.3.23", + "time 0.3.28", "url", "uuid", ] @@ -264,23 +263,23 @@ dependencies = [ "serde_json", "sha2 0.10.7", "thiserror", - "time 0.3.23", + "time 0.3.28", "url", "uuid", ] [[package]] name = "backtrace" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ - "addr2line 0.20.0", + "addr2line 0.21.0", "cc", "cfg-if 1.0.0", "libc", "miniz_oxide", - "object 0.31.1", + "object 0.32.0", "rustc-demangle", ] @@ -292,9 +291,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "414dcefbc63d77c526a76b3afcf6fbb9b5e2791c19c3aa2297733208750c6e53" [[package]] name = "bcrypt" @@ -366,7 +365,7 @@ dependencies = [ "sled", "tempfile", "thiserror", - "time 0.3.23", + "time 0.3.28", "tokio", "tokio-stream", "tokio-tar", @@ -385,9 +384,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" [[package]] name = "bitvec" @@ -523,11 +522,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -563,24 +563,11 @@ dependencies = [ "regex", ] -[[package]] -name = "cgroups-rs" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb3af90c8d48ad5f432d8afb521b5b40c2a2fce46dd60e05912de51c47fba64" -dependencies = [ - "libc", - "log", - "nix 0.25.1", - "regex", - "thiserror", -] - [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "95ed24df0632f708f5f6d8082675bef2596f7084dee3dd55f632290bf35bfe0f" dependencies = [ "android-tzdata", "iana-time-zone", @@ -589,7 +576,7 @@ dependencies = [ "serde", "time 0.1.45", "wasm-bindgen", - "winapi", + "windows-targets 0.48.5", ] [[package]] @@ -631,24 +618,24 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.19" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd304a20bff958a57f04c4e96a2e7594cc4490a0e809cbd48bb6437edaa452d" +checksum = "7c8d502cbaec4595d2e7d5f61e318f05417bd2b66fdc3809498f0d3fdf0bea27" dependencies = [ "clap_builder", - "clap_derive 4.3.12", + "clap_derive 4.4.0", "once_cell", ] [[package]] name = "clap_builder" -version = "4.3.19" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01c6a3f08f1fe5662a35cfe393aec09c4df95f60ee93b7556505260f75eee9e1" +checksum = "5891c7bc0edb3e1c2204fc5e94009affabeb1821c9e5fdc3959536c5c0bb984d" dependencies = [ "anstream", "anstyle", - "clap_lex 0.5.0", + "clap_lex 0.5.1", "strsim", ] @@ -667,14 +654,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.3.12" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" +checksum = "c9fd1a5729c4548118d7d70ff234a44868d00489a4b6597b0b020918a0e91a1a" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.29", ] [[package]] @@ -688,9 +675,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "clone3" @@ -756,7 +743,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46a08af6d8436b911bd47f34dd3478fe28cfbe40e8e3b2c1d61f3abb264e053d" dependencies = [ - "cgroups-rs 0.2.11", + "cgroups-rs", "command-fds", "containerd-shim-protos", "go-flag", @@ -764,7 +751,7 @@ dependencies = [ "libc", "log", "mio", - "nix 0.26.2", + "nix 0.26.4", "oci-spec", "os_pipe", "page_size", @@ -775,7 +762,7 @@ dependencies = [ "serde_json", "signal-hook", "thiserror", - "time 0.3.23", + "time 0.3.28", "windows-sys 0.48.0", ] @@ -797,13 +784,13 @@ dependencies = [ "anyhow", "async-trait", "chrono", - "clap 4.3.19", + "clap 4.4.1", "containerd-shim", "containerd-shim-wasm", "libc", "libcontainer", "log", - "nix 0.26.2", + "nix 0.26.4", "oci-spec", "openssl", "reqwest", @@ -819,31 +806,33 @@ dependencies = [ "tokio", "tokio-util 0.7.8", "url", + "utils", "wasmtime", ] [[package]] name = "containerd-shim-wasm" version = "0.2.1" -source = "git+https://github.com/containerd/runwasi?rev=c83ea9629bcc2377f54468700e6abbe4f5320b56#c83ea9629bcc2377f54468700e6abbe4f5320b56" +source = "git+https://github.com/containerd/runwasi?rev=7e978edeaf34b54efb895738357c805cf888b76d#7e978edeaf34b54efb895738357c805cf888b76d" dependencies = [ "anyhow", "caps", - "cgroups-rs 0.3.3", "chrono", "clone3", "command-fds", "containerd-shim", + "crossbeam", "libc", "libcontainer", "log", - "nix 0.26.2", + "nix 0.26.4", "oci-spec", "protobuf 3.2.0", "serde", "serde_json", "thiserror", "ttrpc", + "windows-sys 0.48.0", ] [[package]] @@ -902,7 +891,7 @@ dependencies = [ "cranelift-control", "cranelift-entity", "cranelift-isle", - "gimli", + "gimli 0.27.3", "hashbrown 0.13.2", "log", "regalloc2", @@ -1080,7 +1069,7 @@ version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a011bbe2c35ce9c1f143b7af6f94f29a167beb4cd1d29e6740ce836f723120e" dependencies = [ - "nix 0.26.2", + "nix 0.26.4", "windows-sys 0.48.0", ] @@ -1141,6 +1130,15 @@ dependencies = [ "uuid", ] +[[package]] +name = "deranged" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +dependencies = [ + "serde", +] + [[package]] name = "derive-new" version = "0.5.9" @@ -1310,9 +1308,9 @@ checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "dyn-clone" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "304e6508efa593091e97a9abbc10f90aa7ca635b6d2784feff3c89d41dd12272" +checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" [[package]] name = "ed25519" @@ -1345,9 +1343,9 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "encoding_rs" -version = "0.8.32" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if 1.0.0", ] @@ -1373,9 +1371,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ "errno-dragonfly", "libc", @@ -1432,7 +1430,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b0377f1edc77dbd1118507bc7a66e4ab64d2b90c66f90726dc801e73a8c68f9" dependencies = [ "cfg-if 1.0.0", - "rustix 0.38.4", + "rustix 0.38.10", "windows-sys 0.48.0", ] @@ -1448,13 +1446,13 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.3.5", "windows-sys 0.48.0", ] @@ -1472,9 +1470,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" dependencies = [ "crc32fast", "libz-ng-sys", @@ -1518,7 +1516,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d167b646a876ba8fda6b50ac645cfd96242553cbaf0ca4fccaa39afcbf0801f" dependencies = [ "io-lifetimes 1.0.11", - "rustix 0.38.4", + "rustix 0.38.10", "windows-sys 0.48.0", ] @@ -1610,7 +1608,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.29", ] [[package]] @@ -1658,7 +1656,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27d12c0aed7f1e24276a241aadc4cb8ea9f83000f34bc062b7cc2d51e3b0fabd" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "debugid", "fxhash", "serde", @@ -1722,6 +1720,12 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" + [[package]] name = "glob" version = "0.3.1" @@ -1739,9 +1743,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.20" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes", "fnv", @@ -1792,9 +1796,9 @@ dependencies = [ [[package]] name = "hashlink" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312f66718a2d7789ffef4f4b7b213138ed9f1eb3aa1d0d82fc99f88fb3ffd26f" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ "hashbrown 0.14.0", ] @@ -1851,7 +1855,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f16b4e41e289da3fd60e64f245246a97e78fab7b3788c6d8147b3ae7d9f5e533" dependencies = [ "anyhow", - "base64 0.21.2", + "base64 0.21.3", "serde", "serde_json", ] @@ -1906,9 +1910,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -1949,7 +1953,7 @@ dependencies = [ "futures-util", "http", "hyper", - "rustls 0.21.5", + "rustls 0.21.7", "tokio", "tokio-rustls 0.24.1", ] @@ -2088,7 +2092,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.2", - "rustix 0.38.4", + "rustix 0.38.10", "windows-sys 0.48.0", ] @@ -2109,9 +2113,9 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "ittapi" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e648c437172ce7d3ac35ca11a068755072054826fa455a916b43524fa4a62a7" +checksum = "41e0d0b7b3b53d92a7e8b80ede3400112a6b8b4c98d1f5b8b16bb787c780582c" dependencies = [ "anyhow", "ittapi-sys", @@ -2120,9 +2124,9 @@ dependencies = [ [[package]] name = "ittapi-sys" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9b32a4d23f72548178dde54f3c12c6b6a08598e25575c0d0fa5bd861e0dc1a5" +checksum = "f2f8763c96e54e6d6a0dccc2990d8b5e33e3313aaeae6185921a3f4c1614a77c" dependencies = [ "cc", ] @@ -2151,7 +2155,7 @@ version = "8.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" dependencies = [ - "base64 0.21.2", + "base64 0.21.3", "pem", "ring", "serde", @@ -2259,11 +2263,10 @@ checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libcgroups" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f6fef16f505466473eeeee906244e03a437beaf41ccd85c39355b4077890c9" +source = "git+https://github.com/containers/youki?rev=09e67372a892f22a89eeef62ff429c3cbcac6d41#09e67372a892f22a89eeef62ff429c3cbcac6d41" dependencies = [ "fixedbitset 0.4.2", - "nix 0.26.2", + "nix 0.26.4", "oci-spec", "procfs", "serde", @@ -2274,18 +2277,16 @@ dependencies = [ [[package]] name = "libcontainer" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac48a05819bd5bd31390bd1874f5a94f711c248677fc908801de4789bdd1fbad" +source = "git+https://github.com/containers/youki?rev=09e67372a892f22a89eeef62ff429c3cbcac6d41#09e67372a892f22a89eeef62ff429c3cbcac6d41" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "caps", "chrono", - "clone3", "fastrand 2.0.0", "futures", "libc", "libcgroups", - "nix 0.26.2", + "nix 0.26.4", "oci-spec", "once_cell", "prctl", @@ -2311,12 +2312,12 @@ dependencies = [ [[package]] name = "libsql-client" -version = "0.31.8" +version = "0.31.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e119ff2e259fe776a1340d2cb40baf4d44c32e5a9fd2755e756fc46802c79c70" +checksum = "9ad36885b1e43534f5015a8c45a0be4e8a6e9a829bbb3c5704a1c5e0c0fad848" dependencies = [ "anyhow", - "base64 0.21.2", + "base64 0.21.3", "fallible-iterator", "futures", "hrana-client-proto", @@ -2364,9 +2365,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" [[package]] name = "lock_api" @@ -2380,9 +2381,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "lru" @@ -2428,9 +2429,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "5486aed0026218e61b8a01d5fbd5a0a134649abb71a0e53b7bc088529dced86e" [[package]] name = "memfd" @@ -2634,28 +2635,26 @@ dependencies = [ [[package]] name = "nix" -version = "0.25.1" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ - "autocfg", "bitflags 1.3.2", "cfg-if 1.0.0", "libc", + "memoffset 0.7.1", + "pin-utils", ] [[package]] name = "nix" -version = "0.26.2" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "cfg-if 1.0.0", "libc", - "memoffset 0.7.1", - "pin-utils", - "static_assertions", ] [[package]] @@ -2670,9 +2669,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -2751,9 +2750,9 @@ dependencies = [ [[package]] name = "object" -version = "0.31.1" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" dependencies = [ "memchr", ] @@ -2785,11 +2784,11 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.55" +version = "0.10.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" +checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "cfg-if 1.0.0", "foreign-types", "libc", @@ -2806,7 +2805,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.29", ] [[package]] @@ -2817,18 +2816,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "111.26.0+1.1.1u" +version = "111.27.0+1.1.1v" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efc62c9f12b22b8f5208c23a7200a442b2e5999f8bdf80233852122b5a4f6f37" +checksum = "06e8f197c82d7511c5b014030c9b1efeda40d7d5f99d23b4ceed3524a5e63f02" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.90" +version = "0.9.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6" +checksum = "db7e971c2c2bba161b2d2fdf37080177eff520b3bc044787c7f1f5f9e78d869b" dependencies = [ "cc", "libc", @@ -3002,7 +3001,7 @@ dependencies = [ "libc", "redox_syscall 0.3.5", "smallvec", - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -3101,29 +3100,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.29", ] [[package]] name = "pin-project-lite" -version = "0.2.10" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -3152,11 +3151,11 @@ dependencies = [ [[package]] name = "postgres-protocol" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b7fa9f396f51dffd61546fd8573ee20592287996568e6175ceb0f8699ad75d" +checksum = "49b6c5ef183cd3ab4ba005f1ca64c21e8bd97ce4699cfea9e8d9a2c4958ca520" dependencies = [ - "base64 0.21.2", + "base64 0.21.3", "byteorder", "bytes", "fallible-iterator", @@ -3170,9 +3169,9 @@ dependencies = [ [[package]] name = "postgres-types" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f028f05971fe20f512bcc679e2c10227e57809a3af86a7606304435bc8896cd6" +checksum = "8d2234cdee9408b523530a9b6d2d6b373d1db34f6a8e51dc03ded1828d7fb67c" dependencies = [ "bytes", "fallible-iterator", @@ -3192,7 +3191,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "059a34f111a9dee2ce1ac2826a68b24601c4298cfeb1a587c3cb493d5ab46f52" dependencies = [ "libc", - "nix 0.26.2", + "nix 0.27.1", ] [[package]] @@ -3382,9 +3381,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.32" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -3554,9 +3553,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.1" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +checksum = "12de2eff854e5fa4b1295edd650e227e9d8fb0c9e90b12e7f36d6a6811791a29" dependencies = [ "aho-corasick", "memchr", @@ -3566,9 +3565,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.3" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" +checksum = "49530408a136e16e5b486e883fbb6ba058e8e4e8ae6621a77b048b314336e629" dependencies = [ "aho-corasick", "memchr", @@ -3577,18 +3576,18 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "reqwest" -version = "0.11.18" +version = "0.11.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" +checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" dependencies = [ - "async-compression 0.4.1", - "base64 0.21.2", + "async-compression 0.4.2", + "base64 0.21.3", "bytes", "encoding_rs", "futures-core", @@ -3607,7 +3606,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.5", + "rustls 0.21.7", "rustls-pemfile 1.0.3", "serde", "serde_json", @@ -3647,7 +3646,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "549b9d036d571d42e6e85d1c1425e2ac83491075078ca9a15be021c56b1641f2" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "fallible-iterator", "fallible-streaming-iterator", "hashlink", @@ -3754,22 +3753,22 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.4" +version = "0.38.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" +checksum = "ed6248e1caa625eb708e266e06159f135e8c26f2bb7ceb72dc4b2766d0340964" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "errno", "libc", - "linux-raw-sys 0.4.3", + "linux-raw-sys 0.4.5", "windows-sys 0.48.0", ] [[package]] name = "rustls" -version = "0.20.8" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", "ring", @@ -3779,9 +3778,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79ea77c539259495ce8ca47f53e66ae0330a8819f67e23ac96ca02f50e7b7d36" +checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" dependencies = [ "log", "ring", @@ -3804,14 +3803,14 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.2", + "base64 0.21.3", ] [[package]] name = "rustls-webpki" -version = "0.101.2" +version = "0.101.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "513722fd73ad80a71f72b61009ea1b584bcfa1483ca93949c8f290298837fa59" +checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" dependencies = [ "ring", "untrusted", @@ -3916,9 +3915,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.177" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63ba2516aa6bf82e0b19ca8b50019d52df58455d3cf9bdaf6315225fdd0c560a" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] @@ -3935,20 +3934,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.177" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "401797fe7833d72109fedec6bfcbe67c0eed9b99772f26eb8afd261f0abc6fd3" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.29", ] [[package]] name = "serde_json" -version = "1.0.104" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" +checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" dependencies = [ "itoa", "ryu", @@ -4096,20 +4095,20 @@ dependencies = [ "num-bigint", "num-traits", "thiserror", - "time 0.3.23", + "time 0.3.28", ] [[package]] name = "siphasher" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] @@ -4514,7 +4513,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3995a6daa13c113217b6ad22154865fb06f9cb939bef398fd04f4a7aaaf5bd7" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "cc", "fallible-iterator", "indexmap 1.9.3", @@ -4593,9 +4592,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.27" +version = "2.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0" +checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" dependencies = [ "proc-macro2", "quote", @@ -4620,12 +4619,12 @@ version = "0.25.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10081a99cbecbc363d381b9503563785f0b02735fccbb0d4c1a2cb3d39f7e7fe" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "cap-fs-ext", "cap-std", "fd-lock", "io-lifetimes 2.0.2", - "rustix 0.38.4", + "rustix 0.38.10", "windows-sys 0.48.0", "winx 0.36.1", ] @@ -4638,20 +4637,20 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.10" +version = "0.12.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2faeef5759ab89935255b1a4cd98e0baf99d1085e37d36599c625dac49ae8e" +checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" [[package]] name = "tempfile" -version = "3.7.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5486094ee78b2e5038a6382ed7645bc084dc2ec433426ca4c3cb61e2007b8998" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if 1.0.0", "fastrand 2.0.0", "redox_syscall 0.3.5", - "rustix 0.38.4", + "rustix 0.38.10", "windows-sys 0.48.0", ] @@ -4682,22 +4681,22 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.44" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" +checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.44" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" +checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.29", ] [[package]] @@ -4713,10 +4712,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.23" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446" +checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" dependencies = [ + "deranged", "itoa", "libc", "num_threads", @@ -4733,9 +4733,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.10" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ba15a897f3c86766b757e5ac7221554c6750054d74d5b28844fce5fb36a6c4" +checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" dependencies = [ "time-core", ] @@ -4771,11 +4771,10 @@ dependencies = [ [[package]] name = "tokio" -version = "1.29.1" +version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ - "autocfg", "backtrace", "bytes", "libc", @@ -4784,7 +4783,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project-lite", "signal-hook-registry", - "socket2 0.4.9", + "socket2 0.5.3", "tokio-macros", "windows-sys 0.48.0", ] @@ -4797,7 +4796,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.29", ] [[package]] @@ -4812,9 +4811,9 @@ dependencies = [ [[package]] name = "tokio-postgres" -version = "0.7.8" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e89f6234aa8fd43779746012fcf53603cdb91fdd8399aa0de868c2d56b6dde1" +checksum = "d340244b32d920260ae7448cb72b6e238bddc3d4f7603394e7dd46ed8e48f5b8" dependencies = [ "async-trait", "byteorder", @@ -4829,9 +4828,11 @@ dependencies = [ "pin-project-lite", "postgres-protocol", "postgres-types", + "rand 0.8.5", "socket2 0.5.3", "tokio", "tokio-util 0.7.8", + "whoami", ] [[package]] @@ -4840,7 +4841,7 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls 0.20.8", + "rustls 0.20.9", "tokio", "webpki", ] @@ -4851,7 +4852,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.5", + "rustls 0.21.7", "tokio", ] @@ -4945,7 +4946,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.29", ] [[package]] @@ -4975,14 +4976,15 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "ttrpc" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb03d0f5219ec54d870cb3d58719a2dc0b8849405b75a2e0968b3590392a5b0" +checksum = "55ea338db445bee75c596cf8a478fbfcefad5a943c9e92a7e1c805c65ed39551" dependencies = [ "byteorder", + "crossbeam", "libc", "log", - "nix 0.26.2", + "nix 0.26.4", "protobuf 3.2.0", "protobuf-codegen 3.2.0", "thiserror", @@ -5070,9 +5072,9 @@ dependencies = [ [[package]] name = "unicase" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" dependencies = [ "version_check", ] @@ -5124,9 +5126,9 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", @@ -5140,6 +5142,14 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +[[package]] +name = "utils" +version = "0.9.0" +dependencies = [ + "anyhow", + "oci-spec", +] + [[package]] name = "uuid" version = "1.4.1" @@ -5306,7 +5316,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.29", "wasm-bindgen-shared", ] @@ -5340,7 +5350,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.29", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5362,9 +5372,9 @@ dependencies = [ [[package]] name = "wasm-encoder" -version = "0.31.1" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41763f20eafed1399fff1afb466496d3a959f58241436cfdc17e3f5ca954de16" +checksum = "1ba64e81215916eaeb48fee292f29401d69235d62d8b8fd92a7b2844ec5ae5f7" dependencies = [ "leb128", ] @@ -5384,9 +5394,9 @@ dependencies = [ [[package]] name = "wasm-streams" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bbae3363c08332cadccd13b67db371814cd214c2524020932f0804b8cf7c078" +checksum = "b4609d447824375f43e1ffbc051b50ad8f4b3ae8219680c94452ea05eb240ac7" dependencies = [ "futures-util", "js-sys", @@ -5407,9 +5417,9 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.110.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dfcdb72d96f01e6c85b6bf20102e7423bdbaad5c337301bab2bbf253d26413c" +checksum = "e986b010f47fcce49cf8ea5d5f9e5d2737832f12b53ae8ae785bbe895d0877bf" dependencies = [ "indexmap 2.0.0", "semver", @@ -5417,12 +5427,12 @@ dependencies = [ [[package]] name = "wasmprinter" -version = "0.2.62" +version = "0.2.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42cd12ed4d96a984e4b598a17457f1126d01640cc7461afbb319642111ff9e7f" +checksum = "34ddf5892036cd4b780d505eff1194a0cbc10ed896097656fdcea3744b5e7c2f" dependencies = [ "anyhow", - "wasmparser 0.110.0", + "wasmparser 0.112.0", ] [[package]] @@ -5479,7 +5489,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "efc78cfe1a758d1336f447a47af6ec05e0df2c03c93440d70faf80e17fbb001e" dependencies = [ "anyhow", - "base64 0.21.2", + "base64 0.21.3", "bincode", "directories-next", "file-per-thread-logger", @@ -5526,7 +5536,7 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli", + "gimli 0.27.3", "log", "object 0.30.4", "target-lexicon", @@ -5546,7 +5556,7 @@ dependencies = [ "cranelift-codegen", "cranelift-control", "cranelift-native", - "gimli", + "gimli 0.27.3", "object 0.30.4", "target-lexicon", "wasmtime-environ", @@ -5560,7 +5570,7 @@ checksum = "41f9e58e0ee7d43ff13e75375c726b16bce022db798d3a099a65eeaa7d7a544b" dependencies = [ "anyhow", "cranelift-entity", - "gimli", + "gimli 0.27.3", "indexmap 1.9.3", "log", "object 0.30.4", @@ -5598,7 +5608,7 @@ dependencies = [ "bincode", "cfg-if 1.0.0", "cpp_demangle", - "gimli", + "gimli 0.27.3", "ittapi", "log", "object 0.30.4", @@ -5710,7 +5720,7 @@ checksum = "60160d8f7d2b301790730dac8ff25156c61d4fed79481e7074c21dd1283cfe2f" dependencies = [ "anyhow", "cranelift-codegen", - "gimli", + "gimli 0.27.3", "object 0.30.4", "target-lexicon", "wasmparser 0.107.0", @@ -5741,23 +5751,23 @@ dependencies = [ [[package]] name = "wast" -version = "62.0.1" +version = "64.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8ae06f09dbe377b889fbd620ff8fa21e1d49d1d9d364983c0cdbf9870cb9f1f" +checksum = "a259b226fd6910225aa7baeba82f9d9933b6d00f2ce1b49b80fa4214328237cc" dependencies = [ "leb128", "memchr", "unicode-width", - "wasm-encoder 0.31.1", + "wasm-encoder 0.32.0", ] [[package]] name = "wat" -version = "1.0.69" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "842e15861d203fb4a96d314b0751cdeaf0f6f8b35e8d81d2953af2af5e44e637" +checksum = "53253d920ab413fca1c7dc2161d601c79b4fdf631d0ba51dd4343bf9b556c3f6" dependencies = [ - "wast 62.0.1", + "wast 64.0.0", ] [[package]] @@ -5772,9 +5782,9 @@ dependencies = [ [[package]] name = "webpki" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "f0e74f82d49d545ad128049b7e88f6576df2da6b02e9ce565c6f533be576957e" dependencies = [ "ring", "untrusted", @@ -5782,12 +5792,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.22.6" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" -dependencies = [ - "webpki", -] +checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" [[package]] name = "which" @@ -5800,6 +5807,16 @@ dependencies = [ "once_cell", ] +[[package]] +name = "whoami" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" +dependencies = [ + "wasm-bindgen", + "web-sys", +] + [[package]] name = "wiggle" version = "10.0.1" @@ -5881,7 +5898,7 @@ checksum = "525fdd0d4e82d1bd3083bd87e8ca8014abfbdc5bf290d1d5371dac440d351e89" dependencies = [ "anyhow", "cranelift-codegen", - "gimli", + "gimli 0.27.3", "regalloc2", "smallvec", "target-lexicon", @@ -5895,7 +5912,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -5913,7 +5930,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -5933,17 +5950,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -5954,9 +5971,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -5966,9 +5983,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -5978,9 +5995,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -5990,9 +6007,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -6002,9 +6019,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" @@ -6014,9 +6031,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -6026,17 +6043,18 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi", + "cfg-if 1.0.0", + "windows-sys 0.48.0", ] [[package]] @@ -6056,7 +6074,7 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4857cedf8371f690bb6782a3e2b065c54d1b6661be068aaf3eac8b45e813fdf8" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "windows-sys 0.48.0", ] @@ -6115,9 +6133,9 @@ dependencies = [ [[package]] name = "xattr" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea263437ca03c1522846a4ddafbca2542d0ad5ed9b784909d4b27b76f62bc34a" +checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" dependencies = [ "libc", ] @@ -6139,7 +6157,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.29", ] [[package]] diff --git a/containerd-shim-spin-v1/Cargo.toml b/containerd-shim-spin-v1/Cargo.toml index 4a5912b0..8bbf98c3 100644 --- a/containerd-shim-spin-v1/Cargo.toml +++ b/containerd-shim-spin-v1/Cargo.toml @@ -14,7 +14,8 @@ Containerd shim for running Spin workloads. chrono = "0.4" clap = { version = "4.3", features = ["derive", "env"] } containerd-shim = "0.5.0" -containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", rev = "c83ea9629bcc2377f54468700e6abbe4f5320b56", features = ["cgroupsv2"]} +containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", rev = "7e978edeaf34b54efb895738357c805cf888b76d", features = ["cgroupsv2"] } +libcontainer = { git = "https://github.com/containers/youki", rev = "09e67372a892f22a89eeef62ff429c3cbcac6d41", features = ["v2"], default-features = false } log = "0.4" spin-trigger = { git = "https://github.com/fermyon/spin", tag = "v1.4.1" } spin-app = { git = "https://github.com/fermyon/spin", tag = "v1.4.1" } @@ -33,9 +34,9 @@ url = "2.3" reqwest = { version = "0.11", features = ["stream"] } anyhow = "1.0" async-trait = "0.1" -libcontainer = { version = "0.1", features = ["v2"], default-features = false } oci-spec = "0.6.2" libc = "0.2.147" nix = "0.26.2" +utils = { path = "../utils" } [workspace] diff --git a/containerd-shim-spin-v1/src/executor.rs b/containerd-shim-spin-v1/src/executor.rs index fe392db1..e2c6001f 100644 --- a/containerd-shim-spin-v1/src/executor.rs +++ b/containerd-shim-spin-v1/src/executor.rs @@ -1,29 +1,32 @@ +use anyhow::{anyhow, Context, Result}; use log::info; -use nix::unistd::{dup, dup2}; use spin_manifest::Application; use spin_redis_engine::RedisTrigger; use spin_trigger::{loader, RuntimeConfig, TriggerExecutor, TriggerExecutorBuilder}; use spin_trigger_http::HttpTrigger; -use std::{future::Future, os::fd::RawFd, path::PathBuf, pin::Pin}; +use std::path::PathBuf; + use tokio::runtime::Runtime; use url::Url; use wasmtime::OptLevel; -use anyhow::{anyhow, Result}; -use containerd_shim_wasm::sandbox::oci; -use libc::{STDERR_FILENO, STDIN_FILENO, STDOUT_FILENO}; -use libcontainer::workload::{Executor, ExecutorError}; +use containerd_shim_wasm::libcontainer_instance::LinuxContainerExecutor; +use containerd_shim_wasm::sandbox::Stdio; +use libcontainer::workload::{Executor, ExecutorError, ExecutorValidationError}; use oci_spec::runtime::Spec; +use utils::is_linux_executable; use crate::{parse_addr, SPIN_ADDR}; -const EXECUTOR_NAME: &str = "spin"; -// const RUNTIME_CONFIG_FILE_PATH: &str = "runtime_config.toml"; - +#[derive(Clone)] pub struct SpinExecutor { - pub stdin: Option, - pub stdout: Option, - pub stderr: Option, + stdio: Stdio, +} + +impl SpinExecutor { + pub fn new(stdio: Stdio) -> Self { + Self { stdio } + } } impl SpinExecutor { @@ -61,105 +64,69 @@ impl SpinExecutor { let executor = builder.build(locked_url, runtime_config, init_data).await?; Ok(executor) } -} -impl Executor for SpinExecutor { - fn exec(&self, spec: &Spec) -> Result<(), ExecutorError> { - let args = oci::get_args(spec); - if args.is_empty() { - return Err(ExecutorError::InvalidArg); - } + fn wasm_exec(&self, _spec: &Spec) -> Result<()> { + log::info!("executing spin container"); + let rt = Runtime::new().context("failed to create runtime")?; + rt.block_on(self.wasm_exec_async()) + } - prepare_stdio(self.stdin, self.stdout, self.stderr).map_err(|err| { - ExecutorError::Other(format!("failed to prepare stdio for container: {}", err)) - })?; - - let rt = Runtime::new().unwrap(); - let res = rt.block_on(async { - info!(" >>> building spin application"); - let app = match SpinExecutor::build_spin_application( - PathBuf::from("/spin.toml"), - PathBuf::from("/"), - ) - .await - { - Ok(app) => app, - Err(err) => { - return err; - } - }; - - let trigger = app.info.trigger.clone(); - info!(" >>> building spin trigger {:?}", trigger); - - let f: Pin> + Send>>; - - match trigger { - spin_manifest::ApplicationTrigger::Http(_config) => { - let http_trigger: HttpTrigger = - match SpinExecutor::build_spin_trigger(PathBuf::from("/"), app).await { - Ok(http_trigger) => http_trigger, - Err(err) => { - log::error!(" >>> failed to build spin trigger: {:?}", err); - return err; - } - }; - - info!(" >>> running spin trigger"); - f = http_trigger.run(spin_trigger_http::CliArgs { - address: parse_addr(SPIN_ADDR).unwrap(), - tls_cert: None, - tls_key: None, - }); - } - spin_manifest::ApplicationTrigger::Redis(_config) => { - let redis_trigger: RedisTrigger = - match SpinExecutor::build_spin_trigger(PathBuf::from("/"), app).await { - Ok(redis_trigger) => redis_trigger, - Err(err) => { - return err; - } - }; - - info!(" >>> running spin trigger"); - f = redis_trigger.run(spin_trigger::cli::NoArgs); - } - _ => todo!("Only Http and Redis triggers are currently supported."), + async fn wasm_exec_async(&self) -> Result<()> { + info!(" >>> building spin application"); + let app = + SpinExecutor::build_spin_application(PathBuf::from("/spin.toml"), PathBuf::from("/")) + .await + .context("failed to build spin application")?; + + let trigger = app.info.trigger.clone(); + info!(" >>> building spin trigger {:?}", trigger); + + let f = match trigger { + spin_manifest::ApplicationTrigger::Http(_config) => { + let http_trigger: HttpTrigger = + SpinExecutor::build_spin_trigger(PathBuf::from("/"), app) + .await + .context("failed to build spin trigger")?; + info!(" >>> running spin trigger"); + http_trigger.run(spin_trigger_http::CliArgs { + address: parse_addr(SPIN_ADDR).unwrap(), + tls_cert: None, + tls_key: None, + }) } - - info!(" >>> notifying main thread we are about to start"); - tokio::select! { - _ = f => { - log::info!(" >>> server shut down: exiting"); - std::process::exit(0); - }, + spin_manifest::ApplicationTrigger::Redis(_config) => { + let redis_trigger: RedisTrigger = + SpinExecutor::build_spin_trigger(PathBuf::from("/"), app) + .await + .context("failed to build spin trigger")?; + + info!(" >>> running spin trigger"); + redis_trigger.run(spin_trigger::cli::NoArgs) } - }); - log::error!(" >>> error: {:?}", res); - std::process::exit(137); - } + _ => todo!("Only Http and Redis triggers are currently supported."), + }; - fn can_handle(&self, _spec: &Spec) -> bool { - true - } - - fn name(&self) -> &'static str { - EXECUTOR_NAME + info!(" >>> notifying main thread we are about to start"); + f.await } } -fn prepare_stdio(stdin: Option, stdout: Option, stderr: Option) -> Result<()> { - if let Some(stdin) = stdin { - dup(STDIN_FILENO)?; - dup2(stdin, STDIN_FILENO)?; - } - if let Some(stdout) = stdout { - dup(STDOUT_FILENO)?; - dup2(stdout, STDOUT_FILENO)?; +impl Executor for SpinExecutor { + fn exec(&self, spec: &Spec) -> Result<(), ExecutorError> { + if is_linux_executable(spec).is_ok() { + log::info!("executing linux container"); + LinuxContainerExecutor::new(self.stdio.clone()).exec(spec) + } else { + if let Err(err) = self.wasm_exec(spec) { + log::info!(" >>> server shut down due to error: {err}"); + std::process::exit(137); + } + log::info!(" >>> server shut down: exiting"); + std::process::exit(0); + } } - if let Some(stderr) = stderr { - dup(STDERR_FILENO)?; - dup2(stderr, STDERR_FILENO)?; + + fn validate(&self, _spec: &Spec) -> Result<(), ExecutorValidationError> { + Ok(()) } - Ok(()) } diff --git a/containerd-shim-spin-v1/src/main.rs b/containerd-shim-spin-v1/src/main.rs index 1ad8f7c9..d0bec1ad 100644 --- a/containerd-shim-spin-v1/src/main.rs +++ b/containerd-shim-spin-v1/src/main.rs @@ -4,19 +4,17 @@ use std::option::Option; use std::path::PathBuf; use std::sync::{Arc, Condvar, Mutex}; -use anyhow::Context; use anyhow::{anyhow, Result}; use containerd_shim as shim; use containerd_shim_wasm::libcontainer_instance::LibcontainerInstance; -use containerd_shim_wasm::libcontainer_instance::LinuxContainerExecutor; use containerd_shim_wasm::sandbox::instance::ExitCode; -use containerd_shim_wasm::sandbox::instance_utils::{determine_rootdir, maybe_open_stdio}; +use containerd_shim_wasm::sandbox::instance_utils::determine_rootdir; +use containerd_shim_wasm::sandbox::stdio::Stdio; use containerd_shim_wasm::sandbox::{error::Error, InstanceConfig, ShimCli}; use executor::SpinExecutor; use libcontainer::container::builder::ContainerBuilder; use libcontainer::container::Container; -use libcontainer::syscall::syscall::create_syscall; -use std::os::fd::IntoRawFd; +use libcontainer::syscall::syscall::SyscallType; mod executor; @@ -26,9 +24,7 @@ static DEFAULT_CONTAINER_ROOT_DIR: &str = "/run/containerd/spin"; pub struct Wasi { exit_code: ExitCode, id: String, - stdin: String, - stdout: String, - stderr: String, + stdio: Stdio, bundle: String, rootdir: PathBuf, } @@ -48,9 +44,7 @@ impl LibcontainerInstance for Wasi { Wasi { exit_code: Arc::new((Mutex::new(None), Condvar::new())), id, - stdin: cfg.get_stdin().unwrap_or_default(), - stdout: cfg.get_stdout().unwrap_or_default(), - stderr: cfg.get_stderr().unwrap_or_default(), + stdio: Stdio::init_from_cfg(cfg).expect("failed to open stdio"), bundle: cfg.get_bundle().unwrap_or_default(), rootdir, } @@ -69,27 +63,10 @@ impl LibcontainerInstance for Wasi { } fn build_container(&self) -> std::result::Result { - let syscall = create_syscall(); - let stdin = maybe_open_stdio(&self.stdin) - .context("could not open stdin")? - .map(|f| f.into_raw_fd()); - let stdout = maybe_open_stdio(&self.stdout) - .context("could not open stdout")? - .map(|f| f.into_raw_fd()); - let stderr = maybe_open_stdio(&self.stderr) - .context("could not open stderr")? - .map(|f| f.into_raw_fd()); let err_others = |err| Error::Others(format!("failed to create container: {}", err)); - let spin_executor = Box::new(SpinExecutor { - stdin, - stdout, - stderr, - }); - let default_executor = Box::::default(); - - let container = ContainerBuilder::new(self.id.clone(), syscall.as_ref()) - .with_executor(vec![default_executor, spin_executor]) - .map_err(err_others)? + let spin_executor = SpinExecutor::new(self.stdio.take()); + let container = ContainerBuilder::new(self.id.clone(), SyscallType::Linux) + .with_executor(spin_executor) .with_root_path(self.rootdir.clone()) .map_err(err_others)? .as_init(&self.bundle) diff --git a/containerd-shim-wws-v1/Cargo.lock b/containerd-shim-wws-v1/Cargo.lock index 887170b5..d03b3ce2 100644 --- a/containerd-shim-wws-v1/Cargo.lock +++ b/containerd-shim-wws-v1/Cargo.lock @@ -44,17 +44,17 @@ dependencies = [ [[package]] name = "actix-http" -version = "3.3.1" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2079246596c18b4a33e274ae10c0e50613f4d32a4198e09c7b93771013fed74" +checksum = "a92ef85799cba03f76e4f7c10f533e66d87c9a7e7055f3391f09000ad8351bc9" dependencies = [ "actix-codec", "actix-rt", "actix-service", "actix-utils", - "ahash 0.8.3", + "ahash", "base64", - "bitflags 1.3.2", + "bitflags 2.4.0", "brotli", "bytes", "bytestring", @@ -78,17 +78,17 @@ dependencies = [ "tokio", "tokio-util", "tracing", - "zstd 0.12.3+zstd.1.5.2", + "zstd 0.12.4", ] [[package]] name = "actix-macros" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6" +checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 1.0.109", + "syn 2.0.29", ] [[package]] @@ -106,9 +106,9 @@ dependencies = [ [[package]] name = "actix-rt" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15265b6b8e2347670eb363c47fc8c75208b4a4994b27192f345fcbe707804f3e" +checksum = "28f32d40287d3f402ae0028a9d54bef51af15c8769492826a69d28f81893151d" dependencies = [ "futures-core", "tokio", @@ -116,9 +116,9 @@ dependencies = [ [[package]] name = "actix-server" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e8613a75dd50cc45f473cee3c34d59ed677c0f7b44480ce3b8247d7dc519327" +checksum = "3eb13e7eef0423ea6eab0e59f6c72e7cb46d33691ad56a726b3cd07ddec2c2d4" dependencies = [ "actix-rt", "actix-service", @@ -126,8 +126,7 @@ dependencies = [ "futures-core", "futures-util", "mio", - "num_cpus", - "socket2", + "socket2 0.5.3", "tokio", "tracing", ] @@ -155,9 +154,9 @@ dependencies = [ [[package]] name = "actix-web" -version = "4.3.1" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd3cb42f9566ab176e1ef0b8b3a896529062b4efc6be0123046095914c4c1c96" +checksum = "0e4a5b5e29603ca8c94a77c65cf874718ceb60292c5a5c3e5f4ace041af462b9" dependencies = [ "actix-codec", "actix-http", @@ -168,7 +167,7 @@ dependencies = [ "actix-service", "actix-utils", "actix-web-codegen", - "ahash 0.7.6", + "ahash", "bytes", "bytestring", "cfg-if 1.0.0", @@ -177,7 +176,6 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "http", "itoa", "language-tags", "log", @@ -189,21 +187,21 @@ dependencies = [ "serde_json", "serde_urlencoded", "smallvec", - "socket2", - "time 0.3.23", + "socket2 0.5.3", + "time 0.3.28", "url", ] [[package]] name = "actix-web-codegen" -version = "4.2.0" +version = "4.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2262160a7ae29e3415554a3f1fc04c764b1540c116aa524683208078b7a75bc9" +checksum = "eb1f50ebbb30eca122b188319a4398b3f7bb4a8cdf50ecfb73bfc6a3c3ce54f5" dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.29", ] [[package]] @@ -212,16 +210,16 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "gimli", + "gimli 0.27.3", ] [[package]] name = "addr2line" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli", + "gimli 0.28.0", ] [[package]] @@ -230,17 +228,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "ahash" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] - [[package]] name = "ahash" version = "0.8.3" @@ -255,9 +242,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" dependencies = [ "memchr", ] @@ -300,9 +287,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "arbitrary" @@ -330,13 +317,13 @@ checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341" [[package]] name = "async-trait" -version = "0.1.71" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a564d521dd56509c4c47480d00b80ee55f7e385ae48db5744c67ad50c92d2ebf" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.29", ] [[package]] @@ -347,24 +334,24 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ - "addr2line 0.20.0", + "addr2line 0.21.0", "cc", "cfg-if 1.0.0", "libc", "miniz_oxide", - "object 0.31.1", + "object 0.32.0", "rustc-demangle", ] [[package]] name = "base64" -version = "0.21.2" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "414dcefbc63d77c526a76b3afcf6fbb9b5e2791c19c3aa2297733208750c6e53" [[package]] name = "bincode" @@ -383,9 +370,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" [[package]] name = "blake3" @@ -542,11 +529,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -573,24 +561,11 @@ dependencies = [ "regex", ] -[[package]] -name = "cgroups-rs" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb3af90c8d48ad5f432d8afb521b5b40c2a2fce46dd60e05912de51c47fba64" -dependencies = [ - "libc", - "log", - "nix 0.25.1", - "regex", - "thiserror", -] - [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "95ed24df0632f708f5f6d8082675bef2596f7084dee3dd55f632290bf35bfe0f" dependencies = [ "android-tzdata", "iana-time-zone", @@ -599,7 +574,7 @@ dependencies = [ "serde", "time 0.1.45", "wasm-bindgen", - "winapi", + "windows-targets 0.48.5", ] [[package]] @@ -654,7 +629,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46a08af6d8436b911bd47f34dd3478fe28cfbe40e8e3b2c1d61f3abb264e053d" dependencies = [ - "cgroups-rs 0.2.11", + "cgroups-rs", "command-fds", "containerd-shim-protos", "go-flag", @@ -662,7 +637,7 @@ dependencies = [ "libc", "log", "mio", - "nix 0.26.2", + "nix 0.26.4", "oci-spec", "os_pipe", "page_size", @@ -673,7 +648,7 @@ dependencies = [ "serde_json", "signal-hook", "thiserror", - "time 0.3.23", + "time 0.3.28", "windows-sys 0.48.0", ] @@ -691,25 +666,26 @@ dependencies = [ [[package]] name = "containerd-shim-wasm" version = "0.2.1" -source = "git+https://github.com/containerd/runwasi?rev=c83ea9629bcc2377f54468700e6abbe4f5320b56#c83ea9629bcc2377f54468700e6abbe4f5320b56" +source = "git+https://github.com/containerd/runwasi?rev=7e978edeaf34b54efb895738357c805cf888b76d#7e978edeaf34b54efb895738357c805cf888b76d" dependencies = [ "anyhow", "caps", - "cgroups-rs 0.3.3", "chrono", "clone3", "command-fds", "containerd-shim", + "crossbeam", "libc", "libcontainer", "log", - "nix 0.26.2", + "nix 0.26.4", "oci-spec", "protobuf 3.2.0", "serde", "serde_json", "thiserror", "ttrpc", + "windows-sys 0.48.0", ] [[package]] @@ -723,13 +699,14 @@ dependencies = [ "libc", "libcontainer", "log", - "nix 0.26.2", + "nix 0.26.4", "oci-spec", "openssl", "serde", "serde_json", "tokio", "tokio-util", + "utils", "wws-config", "wws-router", "wws-server", @@ -748,7 +725,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" dependencies = [ "percent-encoding", - "time 0.3.23", + "time 0.3.28", "version_check", ] @@ -808,7 +785,7 @@ dependencies = [ "cranelift-control", "cranelift-entity", "cranelift-isle", - "gimli", + "gimli 0.27.3", "hashbrown 0.13.2", "log", "regalloc2", @@ -903,6 +880,20 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "crossbeam" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2801af0d36612ae591caa9568261fddce32ce6e08a7275ea334a06a4ad021a2c" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-epoch", + "crossbeam-queue", + "crossbeam-utils", +] + [[package]] name = "crossbeam-channel" version = "0.5.8" @@ -937,6 +928,16 @@ dependencies = [ "scopeguard", ] +[[package]] +name = "crossbeam-queue" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.16" @@ -1000,6 +1001,15 @@ dependencies = [ "uuid", ] +[[package]] +name = "deranged" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +dependencies = [ + "serde", +] + [[package]] name = "derive-new" version = "0.5.9" @@ -1109,15 +1119,15 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "encoding_rs" -version = "0.8.32" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if 1.0.0", ] @@ -1143,9 +1153,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ "errno-dragonfly", "libc", @@ -1168,15 +1178,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - [[package]] name = "fastrand" version = "2.0.0" @@ -1190,7 +1191,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b0377f1edc77dbd1118507bc7a66e4ab64d2b90c66f90726dc801e73a8c68f9" dependencies = [ "cfg-if 1.0.0", - "rustix 0.38.4", + "rustix 0.38.11", "windows-sys 0.48.0", ] @@ -1218,9 +1219,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" dependencies = [ "crc32fast", "miniz_oxide", @@ -1263,7 +1264,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d167b646a876ba8fda6b50ac645cfd96242553cbaf0ca4fccaa39afcbf0801f" dependencies = [ "io-lifetimes 1.0.11", - "rustix 0.38.4", + "rustix 0.38.11", "windows-sys 0.48.0", ] @@ -1324,7 +1325,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.29", ] [[package]] @@ -1372,7 +1373,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27d12c0aed7f1e24276a241aadc4cb8ea9f83000f34bc062b7cc2d51e3b0fabd" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "debugid", "fxhash", "serde", @@ -1423,6 +1424,12 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" + [[package]] name = "git2" version = "0.17.2" @@ -1449,9 +1456,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.20" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes", "fnv", @@ -1478,7 +1485,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.3", + "ahash", ] [[package]] @@ -1550,9 +1557,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -1577,7 +1584,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -1670,15 +1677,6 @@ dependencies = [ "serde", ] -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if 1.0.0", -] - [[package]] name = "io-extras" version = "0.17.4" @@ -1719,7 +1717,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", - "rustix 0.38.4", + "rustix 0.38.11", "windows-sys 0.48.0", ] @@ -1734,15 +1732,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "ittapi" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e648c437172ce7d3ac35ca11a068755072054826fa455a916b43524fa4a62a7" +checksum = "41e0d0b7b3b53d92a7e8b80ede3400112a6b8b4c98d1f5b8b16bb787c780582c" dependencies = [ "anyhow", "ittapi-sys", @@ -1751,9 +1749,9 @@ dependencies = [ [[package]] name = "ittapi-sys" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9b32a4d23f72548178dde54f3c12c6b6a08598e25575c0d0fa5bd861e0dc1a5" +checksum = "f2f8763c96e54e6d6a0dccc2990d8b5e33e3313aaeae6185921a3f4c1614a77c" dependencies = [ "cc", ] @@ -1809,11 +1807,10 @@ checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libcgroups" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f6fef16f505466473eeeee906244e03a437beaf41ccd85c39355b4077890c9" +source = "git+https://github.com/containers/youki?rev=09e67372a892f22a89eeef62ff429c3cbcac6d41#09e67372a892f22a89eeef62ff429c3cbcac6d41" dependencies = [ "fixedbitset 0.4.2", - "nix 0.26.2", + "nix 0.26.4", "oci-spec", "procfs", "serde", @@ -1824,18 +1821,16 @@ dependencies = [ [[package]] name = "libcontainer" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac48a05819bd5bd31390bd1874f5a94f711c248677fc908801de4789bdd1fbad" +source = "git+https://github.com/containers/youki?rev=09e67372a892f22a89eeef62ff429c3cbcac6d41#09e67372a892f22a89eeef62ff429c3cbcac6d41" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "caps", "chrono", - "clone3", - "fastrand 2.0.0", + "fastrand", "futures", "libc", "libcgroups", - "nix 0.26.2", + "nix 0.26.4", "oci-spec", "once_cell", "prctl", @@ -1879,9 +1874,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.9" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ee889ecc9568871456d42f603d6a0ce59ff328d291063a45cbdf0036baf6db" +checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" dependencies = [ "cc", "libc", @@ -1903,9 +1898,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" [[package]] name = "local-channel" @@ -1937,9 +1932,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "mach" @@ -1958,9 +1953,9 @@ checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4" [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "5486aed0026218e61b8a01d5fbd5a0a134649abb71a0e53b7bc088529dced86e" [[package]] name = "memfd" @@ -2100,28 +2095,26 @@ dependencies = [ [[package]] name = "nix" -version = "0.25.1" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ - "autocfg", "bitflags 1.3.2", "cfg-if 1.0.0", "libc", + "memoffset 0.7.1", + "pin-utils", ] [[package]] name = "nix" -version = "0.26.2" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "cfg-if 1.0.0", "libc", - "memoffset 0.7.1", - "pin-utils", - "static_assertions", ] [[package]] @@ -2149,9 +2142,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] @@ -2180,9 +2173,9 @@ dependencies = [ [[package]] name = "object" -version = "0.31.1" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" dependencies = [ "memchr", ] @@ -2229,7 +2222,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.29", ] [[package]] @@ -2240,18 +2233,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "111.26.0+1.1.1u" +version = "111.27.0+1.1.1v" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efc62c9f12b22b8f5208c23a7200a442b2e5999f8bdf80233852122b5a4f6f37" +checksum = "06e8f197c82d7511c5b014030c9b1efeda40d7d5f99d23b4ceed3524a5e63f02" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.90" +version = "0.9.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6" +checksum = "db7e971c2c2bba161b2d2fdf37080177eff520b3bc044787c7f1f5f9e78d869b" dependencies = [ "cc", "libc", @@ -2300,14 +2293,14 @@ dependencies = [ "libc", "redox_syscall 0.3.5", "smallvec", - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] name = "paste" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b27ab7be369122c218afc2079489cdcb4b517c0a3fc386ff11e1fedfcc2b35" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "percent-encoding" @@ -2327,9 +2320,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.10" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -2365,7 +2358,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "059a34f111a9dee2ce1ac2826a68b24601c4298cfeb1a587c3cb493d5ab46f52" dependencies = [ "libc", - "nix 0.26.2", + "nix 0.27.1", ] [[package]] @@ -2394,9 +2387,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.64" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78803b62cbf1f46fde80d7c0e803111524b9877184cfe7c3033659490ac7a7da" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] @@ -2555,9 +2548,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.29" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -2658,9 +2651,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.1" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +checksum = "12de2eff854e5fa4b1295edd650e227e9d8fb0c9e90b12e7f36d6a6811791a29" dependencies = [ "aho-corasick", "memchr", @@ -2670,9 +2663,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.3" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" +checksum = "49530408a136e16e5b486e883fbb6ba058e8e4e8ae6621a77b048b314336e629" dependencies = [ "aho-corasick", "memchr", @@ -2681,15 +2674,15 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "reqwest" -version = "0.11.18" +version = "0.11.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" +checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" dependencies = [ "base64", "bytes", @@ -2754,7 +2747,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.25", + "syn 2.0.29", "walkdir", ] @@ -2821,22 +2814,22 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.4" +version = "0.38.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" +checksum = "c0c3dde1fc030af041adc40e79c0e7fbcf431dd24870053d187d7c66e4b87453" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "errno", "libc", - "linux-raw-sys 0.4.3", + "linux-raw-sys 0.4.5", "windows-sys 0.48.0", ] [[package]] name = "ryu" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "safe-path" @@ -2867,15 +2860,15 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "security-framework" -version = "2.9.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -2886,9 +2879,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -2896,35 +2889,35 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" [[package]] name = "serde" -version = "1.0.171" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.171" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.29", ] [[package]] name = "serde_json" -version = "1.0.102" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5062a995d481b2308b6064e9af76011f2921c35f97b0468811ed9f6cd91dfed" +checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" dependencies = [ "itoa", "ryu", @@ -2976,12 +2969,15 @@ dependencies = [ [[package]] name = "sha256" -version = "1.1.5" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc1367e4d4c740fa0ac1a24431dbbb7d0c2134cc04cad126314227425d27c782" +checksum = "7895c8ae88588ccead14ff438b939b0c569cd619116f14b4d13fdff7b8333386" dependencies = [ + "async-trait", + "bytes", "hex", "sha2", + "tokio", ] [[package]] @@ -2995,9 +2991,9 @@ dependencies = [ [[package]] name = "signal-hook" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" dependencies = [ "libc", "signal-hook-registry", @@ -3014,9 +3010,9 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] @@ -3043,6 +3039,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "sptr" version = "0.3.2" @@ -3055,12 +3061,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - [[package]] name = "strsim" version = "0.10.0" @@ -3086,9 +3086,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.25" +version = "2.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2" +checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" dependencies = [ "proc-macro2", "quote", @@ -3101,33 +3101,32 @@ version = "0.25.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10081a99cbecbc363d381b9503563785f0b02735fccbb0d4c1a2cb3d39f7e7fe" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "cap-fs-ext", "cap-std", "fd-lock", "io-lifetimes 2.0.2", - "rustix 0.38.4", + "rustix 0.38.11", "windows-sys 0.48.0", - "winx 0.36.1", + "winx 0.36.2", ] [[package]] name = "target-lexicon" -version = "0.12.9" +version = "0.12.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df8e77cb757a61f51b947ec4a7e3646efd825b73561db1c232a8ccb639e611a0" +checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" [[package]] name = "tempfile" -version = "3.6.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ - "autocfg", "cfg-if 1.0.0", - "fastrand 1.9.0", + "fastrand", "redox_syscall 0.3.5", - "rustix 0.37.23", + "rustix 0.38.11", "windows-sys 0.48.0", ] @@ -3142,22 +3141,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.43" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42" +checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.43" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" +checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.29", ] [[package]] @@ -3173,10 +3172,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.23" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446" +checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" dependencies = [ + "deranged", "itoa", "serde", "time-core", @@ -3191,9 +3191,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.10" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ba15a897f3c86766b757e5ac7221554c6750054d74d5b28844fce5fb36a6c4" +checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" dependencies = [ "time-core", ] @@ -3215,11 +3215,10 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.29.1" +version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ - "autocfg", "backtrace", "bytes", "libc", @@ -3228,7 +3227,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.5.3", "tokio-macros", "windows-sys 0.48.0", ] @@ -3241,7 +3240,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.29", ] [[package]] @@ -3300,9 +3299,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.13" +version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f8751d9c1b03c6500c387e96f81f815a4f8e72d142d2d4a9ffa6fedd51ddee7" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ "indexmap 2.0.0", "serde", @@ -3338,7 +3337,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.29", ] [[package]] @@ -3358,14 +3357,15 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "ttrpc" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb03d0f5219ec54d870cb3d58719a2dc0b8849405b75a2e0968b3590392a5b0" +checksum = "55ea338db445bee75c596cf8a478fbfcefad5a943c9e92a7e1c805c65ed39551" dependencies = [ "byteorder", + "crossbeam", "libc", "log", - "nix 0.26.2", + "nix 0.26.4", "protobuf 3.2.0", "protobuf-codegen 3.2.0", "thiserror", @@ -3433,9 +3433,9 @@ dependencies = [ [[package]] name = "unicase" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" dependencies = [ "version_check", ] @@ -3448,9 +3448,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" @@ -3481,20 +3481,28 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "url" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utils" +version = "0.9.0" +dependencies = [ + "anyhow", + "oci-spec", +] + [[package]] name = "utoipa" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520434cac5c98120177d5cc15be032703f6dca7d5ef82e725c798113b375000a" +checksum = "d82b1bc5417102a73e8464c686eef947bdfb99fcdfc0a4f228e81afa9526470a" dependencies = [ "indexmap 2.0.0", "serde", @@ -3504,22 +3512,22 @@ dependencies = [ [[package]] name = "utoipa-gen" -version = "3.4.1" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e22e88a487b6e0374533871b79b1f5ded05671bd0936bd547eb42f82fb9060d" +checksum = "05d96dcd6fc96f3df9b3280ef480770af1b7c5d14bc55192baa9b067976d920c" dependencies = [ "proc-macro-error", "proc-macro2", "quote", "regex", - "syn 2.0.25", + "syn 2.0.29", ] [[package]] name = "uuid" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d023da39d1fde5a8a3fe1f3e01ca9632ada0a63e9797de55a879d6e2236277be" +checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" [[package]] name = "vcpkg" @@ -3629,7 +3637,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.29", "wasm-bindgen-shared", ] @@ -3663,7 +3671,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.29", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3685,9 +3693,9 @@ dependencies = [ [[package]] name = "wasm-encoder" -version = "0.30.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2f8e9778e04cbf44f58acc301372577375a666b966c50b03ef46144f80436a8" +checksum = "1ba64e81215916eaeb48fee292f29401d69235d62d8b8fd92a7b2844ec5ae5f7" dependencies = [ "leb128", ] @@ -3704,9 +3712,9 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.108.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c956109dcb41436a39391139d9b6e2d0a5e0b158e1293ef352ec977e5e36c5" +checksum = "e986b010f47fcce49cf8ea5d5f9e5d2737832f12b53ae8ae785bbe895d0877bf" dependencies = [ "indexmap 2.0.0", "semver", @@ -3714,12 +3722,12 @@ dependencies = [ [[package]] name = "wasmprinter" -version = "0.2.60" +version = "0.2.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b76cb909fe3d9b0de58cee1f4072247e680ff5cc1558ccad2790a9de14a23993" +checksum = "34ddf5892036cd4b780d505eff1194a0cbc10ed896097656fdcea3744b5e7c2f" dependencies = [ "anyhow", - "wasmparser 0.108.0", + "wasmparser 0.112.0", ] [[package]] @@ -3823,7 +3831,7 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli", + "gimli 0.27.3", "log", "object 0.30.4", "target-lexicon", @@ -3843,7 +3851,7 @@ dependencies = [ "cranelift-codegen", "cranelift-control", "cranelift-native", - "gimli", + "gimli 0.27.3", "object 0.30.4", "target-lexicon", "wasmtime-environ", @@ -3857,7 +3865,7 @@ checksum = "41f9e58e0ee7d43ff13e75375c726b16bce022db798d3a099a65eeaa7d7a544b" dependencies = [ "anyhow", "cranelift-entity", - "gimli", + "gimli 0.27.3", "indexmap 1.9.3", "log", "object 0.30.4", @@ -3895,7 +3903,7 @@ dependencies = [ "bincode", "cfg-if 1.0.0", "cpp_demangle", - "gimli", + "gimli 0.27.3", "ittapi", "log", "object 0.30.4", @@ -4006,7 +4014,7 @@ checksum = "60160d8f7d2b301790730dac8ff25156c61d4fed79481e7074c21dd1283cfe2f" dependencies = [ "anyhow", "cranelift-codegen", - "gimli", + "gimli 0.27.3", "object 0.30.4", "target-lexicon", "wasmparser 0.107.0", @@ -4037,23 +4045,23 @@ dependencies = [ [[package]] name = "wast" -version = "61.0.0" +version = "64.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6b347851b52fd500657d301155c79e8c67595501d179cef87b6f04ebd25ac4" +checksum = "a259b226fd6910225aa7baeba82f9d9933b6d00f2ce1b49b80fa4214328237cc" dependencies = [ "leb128", "memchr", "unicode-width", - "wasm-encoder 0.30.0", + "wasm-encoder 0.32.0", ] [[package]] name = "wat" -version = "1.0.67" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "459e764d27c3ab7beba1ebd617cc025c7e76dea6e7c5ce3189989a970aea3491" +checksum = "53253d920ab413fca1c7dc2161d601c79b4fdf631d0ba51dd4343bf9b556c3f6" dependencies = [ - "wast 61.0.0", + "wast 64.0.0", ] [[package]] @@ -4173,7 +4181,7 @@ checksum = "525fdd0d4e82d1bd3083bd87e8ca8014abfbdc5bf290d1d5371dac440d351e89" dependencies = [ "anyhow", "cranelift-codegen", - "gimli", + "gimli 0.27.3", "regalloc2", "smallvec", "target-lexicon", @@ -4187,7 +4195,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -4205,7 +4213,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -4225,17 +4233,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -4246,9 +4254,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -4258,9 +4266,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -4270,9 +4278,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -4282,9 +4290,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -4294,9 +4302,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" @@ -4306,9 +4314,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -4318,26 +4326,27 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.5.0" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fac9742fd1ad1bd9643b991319f72dd031016d44b77039a26977eb667141e7" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" dependencies = [ "memchr", ] [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi", + "cfg-if 1.0.0", + "windows-sys 0.48.0", ] [[package]] @@ -4353,11 +4362,11 @@ dependencies = [ [[package]] name = "winx" -version = "0.36.1" +version = "0.36.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4857cedf8371f690bb6782a3e2b065c54d1b6661be068aaf3eac8b45e813fdf8" +checksum = "357bb8e2932df531f83b052264b050b81ba0df90ee5a59b2d1d3949f344f81e5" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "windows-sys 0.48.0", ] @@ -4600,11 +4609,11 @@ dependencies = [ [[package]] name = "zstd" -version = "0.12.3+zstd.1.5.2" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76eea132fb024e0e13fd9c2f5d5d595d8a967aa72382ac2f9d39fcc95afd0806" +checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" dependencies = [ - "zstd-safe 6.0.5+zstd.1.5.4", + "zstd-safe 6.0.6", ] [[package]] @@ -4619,9 +4628,9 @@ dependencies = [ [[package]] name = "zstd-safe" -version = "6.0.5+zstd.1.5.4" +version = "6.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56d9e60b4b1758206c238a10165fbcae3ca37b01744e394c463463f6529d23b" +checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" dependencies = [ "libc", "zstd-sys", diff --git a/containerd-shim-wws-v1/Cargo.toml b/containerd-shim-wws-v1/Cargo.toml index dcde9b19..b9f97cec 100644 --- a/containerd-shim-wws-v1/Cargo.toml +++ b/containerd-shim-wws-v1/Cargo.toml @@ -14,7 +14,8 @@ Containerd shim for running Wasm Workers Server workloads. [dependencies] containerd-shim = "0.5.0" -containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", rev = "c83ea9629bcc2377f54468700e6abbe4f5320b56", features = ["cgroupsv2"]} +containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", rev = "7e978edeaf34b54efb895738357c805cf888b76d", features = ["cgroupsv2"] } +libcontainer = { git = "https://github.com/containers/youki", rev = "09e67372a892f22a89eeef62ff429c3cbcac6d41", features = ["v2"], default-features = false } wws-config = { git = "https://github.com/vmware-labs/wasm-workers-server", tag = "v1.4.0" } wws-server = { git = "https://github.com/vmware-labs/wasm-workers-server", tag = "v1.4.0" } wws-router = { git = "https://github.com/vmware-labs/wasm-workers-server", tag = "v1.4.0" } @@ -22,16 +23,18 @@ log = "0.4" tokio = { version = "1", features = [ "full" ] } tokio-util = { version = "0.7", features = [ "codec" ]} chrono = "0.4" -libcontainer = { version = "0.1", features = ["v2"], default-features = false } oci-spec = "0.6.2" libc = "0.2.147" nix = "0.26.2" anyhow = "1.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" +utils = { path = "../utils" } [target.x86_64-unknown-linux-musl.dependencies] openssl = { version = "=0.10.48", features = ["vendored"] } [target.aarch64-unknown-linux-musl.dependencies] openssl = { version = "=0.10.48", features = ["vendored"] } + +[workspace] \ No newline at end of file diff --git a/containerd-shim-wws-v1/src/executor.rs b/containerd-shim-wws-v1/src/executor.rs index 0ca7b924..e2edc56d 100644 --- a/containerd-shim-wws-v1/src/executor.rs +++ b/containerd-shim-wws-v1/src/executor.rs @@ -1,13 +1,12 @@ -use anyhow::Result; +use anyhow::{Context, Result}; use log::{error, info}; -use nix::unistd::{dup, dup2}; -use std::{os::fd::RawFd, path::PathBuf}; +use std::path::Path; use tokio::runtime::Runtime; -use containerd_shim_wasm::sandbox::oci; -use libc::STDERR_FILENO; -use libcontainer::workload::{Executor, ExecutorError}; +use containerd_shim_wasm::{libcontainer_instance::LinuxContainerExecutor, sandbox::Stdio}; +use libcontainer::workload::{Executor, ExecutorError, ExecutorValidationError}; use oci_spec::runtime::Spec; +use utils::is_linux_executable; use wws_config::Config; use wws_router::Routes; use wws_server::serve; @@ -15,74 +14,64 @@ use wws_server::serve; /// URL to listen to in wws const WWS_ADDR: &str = "0.0.0.0"; const WWS_PORT: u16 = 3000; -const EXECUTOR_NAME: &str = "wws"; +#[derive(Clone)] pub struct WwsExecutor { - pub stderr: Option, + pub stdio: Stdio, } -impl WwsExecutor {} - -impl Executor for WwsExecutor { - fn exec(&self, spec: &Spec) -> Result<(), ExecutorError> { - let args = oci::get_args(spec); - if args.is_empty() { - return Err(ExecutorError::InvalidArg); - } - - prepare_stdio(self.stderr).map_err(|err| { - ExecutorError::Other(format!("failed to prepare stdio for container: {}", err)) - })?; +impl WwsExecutor { + pub fn new(stdio: Stdio) -> Self { + Self { stdio } + } - let path = PathBuf::from("/"); + fn wasm_exec(&self, _spec: &Spec) -> anyhow::Result<()> { + let stderr = self.stdio.take().stderr; + stderr.redirect().context("redirecting stdio")?; - let config = match Config::load(&path) { - Ok(c) => c, - Err(err) => { - error!("[wws] There was an error reading the .wws.toml file. It will be ignored"); - error!("[wws] Error: {err}"); + let path = Path::new("/"); - Config::default() - } - }; + let config = Config::load(path).unwrap_or_else(|err| { + error!("[wws] Error reading .wws.toml file. It will be ignored"); + error!("[wws] Error: {err}"); + Config::default() + }); // Check if there're missing runtimes - if config.is_missing_any_runtime(&path) { + if config.is_missing_any_runtime(path) { error!("[wws] Required language runtimes are not installed. Some files may not be considered workers"); error!("[wws] You can install the missing runtimes with: wws runtimes install"); } - let routes = Routes::new(&path, "", Vec::new(), &config); + let routes = Routes::new(path, "", Vec::new(), &config); - let rt = Runtime::new().unwrap(); - rt.block_on(async { - let f = serve(&path, routes, WWS_ADDR, WWS_PORT, false, None) - .await - .unwrap(); - info!(" >>> notifying main thread we are about to start"); - tokio::select! { - _ = f => { - log::info!(" >>> server shut down: exiting"); - std::process::exit(0); - }, - }; - }); - std::process::exit(137); + let rt = Runtime::new().context("failed to create runtime")?; + rt.block_on(self.wasm_exec_async(path, routes)) } - fn can_handle(&self, _spec: &Spec) -> bool { - true + async fn wasm_exec_async(&self, root: &Path, routes: Routes) -> Result<()> { + let server = serve(root, routes, WWS_ADDR, WWS_PORT, false, None).await?; + info!(" >>> notifying main thread we are about to start"); + Ok(server.await?) } +} - fn name(&self) -> &'static str { - EXECUTOR_NAME +impl Executor for WwsExecutor { + fn exec(&self, spec: &Spec) -> Result<(), ExecutorError> { + if is_linux_executable(spec).is_ok() { + log::info!("executing linux container"); + LinuxContainerExecutor::new(self.stdio.clone()).exec(spec) + } else { + if let Err(err) = self.wasm_exec(spec) { + log::info!(" >>> server shut down due to error: {err}"); + std::process::exit(137); + } + log::info!(" >>> server shut down: exiting"); + std::process::exit(0); + } } -} -fn prepare_stdio(stderr: Option) -> Result<()> { - if let Some(stderr) = stderr { - dup(STDERR_FILENO)?; - dup2(stderr, STDERR_FILENO)?; + fn validate(&self, _spec: &Spec) -> Result<(), ExecutorValidationError> { + Ok(()) } - Ok(()) } diff --git a/containerd-shim-wws-v1/src/main.rs b/containerd-shim-wws-v1/src/main.rs index 890a5b49..5ec878ff 100644 --- a/containerd-shim-wws-v1/src/main.rs +++ b/containerd-shim-wws-v1/src/main.rs @@ -1,16 +1,14 @@ -use anyhow::Context; use containerd_shim as shim; use containerd_shim_wasm::libcontainer_instance::LibcontainerInstance; -use containerd_shim_wasm::libcontainer_instance::LinuxContainerExecutor; use containerd_shim_wasm::sandbox::instance::ExitCode; -use containerd_shim_wasm::sandbox::instance_utils::{determine_rootdir, maybe_open_stdio}; +use containerd_shim_wasm::sandbox::instance_utils::determine_rootdir; +use containerd_shim_wasm::sandbox::Stdio; use containerd_shim_wasm::sandbox::{error::Error, InstanceConfig, ShimCli}; use executor::WwsExecutor; use libcontainer::container::builder::ContainerBuilder; use libcontainer::container::Container; -use libcontainer::syscall::syscall::create_syscall; +use libcontainer::syscall::syscall::SyscallType; use std::option::Option; -use std::os::fd::IntoRawFd; use std::path::PathBuf; mod executor; @@ -25,7 +23,7 @@ pub struct Workers { // will change in the future. // stdin: String, // stdout: String, - stderr: String, + stdio: Stdio, bundle: String, rootdir: PathBuf, } @@ -51,7 +49,7 @@ impl LibcontainerInstance for Workers { // will change in the future. // stdin: cfg.get_stdin().unwrap_or_default(), // stdout: cfg.get_stdout().unwrap_or_default(), - stderr: cfg.get_stderr().unwrap_or_default(), + stdio: Stdio::init_from_cfg(cfg).expect("failed to open stdio"), bundle, rootdir, } @@ -70,17 +68,11 @@ impl LibcontainerInstance for Workers { } fn build_container(&self) -> std::result::Result { - let syscall = create_syscall(); - let stderr = maybe_open_stdio(&self.stderr) - .context("could not open stderr")? - .map(|f| f.into_raw_fd()); let err_others = |err| Error::Others(format!("failed to create container: {}", err)); - let spin_executor = Box::new(WwsExecutor { stderr }); - let default_executor = Box::::default(); + let wws_executor = WwsExecutor::new(self.stdio.take()); - let container = ContainerBuilder::new(self.id.clone(), syscall.as_ref()) - .with_executor(vec![default_executor, spin_executor]) - .map_err(err_others)? + let container = ContainerBuilder::new(self.id.clone(), SyscallType::Linux) + .with_executor(wws_executor) .with_root_path(self.rootdir.clone()) .map_err(err_others)? .as_init(&self.bundle) diff --git a/deployments/k3d/workload/workload.yaml b/deployments/k3d/workload/workload.yaml index b0e46540..6863f083 100644 --- a/deployments/k3d/workload/workload.yaml +++ b/deployments/k3d/workload/workload.yaml @@ -17,6 +17,7 @@ spec: - name: slight-hello imagePullPolicy: Never image: wasmtest_slight:latest + command: ["/"] resources: # limit the resources to 128Mi of memory and 100m of CPU limits: cpu: 100m @@ -54,6 +55,7 @@ spec: runtimeClassName: wasmtime-spin containers: - name: spin-hello + command: ["/"] imagePullPolicy: Never image: wasmtest_spin:latest --- diff --git a/images/lunatic-submillisecond/Dockerfile b/images/lunatic-submillisecond/Dockerfile index 2da3d2ed..e9b74215 100644 --- a/images/lunatic-submillisecond/Dockerfile +++ b/images/lunatic-submillisecond/Dockerfile @@ -5,5 +5,5 @@ RUN rustup target add wasm32-wasi RUN cargo build --release --target wasm32-wasi FROM scratch -COPY --link --chmod=0755 --from=build /build/target/wasm32-wasi/release/lunatic-submillisecond.wasm / +COPY --link --from=build /build/target/wasm32-wasi/release/lunatic-submillisecond.wasm / ENTRYPOINT [ "./lunatic-submillisecond.wasm" ] \ No newline at end of file diff --git a/images/lunatic/Dockerfile b/images/lunatic/Dockerfile index 86cb493d..18e56abf 100644 --- a/images/lunatic/Dockerfile +++ b/images/lunatic/Dockerfile @@ -5,5 +5,5 @@ RUN rustup target add wasm32-wasi RUN cargo build --release --target wasm32-wasi FROM scratch -COPY --link --chmod=0755 --from=build /build/target/wasm32-wasi/release/wasi-hello-world.wasm / +COPY --link --from=build /build/target/wasm32-wasi/release/wasi-hello-world.wasm / ENTRYPOINT [ "./wasi-hello-world.wasm" ] \ No newline at end of file diff --git a/images/slight/Dockerfile b/images/slight/Dockerfile index b66bea3e..a44bdde1 100644 --- a/images/slight/Dockerfile +++ b/images/slight/Dockerfile @@ -5,7 +5,6 @@ RUN rustup target add wasm32-wasi && cargo build --target wasm32-wasi --release RUN apt-get update && apt-get install ca-certificates -y FROM scratch -COPY --from=build --chmod=0755 /opt/build/target/wasm32-wasi/release/http_server_lib.wasm ./app.wasm +COPY --from=build /opt/build/target/wasm32-wasi/release/http_server_lib.wasm ./app.wasm COPY --from=build /opt/build/slightfile.toml . -COPY --from=build /etc/ssl /etc/ssl -ENTRYPOINT ["/app.wasm"] \ No newline at end of file +COPY --from=build /etc/ssl /etc/ssl \ No newline at end of file diff --git a/images/slight/src/lib.rs b/images/slight/src/lib.rs index 1692df54..0bd8d775 100644 --- a/images/slight/src/lib.rs +++ b/images/slight/src/lib.rs @@ -37,6 +37,7 @@ fn handle_hello(req: Request) -> Result { #[register_handler] fn handle_get(request: Request) -> Result { + println!("I just got a request uri: {} method: {}", request.uri, request.method); let keyvalue = Keyvalue::open("my-container").map_err(|e| HttpError::UnexpectedError(e.to_string()))?; @@ -57,6 +58,7 @@ fn handle_get(request: Request) -> Result { #[register_handler] fn handle_set(request: Request) -> Result { + println!("I just got a request uri: {} method: {}", request.uri, request.method); assert_eq!(request.method, Method::Put); if let Some(body) = request.body { let keyvalue = Keyvalue::open("my-container") diff --git a/images/spin/Dockerfile b/images/spin/Dockerfile index 1ef9874e..a2d0b490 100644 --- a/images/spin/Dockerfile +++ b/images/spin/Dockerfile @@ -10,7 +10,6 @@ RUN curl -LO https://github.com/tinygo-org/tinygo/releases/download/v0.25.0/tiny RUN cd go-hello && tinygo build -wasm-abi=generic -target=wasi -gc=leaking -o spin_go_hello.wasm main.go FROM scratch -COPY --from=build --chmod=0755 /opt/build/target/wasm32-wasi/release/spin_rust_hello.wasm . +COPY --from=build /opt/build/target/wasm32-wasi/release/spin_rust_hello.wasm . COPY --from=build /opt/build/spin.toml . -COPY --from=build-go --chmod=0755 /opt/build/go-hello/spin_go_hello.wasm . -ENTRYPOINT [ "./spin_rust_hello.wasm" ] \ No newline at end of file +COPY --from=build-go /opt/build/go-hello/spin_go_hello.wasm . diff --git a/scripts/down.sh b/scripts/down.sh index 21e3d3b8..18d614a0 100755 --- a/scripts/down.sh +++ b/scripts/down.sh @@ -3,6 +3,8 @@ set -euo pipefail cluster_name="test-cluster" +dockerfile_path="deployments/k3d" +bin_path="${dockerfile_path}/.tmp/" teardown_test() { # delete k3d cluster @@ -10,6 +12,12 @@ teardown_test() { # delete docker image docker rmi k3d-shim-test + + # remote test folder + rm -r ./test + + # delete binaries + rm -r "$bin_path" } teardown_test \ No newline at end of file diff --git a/tests/Cargo.toml b/tests/Cargo.toml new file mode 100644 index 00000000..45d7de4d --- /dev/null +++ b/tests/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "containerd-wasm-shims-tests" +version.workspace = true +edition.workspace = true +license.workspace = true + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +anyhow = "1" +kube = { version = "0.85", features = ["runtime", "derive"] } +k8s-openapi = { version = "0.19", features = ["v1_25"] } +curl = { version = "0.4", features = ["static-curl"]} +rand = "0.8" +tokio = { version = "1", features = ["rt", "macros"] } + +[dev-dependencies] +http = "0.2" +tower = "0.4" +hyper = "0.14" \ No newline at end of file diff --git a/tests/integration_test.rs b/tests/integration_test.rs deleted file mode 100644 index 0d1129a3..00000000 --- a/tests/integration_test.rs +++ /dev/null @@ -1,120 +0,0 @@ -use anyhow::Result; -use common::{list_pods, random_payload, retry_get, retry_put}; -mod common; - -const RETRY_TIMES: u32 = 5; -const INTERVAL_IN_SECS: u64 = 10; - -#[tokio::test] -async fn slight_test() -> Result<()> { - let host_port = 8082; - // check the test pod is running - let cluster_name = format!("k3d-{}-{}", "test", "cluster"); - list_pods(&cluster_name).await?; - - // curl for hello - println!(" >>> curl http://localhost:{}/slight/hello", host_port); - let mut res = Vec::new(); - retry_get( - &format!("http://localhost:{}/slight/hello", host_port), - &mut res, - RETRY_TIMES, - INTERVAL_IN_SECS, - ) - .await?; - println!("{}", String::from_utf8_lossy(&res)); - - // put and get - println!( - " >>> curl -X PUT http://localhost:{}/slight/set -d ", - host_port - ); - let payload = random_payload().await; - let mut res = Vec::new(); - retry_put( - &format!("http://localhost:{}/slight/set", host_port), - &payload, - RETRY_TIMES, - INTERVAL_IN_SECS, - ) - .await?; - retry_get( - &format!("http://localhost:{}/slight/get", host_port), - &mut res, - RETRY_TIMES, - INTERVAL_IN_SECS, - ) - .await?; - assert_eq!(String::from_utf8_lossy(&res), payload); - - Ok(()) -} - -#[tokio::test] -async fn spin_test() -> Result<()> { - let host_port = 8082; - - // check the test pod is running - let cluster_name = format!("k3d-{}-{}", "test", "cluster"); - list_pods(&cluster_name).await?; - - // curl for hello - println!(" >>> curl http://localhost:{}/spin/hello", host_port); - let mut res = Vec::new(); - retry_get( - &format!("http://localhost:{}/spin/hello", host_port), - &mut res, - RETRY_TIMES, - INTERVAL_IN_SECS, - ) - .await?; - println!("{}", String::from_utf8_lossy(&res)); - - Ok(()) -} - -#[tokio::test] -async fn wws_test() -> Result<()> { - let host_port = 8082; - - // check the test pod is running - let cluster_name = format!("k3d-{}-{}", "test", "cluster"); - list_pods(&cluster_name).await?; - - // curl for hello - println!(" >>> curl http://localhost:{}/wws/hello", host_port); - let mut res = Vec::new(); - retry_get( - &format!("http://localhost:{}/wws/hello", host_port), - &mut res, - RETRY_TIMES, - INTERVAL_IN_SECS, - ) - .await?; - println!("{}", String::from_utf8_lossy(&res)); - - Ok(()) -} - -#[tokio::test] -async fn lunatic_test() -> Result<()> { - let host_port = 8082; - - // check the test pod is running - let cluster_name = format!("k3d-{}-{}", "test", "cluster"); - list_pods(&cluster_name).await?; - - // curl for hello - println!(" >>> curl http://localhost:{}/lunatic/hello", host_port); - let mut res = Vec::new(); - retry_get( - &format!("http://localhost:{}/lunatic/hello", host_port), - &mut res, - RETRY_TIMES, - INTERVAL_IN_SECS, - ) - .await?; - println!("{}", String::from_utf8_lossy(&res)); - - Ok(()) -} diff --git a/tests/src/integration_test.rs b/tests/src/integration_test.rs new file mode 100644 index 00000000..b04e6232 --- /dev/null +++ b/tests/src/integration_test.rs @@ -0,0 +1,123 @@ +#[cfg(test)] +mod test { + + use crate::{list_pods, random_payload, retry_get, retry_put}; + use anyhow::Result; + + const RETRY_TIMES: u32 = 5; + const INTERVAL_IN_SECS: u64 = 10; + + #[tokio::test] + async fn slight_test() -> Result<()> { + let host_port = 8082; + // check the test pod is running + let cluster_name = format!("k3d-{}-{}", "test", "cluster"); + list_pods(&cluster_name).await?; + + // curl for hello + println!(" >>> curl http://localhost:{}/slight/hello", host_port); + let mut res = Vec::new(); + retry_get( + &format!("http://localhost:{}/slight/hello", host_port), + &mut res, + RETRY_TIMES, + INTERVAL_IN_SECS, + ) + .await?; + println!("{}", String::from_utf8_lossy(&res)); + + // put and get + println!( + " >>> curl -X PUT http://localhost:{}/slight/set -d ", + host_port + ); + let payload = random_payload().await; + let mut res = Vec::new(); + retry_put( + &format!("http://localhost:{}/slight/set", host_port), + &payload, + RETRY_TIMES, + INTERVAL_IN_SECS, + ) + .await?; + retry_get( + &format!("http://localhost:{}/slight/get", host_port), + &mut res, + RETRY_TIMES, + INTERVAL_IN_SECS, + ) + .await?; + assert_eq!(String::from_utf8_lossy(&res), payload); + + Ok(()) + } + + #[tokio::test] + async fn spin_test() -> Result<()> { + let host_port = 8082; + + // check the test pod is running + let cluster_name = format!("k3d-{}-{}", "test", "cluster"); + list_pods(&cluster_name).await?; + + // curl for hello + println!(" >>> curl http://localhost:{}/spin/hello", host_port); + let mut res = Vec::new(); + retry_get( + &format!("http://localhost:{}/spin/hello", host_port), + &mut res, + RETRY_TIMES, + INTERVAL_IN_SECS, + ) + .await?; + println!("{}", String::from_utf8_lossy(&res)); + + Ok(()) + } + + #[tokio::test] + async fn wws_test() -> Result<()> { + let host_port = 8082; + + // check the test pod is running + let cluster_name = format!("k3d-{}-{}", "test", "cluster"); + list_pods(&cluster_name).await?; + + // curl for hello + println!(" >>> curl http://localhost:{}/wws/hello", host_port); + let mut res = Vec::new(); + retry_get( + &format!("http://localhost:{}/wws/hello", host_port), + &mut res, + RETRY_TIMES, + INTERVAL_IN_SECS, + ) + .await?; + println!("{}", String::from_utf8_lossy(&res)); + + Ok(()) + } + + #[tokio::test] + async fn lunatic_test() -> Result<()> { + let host_port = 8082; + + // check the test pod is running + let cluster_name = format!("k3d-{}-{}", "test", "cluster"); + list_pods(&cluster_name).await?; + + // curl for hello + println!(" >>> curl http://localhost:{}/lunatic/hello", host_port); + let mut res = Vec::new(); + retry_get( + &format!("http://localhost:{}/lunatic/hello", host_port), + &mut res, + RETRY_TIMES, + INTERVAL_IN_SECS, + ) + .await?; + println!("{}", String::from_utf8_lossy(&res)); + + Ok(()) + } +} diff --git a/tests/common/mod.rs b/tests/src/lib.rs similarity index 68% rename from tests/common/mod.rs rename to tests/src/lib.rs index a2dc6395..38afa3c4 100644 --- a/tests/common/mod.rs +++ b/tests/src/lib.rs @@ -1,4 +1,4 @@ -use std::{io::Read, time::Duration}; +use std::{process::Command, time::Duration}; use anyhow::Result; use curl::easy::Easy; @@ -6,6 +6,8 @@ use k8s_openapi::api::core::v1::Pod; use kube::{api::ListParams, config::KubeConfigOptions, Api, Client, Config, ResourceExt}; use rand::{distributions::Alphanumeric, Rng}; +mod integration_test; + pub async fn retry_get( url: &str, buf: &mut Vec, @@ -26,12 +28,19 @@ pub async fn retry_get( }; let response_code = handle.response_code()?; // verify res is ok and not 404 - if res.is_ok() && response_code != 404 { - break; + match res { + Ok(_) => { + if response_code != 404 { + break; + } + } + Err(e) => { + println!("res: {}, response_code: {}", e, response_code); + } } i += 1; if i == retry_times { - anyhow::bail!("failed to curl for hello"); + anyhow::bail!("failed to curl for {}", url); } tokio::time::sleep(Duration::from_secs(interval_in_secs)).await; } @@ -45,29 +54,33 @@ pub async fn retry_put( interval_in_secs: u64, ) -> Result<()> { let mut i = 0; - let mut handle = Easy::new(); - handle.url(url)?; - handle.put(true)?; - handle.post_field_size(data.len() as u64)?; loop { - let res = { - let mut transfer = handle.transfer(); - transfer.read_function(|into| Ok(data.as_bytes().read(into).unwrap_or(0)))?; - transfer.write_function(|data| { - println!("{}", String::from_utf8_lossy(data)); - Ok(data.len()) - })?; - transfer.perform() - }; + let output = Command::new("curl") + .arg("-X") + .arg("PUT") + .arg(url) + .arg("-d") + .arg(data) + .arg("-s") + .arg("-o") + .arg("/dev/null") + .arg("-w") + .arg("%{http_code}") + .output()?; - let response_code = handle.response_code()?; - if res.is_ok() && response_code != 404 { + let response_code = String::from_utf8_lossy(&output.stdout) + .trim() + .parse::()?; + + if response_code != 404 { break; } + i += 1; if i == retry_times { - anyhow::bail!("failed to curl for hello"); + anyhow::bail!("failed to curl for {}", url); } + tokio::time::sleep(Duration::from_secs(interval_in_secs)).await; } Ok(()) diff --git a/tests/workloads/workload.yaml b/tests/workloads/workload.yaml index 83cc132c..ffb508b1 100644 --- a/tests/workloads/workload.yaml +++ b/tests/workloads/workload.yaml @@ -17,6 +17,7 @@ spec: - name: testwasm image: docker.io/library/slight-hello-world:latest imagePullPolicy: Never # prevent k8s from pulling the image from a registry + command: ["/"] resources: # limit the resources to 128Mi of memory and 100m of CPU limits: cpu: 100m @@ -56,6 +57,7 @@ spec: - name: testwasm image: docker.io/library/spin-hello-world:latest imagePullPolicy: Never # prevent k8s from pulling the image from a registry + command: ["/"] resources: # limit the resources to 128Mi of memory and 100m of CPU limits: cpu: 100m diff --git a/utils/Cargo.toml b/utils/Cargo.toml new file mode 100644 index 00000000..9e04699c --- /dev/null +++ b/utils/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "utils" +version.workspace = true +edition.workspace = true +license.workspace = true + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +anyhow = "1" +oci-spec = "0.6.2" \ No newline at end of file diff --git a/utils/src/lib.rs b/utils/src/lib.rs new file mode 100644 index 00000000..8ecc537f --- /dev/null +++ b/utils/src/lib.rs @@ -0,0 +1,62 @@ +use anyhow::{bail, ensure, Context}; +use oci_spec::runtime::Spec; +use std::fs::File; +use std::io::Read; +use std::os::unix::fs::PermissionsExt; + +pub fn get_args(spec: &Spec) -> Vec { + let p = match spec.process() { + None => return vec![], + Some(p) => p, + }; + + match p.args() { + None => vec![], + Some(args) => args.as_slice().to_vec(), + } +} + +pub fn is_linux_executable(spec: &Spec) -> anyhow::Result<()> { + let args = get_args(spec).to_vec(); + + let executable = args.first().context("no executable provided")?; + ensure!(!executable.is_empty(), "executable is empty"); + let cwd = std::env::current_dir()?; + + let executable = if executable.contains('/') { + let path = cwd.join(executable); + ensure!(path.is_file(), "file not found"); + path + } else { + spec.process() + .as_ref() + .and_then(|p| p.env().clone()) + .unwrap_or_default() + .into_iter() + .map(|v| match v.split_once('=') { + None => (v, "".to_string()), + Some((k, v)) => (k.to_string(), v.to_string()), + }) + .find(|(key, _)| key == "PATH") + .context("PATH not defined")? + .1 + .split(':') + .map(|p| cwd.join(p).join(executable)) + .find(|p| p.is_file()) + .context("file not found")? + }; + + let mode = executable.metadata()?.permissions().mode(); + ensure!(mode & 0o001 != 0, "entrypoint is not a executable"); + + // check the shebang and ELF magic number + // https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header + let mut buffer = [0; 4]; + File::open(&executable)?.read_exact(&mut buffer)?; + + match buffer { + [0x7f, 0x45, 0x4c, 0x46] => Ok(()), // ELF magic number + [0x23, 0x21, ..] => Ok(()), // shebang + _ => bail!("{executable:?} is not a valid script or elf file"), + } +}