From 3b2686b9ca90621822577389a46888a5e5ce47bd Mon Sep 17 00:00:00 2001 From: oddgrd <29732646+oddgrd@users.noreply.github.com> Date: Thu, 22 Dec 2022 13:58:47 +0100 Subject: [PATCH 1/2] fix: axum tests --- runtime/Cargo.toml | 1 - runtime/src/axum/mod.rs | 8 ++++---- tmp/axum-wasm/Cargo.toml | 5 ++--- tmp/axum-wasm/src/lib.rs | 3 +-- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index d9b757938..cc4b17623 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -33,5 +33,4 @@ workspace = true [dependencies.shuttle-service] workspace = true -version = "0.8.0" features = ["loader"] diff --git a/runtime/src/axum/mod.rs b/runtime/src/axum/mod.rs index 7dfdc9bc8..13c1095c3 100644 --- a/runtime/src/axum/mod.rs +++ b/runtime/src/axum/mod.rs @@ -323,7 +323,7 @@ pub mod tests { #[tokio::test] async fn axum() { let axum = Router::new("axum.wasm"); - let mut inner = axum.inner; + let inner = axum.inner; // GET /hello let request: Request = Request::builder() @@ -333,7 +333,7 @@ pub mod tests { .body(Body::empty()) .unwrap(); - let res = inner.handle_request(request).await.unwrap(); + let res = inner.clone().handle_request(request).await.unwrap(); assert_eq!(res.status(), StatusCode::OK); assert_eq!( @@ -356,7 +356,7 @@ pub mod tests { .body(Body::from("Goodbye world body")) .unwrap(); - let res = inner.handle_request(request).await.unwrap(); + let res = inner.clone().handle_request(request).await.unwrap(); assert_eq!(res.status(), StatusCode::OK); assert_eq!( @@ -379,7 +379,7 @@ pub mod tests { .body(Body::empty()) .unwrap(); - let res = inner.handle_request(request).await.unwrap(); + let res = inner.clone().handle_request(request).await.unwrap(); assert_eq!(res.status(), StatusCode::NOT_FOUND); } diff --git a/tmp/axum-wasm/Cargo.toml b/tmp/axum-wasm/Cargo.toml index 52c5418cf..1b01b15a9 100644 --- a/tmp/axum-wasm/Cargo.toml +++ b/tmp/axum-wasm/Cargo.toml @@ -9,7 +9,7 @@ crate-type = [ "cdylib" ] [dependencies] # most axum features can be enabled, but "tokio" and "ws" depend on socket2 # via "hyper/tcp" which is not compatible with wasi -axum = { version = "0.6.0-rc.4", default-features = false } +axum = { version = "0.6.0", default-features = false } futures-executor = "0.3.21" http = "0.2.7" tower-service = "0.3.1" @@ -17,6 +17,5 @@ rmp-serde = { version = "1.1.1" } [dependencies.shuttle-common] path = "../../common" -default-features = false features = ["axum-wasm"] -version = "0.7.0" +version = "0.8.0" diff --git a/tmp/axum-wasm/src/lib.rs b/tmp/axum-wasm/src/lib.rs index 00c3778c2..23f49b0c5 100644 --- a/tmp/axum-wasm/src/lib.rs +++ b/tmp/axum-wasm/src/lib.rs @@ -13,8 +13,7 @@ where let mut router = axum::Router::new() .route("/hello", axum::routing::get(hello)) - .route("/goodbye", axum::routing::get(goodbye)) - .into_service(); + .route("/goodbye", axum::routing::get(goodbye)); let response = router.call(request).await.unwrap(); From f90b955771801fbb8cfcaa8a1229b7963681f0db Mon Sep 17 00:00:00 2001 From: oddgrd <29732646+oddgrd@users.noreply.github.com> Date: Thu, 22 Dec 2022 14:02:25 +0100 Subject: [PATCH 2/2] feat: bump wasmtime crates --- Cargo.lock | 331 +++++++++++++++++++--------------------- runtime/Cargo.toml | 10 +- runtime/src/axum/mod.rs | 2 +- 3 files changed, 161 insertions(+), 182 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 17ed9210b..85aeaab15 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1332,39 +1332,38 @@ dependencies = [ [[package]] name = "cap-fs-ext" -version = "0.26.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b0e103ce36d217d568903ad27b14ec2238ecb5d65bad2e756a8f3c0d651506e" +checksum = "15ed685fe2949d035b080fbe7536b944efffb648af1d34630aa887ca2b132d2b" dependencies = [ "cap-primitives", "cap-std", - "io-lifetimes 0.7.4", - "windows-sys 0.36.1", + "io-lifetimes", + "windows-sys 0.42.0", ] [[package]] name = "cap-primitives" -version = "0.26.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af3f336aa91cce16033ed3c94ac91d98956c49b420e6d6cd0dd7d0e386a57085" +checksum = "0315442c0232cb9a1c2be55ee289a0e9bf5fd0b0f162be8e7f16673e095f5e09" dependencies = [ "ambient-authority", "fs-set-times", "io-extras", - "io-lifetimes 0.7.4", + "io-lifetimes", "ipnet", "maybe-owned", - "rustix 0.35.12", - "winapi-util", - "windows-sys 0.36.1", + "rustix", + "windows-sys 0.42.0", "winx", ] [[package]] name = "cap-rand" -version = "0.26.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d14b9606aa9550d34651bc481443203bc014237bdb992d201d2afa62d2ec6dea" +checksum = "b78d30c0b3c656f6193bef0697cff6bd903d9b2b1437c7af3d35a6a9d1a7af2e" dependencies = [ "ambient-authority", "rand 0.8.5", @@ -1372,26 +1371,26 @@ dependencies = [ [[package]] name = "cap-std" -version = "0.26.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9d6e70b626eceac9d6fc790fe2d72cc3f2f7bc3c35f467690c54a526b0f56db" +checksum = "3e9256648eae510b29aae4d52ed71877239a61f9a2494d23ddad7fb6f50e5de8" dependencies = [ "cap-primitives", "io-extras", - "io-lifetimes 0.7.4", + "io-lifetimes", "ipnet", - "rustix 0.35.12", + "rustix", ] [[package]] name = "cap-time-ext" -version = "0.26.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3a0524f7c4cff2ea547ae2b652bf7a348fd3e48f76556dc928d8b45ab2f1d50" +checksum = "384a81c0fb05dbd361f157fd2c822e3d16709540e49300d26a27d3d57f02e8cb" dependencies = [ "cap-primitives", "once_cell", - "rustix 0.35.12", + "rustix", "winx", ] @@ -1679,7 +1678,7 @@ dependencies = [ "bitflags", "clap_derive 4.0.21", "clap_lex 0.3.0", - "is-terminal 0.4.0", + "is-terminal", "once_cell", "strsim", "termcolor", @@ -1940,24 +1939,25 @@ checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" [[package]] name = "cranelift-bforest" -version = "0.89.0" +version = "0.91.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be5e1ee4c22871d24a95196ea7047d58c1d978e46c88037d3d397b3b3e0af360" +checksum = "fc952b310b24444fc14ab8b9cbe3fafd7e7329e3eec84c3a9b11d2b5cf6f3be1" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.89.0" +version = "0.91.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f600a52d59eed56a85f33750873b3b42d61e35ca777cd792369893f9e1f9dd" +checksum = "e73470419b33011e50dbf0f6439cbccbaabe9381de172da4e1b6efcda4bb8fa7" dependencies = [ "arrayvec 0.7.2", "bumpalo", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", + "cranelift-egraph", "cranelift-entity", "cranelift-isle", "gimli", @@ -1969,33 +1969,47 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.89.0" +version = "0.91.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8418218d0953d73e9b96e9d9ffec56145efa4f18988251530b5872ae4410563" +checksum = "911a1872464108a11ac9965c2b079e61bbdf1bc2e0b9001264264add2e12a38f" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.89.0" +version = "0.91.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f01be0cfd40aba59153236ab4b99062131b5bbe6f9f3d4bcb238bd2f96ff5262" +checksum = "e036f3f07adb24a86fb46e977e8fe03b18bb16b1eada949cf2c48283e5f8a862" + +[[package]] +name = "cranelift-egraph" +version = "0.91.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d6c623f4b5d2a6bad32c403f03765d4484a827eb93ee78f8cb6219ef118fd59" +dependencies = [ + "cranelift-entity", + "fxhash", + "hashbrown", + "indexmap", + "log", + "smallvec", +] [[package]] name = "cranelift-entity" -version = "0.89.0" +version = "0.91.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddae4fec5d6859233ffa175b61d269443c473b3971a2c3e69008c8d3e83d5825" +checksum = "74385eb5e405b3562f0caa7bcc4ab9a93c7958dd5bcd0e910bffb7765eacd6fc" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.89.0" +version = "0.91.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cc3deb0df97748434cf9f7e404f1f5134f6a253fc9a6bca25c5cd6804c08d3" +checksum = "8a4ac920422ee36bff2c66257fec861765e3d95a125cdf58d8c0f3bba7e40e61" dependencies = [ "cranelift-codegen", "log", @@ -2005,18 +2019,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.89.0" +version = "0.91.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc3bb54287de9c36ba354eb849fefb77b5e73955058745fd08f12cfdfa181866" -dependencies = [ - "rayon", -] +checksum = "c541263fb37ad2baa53ec8c37218ee5d02fa0984670d9419dedd8002ea68ff08" [[package]] name = "cranelift-native" -version = "0.89.0" +version = "0.91.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8c2a4f2efdce1de1f94e74f12b3b4144e3bcafa6011338b87388325d72d2120" +checksum = "1de5d7a063e8563d670aaca38de16591a9b70dc66cbad4d49a7b4ae8395fd1ce" dependencies = [ "cranelift-codegen", "libc", @@ -2025,9 +2036,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.89.0" +version = "0.91.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f918c37eb01f5b5ccc632e0ef3b4bf9ee03b5d4c267d3d2d3b62720a6bce0180" +checksum = "dfbc4dd03b713b5d71b582915b8c272f4813cdd8c99a3e03d9ba70c44468a6e0" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -2807,13 +2818,13 @@ checksum = "3b5dd19b048b2dfde153588594b4f3da47b18afd18d171bb8d1d27741256bbaa" [[package]] name = "fs-set-times" -version = "0.17.1" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a267b6a9304912e018610d53fe07115d8b530b160e85db4d2d3a59f3ddde1aec" +checksum = "e25ca26b0001154679ce0901527330e6153b670d17ccd1f86bab4e45dfba1a74" dependencies = [ - "io-lifetimes 0.7.4", - "rustix 0.35.12", - "windows-sys 0.36.1", + "io-lifetimes", + "rustix", + "windows-sys 0.42.0", ] [[package]] @@ -3120,9 +3131,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db0d4cf898abf0081f964436dc980e96670a0f36863e4b83aaacdb65c9d7ccc3" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ "ahash", ] @@ -3610,22 +3621,12 @@ dependencies = [ [[package]] name = "io-extras" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5d8c2ab5becd8720e30fd25f8fa5500d8dc3fceadd8378f05859bd7b46fc49" -dependencies = [ - "io-lifetimes 0.7.4", - "windows-sys 0.36.1", -] - -[[package]] -name = "io-lifetimes" -version = "0.7.4" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e481ccbe3dea62107216d0d1138bb8ad8e5e5c43009a098bd1990272c497b0" +checksum = "4ad797ac2cd70ff82f6d9246d36762b41c1db15b439fd48bcb70914269642354" dependencies = [ - "libc", - "windows-sys 0.36.1", + "io-lifetimes", + "windows-sys 0.42.0", ] [[package]] @@ -3665,18 +3666,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" -[[package]] -name = "is-terminal" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d508111813f9af3afd2f92758f77e4ed2cc9371b642112c6a48d22eb73105c5" -dependencies = [ - "hermit-abi 0.2.6", - "io-lifetimes 0.7.4", - "rustix 0.35.12", - "windows-sys 0.36.1", -] - [[package]] name = "is-terminal" version = "0.4.0" @@ -3684,8 +3673,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aae5bc6e2eb41c9def29a3e0f1306382807764b9b53112030eff57435667352d" dependencies = [ "hermit-abi 0.2.6", - "io-lifetimes 1.0.3", - "rustix 0.36.3", + "io-lifetimes", + "rustix", "windows-sys 0.42.0", ] @@ -3893,12 +3882,6 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" -[[package]] -name = "linux-raw-sys" -version = "0.0.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d" - [[package]] name = "linux-raw-sys" version = "0.1.3" @@ -4036,11 +4019,11 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memfd" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "480b5a5de855d11ff13195950bdc8b98b5e942ef47afc447f6615cdcc4e15d80" +checksum = "b20a59d985586e4a5aef64564ac77299f8586d8be6cf9106a5a40207e8908efb" dependencies = [ - "rustix 0.35.12", + "rustix", ] [[package]] @@ -5332,9 +5315,9 @@ dependencies = [ [[package]] name = "regalloc2" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69025b4a161879ba90719837c06621c3d73cffa147a000aeacf458f6a9572485" +checksum = "300d4fbfb40c1c66a78ba3ddd41c1110247cf52f97b87d0f2fc9209bd49b030c" dependencies = [ "fxhash", "log", @@ -5681,22 +5664,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "rustix" -version = "0.35.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "985947f9b6423159c4726323f373be0a21bdb514c5af06a849cb3d2dce2d01e8" -dependencies = [ - "bitflags", - "errno", - "io-lifetimes 0.7.4", - "itoa 1.0.2", - "libc", - "linux-raw-sys 0.0.46", - "once_cell", - "windows-sys 0.36.1", -] - [[package]] name = "rustix" version = "0.36.3" @@ -5705,9 +5672,11 @@ checksum = "0b1fbb4dfc4eb1d390c02df47760bb19a84bb80b301ecc947ab5406394d8223e" dependencies = [ "bitflags", "errno", - "io-lifetimes 1.0.3", + "io-lifetimes", + "itoa 1.0.2", "libc", - "linux-raw-sys 0.1.3", + "linux-raw-sys", + "once_cell", "windows-sys 0.42.0", ] @@ -6867,17 +6836,16 @@ checksum = "20518fe4a4c9acf048008599e464deb21beeae3d3578418951a189c235a7a9a8" [[package]] name = "system-interface" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92adbaf536f5aff6986e1e62ba36cee72b1718c5153eee08b9e728ddde3f6029" +checksum = "77b5f685b54fe35201ca824534425d4af3562470fb67682cf20130c568b49042" dependencies = [ - "atty", "bitflags", "cap-fs-ext", "cap-std", - "io-lifetimes 0.7.4", - "rustix 0.35.12", - "windows-sys 0.36.1", + "io-lifetimes", + "rustix", + "windows-sys 0.42.0", "winx", ] @@ -6971,7 +6939,7 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb20089a8ba2b69debd491f8d2d023761cbf196e999218c591fa1e7e15a21907" dependencies = [ - "rustix 0.36.3", + "rustix", "windows-sys 0.42.0", ] @@ -8030,9 +7998,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasi-cap-std-sync" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fa9ddcfc9d85e89a10c27801376ea57d2e9421ad91336326160c56044049b49" +checksum = "79eba5cf83a4adb2ccba4c029858229a4992dd88cc35dbfa5a555ec7fc2a8416" dependencies = [ "anyhow", "async-trait", @@ -8042,32 +8010,33 @@ dependencies = [ "cap-time-ext", "fs-set-times", "io-extras", - "io-lifetimes 0.7.4", - "is-terminal 0.3.0", + "io-lifetimes", + "is-terminal", "once_cell", - "rustix 0.35.12", + "rustix", "system-interface", "tracing", "wasi-common", - "windows-sys 0.36.1", + "windows-sys 0.42.0", ] [[package]] name = "wasi-common" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd86a0cd870709441a25d63737bd416db6cf8eb6229c0da08d29d7ab79108bbb" +checksum = "678ff55fb89ae721dae166003b843f53ee3e7bdb96aa96715fec8d44d012b105" dependencies = [ "anyhow", "bitflags", "cap-rand", "cap-std", "io-extras", - "rustix 0.35.12", + "rustix", "thiserror", "tracing", + "wasmtime", "wiggle", - "windows-sys 0.36.1", + "windows-sys 0.42.0", ] [[package]] @@ -8140,27 +8109,28 @@ checksum = "6a89911bd99e5f3659ec4acf9c4d93b0a90fe4a2a11f15328472058edc5261be" [[package]] name = "wasm-encoder" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5816e88e8ea7335016aa62eb0485747f786136d505a9b3890f8c400211d9b5f" +checksum = "05632e0a66a6ed8cca593c24223aabd6262f256c3693ad9822c315285f010614" dependencies = [ "leb128", ] [[package]] name = "wasmparser" -version = "0.92.0" +version = "0.95.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da34cec2a8c23db906cdf8b26e988d7a7f0d549eb5d51299129647af61a1b37" +checksum = "f2ea896273ea99b15132414be1da01ab0d8836415083298ecaffbe308eaac87a" dependencies = [ "indexmap", + "url", ] [[package]] name = "wasmtime" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5fc5bb3329415030796cfa5530b2481ccef5c4f1e5150733ba94318ab004fe1" +checksum = "4abddf11816dd8f5e7310f6ebe5a2503b43f20ab2bf050b7d63f5b1bb96a81d9" dependencies = [ "anyhow", "async-trait", @@ -8184,23 +8154,23 @@ dependencies = [ "wasmtime-jit", "wasmtime-runtime", "wat", - "windows-sys 0.36.1", + "windows-sys 0.42.0", ] [[package]] name = "wasmtime-asm-macros" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db36545ff0940ad9bf4e9ab0ec2a4e1eaa5ebe2aa9227bcbc4af905375d9e482" +checksum = "c1f5206486f0467ba86e84d35996c4048b077cec2c9e5b322e7b853bdbe79334" dependencies = [ "cfg-if 1.0.0", ] [[package]] name = "wasmtime-cache" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c2101b211d9db7db8bcfb2ffa69e119fa99a20266d0e5f19bb989cb6c3280d7" +checksum = "d1e77abcf538af42517e188c109e4b50ecf6c0ee4d77ede76a438e0306b934dc" dependencies = [ "anyhow", "base64 0.13.1", @@ -8208,19 +8178,19 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rustix 0.35.12", + "rustix", "serde", - "sha2 0.9.9", + "sha2 0.10.2", "toml", - "windows-sys 0.36.1", + "windows-sys 0.42.0", "zstd", ] [[package]] name = "wasmtime-cranelift" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0409e93b5eceaa4e5f498a4bce1cffc7ebe071d14582b5437c10af4aecc23f54" +checksum = "9e5bcb1d5ef211726b11e1286fe96cb40c69044c3632e1d6c67805d88a2e1a34" dependencies = [ "anyhow", "cranelift-codegen", @@ -8239,9 +8209,9 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55240389c604f68d2e1d2573d7d3740246ab9ea2fa4fe79e10ccd51faf9b9500" +checksum = "dcab3fac5a2ff68ce9857166a7d7c0e5251b554839b9dda7ed3b5528e191936e" dependencies = [ "anyhow", "cranelift-entity", @@ -8258,22 +8228,22 @@ dependencies = [ [[package]] name = "wasmtime-fiber" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb9b7b94f7b40d98665feca2338808cf449fa671d01be7176861f8d9aa4a012" +checksum = "2fb38af221b780f2c03764d763fe7f7bc414ea9db744d66dac98f9b694892561" dependencies = [ "cc", "cfg-if 1.0.0", - "rustix 0.35.12", + "rustix", "wasmtime-asm-macros", - "windows-sys 0.36.1", + "windows-sys 0.42.0", ] [[package]] name = "wasmtime-jit" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc15e285b7073ee566e62ea4b6dd38b80465ade0ea8cd4cee13c7ac2e295cfca" +checksum = "a7d866e2a84ee164739b7ed7bd7cc9e1f918639d2ec5e2817a31e24c148cab20" dependencies = [ "addr2line", "anyhow", @@ -8285,32 +8255,42 @@ dependencies = [ "log", "object", "rustc-demangle", - "rustix 0.35.12", "serde", "target-lexicon", - "thiserror", "wasmtime-environ", "wasmtime-jit-debug", + "wasmtime-jit-icache-coherence", "wasmtime-runtime", - "windows-sys 0.36.1", + "windows-sys 0.42.0", ] [[package]] name = "wasmtime-jit-debug" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bee06d206bcf7a875eacd1e1e957c2a63f64a92934d2535dd8e15cde6d3a9ffe" +checksum = "0104c2b1ce443f2a2806216fcdf6dce09303203ec5797a698d313063b31e5bc8" dependencies = [ "object", "once_cell", - "rustix 0.35.12", + "rustix", +] + +[[package]] +name = "wasmtime-jit-icache-coherence" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22d9c2e92b0fc124d2cad6cb497a4c840580a7dd2414a37109e8c7cfe699c0ea" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "windows-sys 0.42.0", ] [[package]] name = "wasmtime-runtime" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9969ff36cbf57f18c2d24679db57d0857ea7cc7d839534afc26ecc8003e9914b" +checksum = "0a1f0f99297a94cb20c511d1d4e864d9b54794644016d2530dc797cacfa7224a" dependencies = [ "anyhow", "cc", @@ -8323,20 +8303,19 @@ dependencies = [ "memoffset 0.6.5", "paste", "rand 0.8.5", - "rustix 0.35.12", - "thiserror", + "rustix", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-fiber", "wasmtime-jit-debug", - "windows-sys 0.36.1", + "windows-sys 0.42.0", ] [[package]] name = "wasmtime-types" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df64c737fc9b3cdf7617bcc65e8b97cb713ceb9c9c58530b20788a8a3482b5d1" +checksum = "62f3d8ee409447cae51651fd812437a0047ed8d7f44e94171ee05ce7cb955c96" dependencies = [ "cranelift-entity", "serde", @@ -8346,9 +8325,9 @@ dependencies = [ [[package]] name = "wasmtime-wasi" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb41d16dfd153d2078ea2347d311cee6c74f2a4ecc109cd9acaf860709137fdb" +checksum = "9f32b06e3282ccbeab6fb96c64fa12a359f1253022dfd5cf99385b2344e70830" dependencies = [ "anyhow", "wasi-cap-std-sync", @@ -8368,9 +8347,9 @@ dependencies = [ [[package]] name = "wast" -version = "48.0.0" +version = "50.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84825b5ac7164df8260c9e2b2e814075334edbe7ac426f2469b93a5eeac23cce" +checksum = "a2cbb59d4ac799842791fe7e806fa5dbbf6b5554d538e51cc8e176db6ff0ae34" dependencies = [ "leb128", "memchr", @@ -8380,11 +8359,11 @@ dependencies = [ [[package]] name = "wat" -version = "1.0.50" +version = "1.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "129da4a03ec6d2a815f42c88f641824e789d5be0d86d2f90aa8a218c7068e0be" +checksum = "584aaf7a1ecf4d383bbe1a25eeab0cbb8ff96acc6796707ff65cde48f4632f15" dependencies = [ - "wast 48.0.0", + "wast 50.0.0", ] [[package]] @@ -8470,9 +8449,9 @@ checksum = "17882f045410753661207383517a6f62ec3dbeb6a4ed2acce01f0728238d1983" [[package]] name = "wiggle" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2943156975c608cab1b44d28becba4196b07f18be92ea28f1e7f3372a12d81dd" +checksum = "7a2433252352677648dc4ac0c99e7e254e1c58be8019cda3323ab3a3ce29da5b" dependencies = [ "anyhow", "async-trait", @@ -8485,9 +8464,9 @@ dependencies = [ [[package]] name = "wiggle-generate" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0321263a6b1ba1e0a97174524891a14907cee68cfa183fd5389088dffbeab668" +checksum = "c15bf89e66bd1a9463ee529d37b999947befafd792f345d4a82e0d2b28c0845f" dependencies = [ "anyhow", "heck", @@ -8500,9 +8479,9 @@ dependencies = [ [[package]] name = "wiggle-macro" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa3d3794e5d68ef69f30e65f267c6bf18c920750d3ccd2a3ac04e77d95f66b96" +checksum = "919fb8f106375c7f6daf7b388a1fea3e2092dedb273b17b2d917522917c07a3c" dependencies = [ "proc-macro2 1.0.47", "quote 1.0.21", @@ -8661,13 +8640,13 @@ dependencies = [ [[package]] name = "winx" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b01e010390eb263a4518c8cebf86cb67469d1511c00b749a47b64c39e8054d" +checksum = "9baf690e238840de84bbfad6ad72d6628c41d34c1a5e276dab7fb2c9167ca1ac" dependencies = [ "bitflags", - "io-lifetimes 0.7.4", - "windows-sys 0.36.1", + "io-lifetimes", + "windows-sys 0.42.0", ] [[package]] diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index cc4b17623..6840847f8 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -9,9 +9,9 @@ publish = false [dependencies] anyhow = { workspace = true } async-trait = { workspace = true } -cap-std = "0.26.0" +cap-std = "1.0.2" clap ={ version = "4.0.18", features = ["derive"] } -hyper = { version = "0.14.23", features = ["full"] } +hyper = { version = "0.14.23", features = ["server"] } rmp-serde = { version = "1.1.1" } thiserror = { workspace = true } tokio = { version = "=1.22.0", features = ["full"] } @@ -20,9 +20,9 @@ tonic = "0.8.2" tracing = { workspace = true } tracing-subscriber = { workspace = true, features = ["env-filter"] } uuid = { workspace = true, features = ["v4"] } -wasi-common = "2.0.0" -wasmtime = "2.0.0" -wasmtime-wasi = "2.0.0" +wasi-common = "4.0.0" +wasmtime = "4.0.0" +wasmtime-wasi = "4.0.0" [dependencies.shuttle-common] workspace = true diff --git a/runtime/src/axum/mod.rs b/runtime/src/axum/mod.rs index 13c1095c3..5bd8fcfe6 100644 --- a/runtime/src/axum/mod.rs +++ b/runtime/src/axum/mod.rs @@ -231,7 +231,7 @@ impl RouterInner { .unwrap() .into_func() .unwrap() - .typed::<(RawFd, RawFd), (), _>(&store) + .typed::<(RawFd, RawFd), ()>(&store) .unwrap() .call(&mut store, (3, 4)) .unwrap();