From b151b3116632732d1a375da2de171aa4aea261bf Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 28 Aug 2024 14:04:07 -0700 Subject: [PATCH] Update to Wasmtime 25 This commit updates to Wasmtime 25.0.0 and handles the various fallout and changes throughout to account for API changes made. Signed-off-by: Alex Crichton --- Cargo.lock | 250 ++++--- Cargo.toml | 8 +- .../componentize/src/abi_conformance/mod.rs | 11 +- .../src/abi_conformance/test_inbound_http.rs | 10 +- .../src/abi_conformance/test_inbound_redis.rs | 11 +- crates/componentize/src/bugs.rs | 2 +- crates/componentize/src/lib.rs | 2 +- crates/core/tests/integration_test.rs | 11 +- crates/factor-key-value/src/host.rs | 4 +- .../src/wasi_2023_10_18.rs | 8 +- .../src/wasi_2023_11_10.rs | 8 +- crates/factor-outbound-mqtt/src/host.rs | 2 +- crates/factor-outbound-mysql/src/host.rs | 2 +- crates/factor-outbound-pg/src/host.rs | 2 +- crates/factor-outbound-redis/src/host.rs | 2 +- crates/factor-sqlite/src/host.rs | 4 +- crates/factor-wasi/src/wasi_2023_10_18.rs | 25 +- crates/factor-wasi/src/wasi_2023_11_10.rs | 25 +- crates/key-value-spin/src/store.rs | 2 +- crates/trigger-http/src/lib.rs | 2 +- crates/trigger-http/src/spin.rs | 18 +- crates/trigger-http/src/wasi.rs | 85 +-- crates/trigger-redis/src/lib.rs | 9 +- examples/spin-timer/Cargo.lock | 645 +++++++++--------- examples/spin-timer/Cargo.toml | 2 +- 25 files changed, 568 insertions(+), 582 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8f60878902..d0847c99f3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,7 +8,16 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli", + "gimli 0.28.1", +] + +[[package]] +name = "addr2line" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +dependencies = [ + "gimli 0.29.0", ] [[package]] @@ -637,7 +646,7 @@ version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ - "addr2line", + "addr2line 0.21.0", "cc", "cfg-if", "libc", @@ -695,7 +704,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "shlex", "syn 2.0.77", ] @@ -1427,74 +1436,86 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.109.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6b33d7e757a887989eb18b35712b2a67d96171ec3149d1bfb657b29b7b367c" +checksum = "ad5264b5d315c515e0845dcd2cc1697ea0018d739d58b47477f8455842583568" dependencies = [ "cranelift-entity", ] +[[package]] +name = "cranelift-bitset" +version = "0.112.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c2797648025a7b2e32ec49fb2f71655fed74453cd41e209c6e39fd3107654f8" +dependencies = [ + "serde 1.0.210", + "serde_derive", +] + [[package]] name = "cranelift-codegen" -version = "0.109.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9acf15cb22be42d07c3b57d7856329cb228b7315d385346149df2566ad5e4aa" +checksum = "548a3af0d36a36bab5c6a3bb8684816d501fd012c3328beb0f57dbbcb364c479" dependencies = [ "bumpalo", "cranelift-bforest", + "cranelift-bitset", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-control", "cranelift-entity", "cranelift-isle", - "gimli", + "gimli 0.29.0", "hashbrown 0.14.3", "log", "regalloc2", - "rustc-hash", + "rustc-hash 2.0.0", "smallvec", "target-lexicon", ] [[package]] name = "cranelift-codegen-meta" -version = "0.109.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e934d301392b73b3f8b0540391fb82465a0f179a3cee7c726482ac4727efcc97" +checksum = "9001ad2a4893d3505be514d3b55acc6d7efecba4bcc9ab6a7c4d422765c84202" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.109.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb2a2566b3d54b854dfb288b3b187f6d3d17d6f762c92898207eba302931da" +checksum = "df4b34c22fdfd5d95287ae0cc766e962a976754f0cf7daa4bfa5c6af55c5fb6b" [[package]] name = "cranelift-control" -version = "0.109.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0100f33b704cdacd01ad66ff41f8c5030d57cbff078e2a4e49ab1822591299fa" +checksum = "a4d78c20a5ba56200e691e0a62d15ffd18ffc781064443acbadce1f7dc847917" dependencies = [ "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.109.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8cfdc315e5d18997093e040a8d234bea1ac1e118a716d3e30f40d449e78207b" +checksum = "67e9d6c799b0775d43211d983b5f9230ea604063003cb6d492daf8dcac51da9b" dependencies = [ + "cranelift-bitset", "serde 1.0.210", "serde_derive", ] [[package]] name = "cranelift-frontend" -version = "0.109.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f74b84f16af2e982b0c0c72233503d9d55cbfe3865dbe807ca28dc6642a28b5" +checksum = "7c1bd2fdbe0c0c10fcee7826c00ea0e7b2a0c4e95e6a879d88e11c006587560f" dependencies = [ "cranelift-codegen", "log", @@ -1504,15 +1525,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.109.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adf306d3dde705fb94bd48082f01d38c4ededc74293a4c007805f610bf08bc6e" +checksum = "e12b357f51e34f8e271977a5f422940aa985943d14ee8d49f66c6459ef458511" [[package]] name = "cranelift-native" -version = "0.109.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ea0ebdef7aff4a79bcbc8b6495f31315f16b3bf311152f472eaa8d679352581" +checksum = "da80e271413343c8ca2ca3375360a8d486355063bf96547db9714f2ac4580629" dependencies = [ "cranelift-codegen", "libc", @@ -1521,9 +1542,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.109.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d549108a1942065cdbac3bb96c2952afa0e1b9a3beff4b08c4308ac72257576d" +checksum = "aa9276bbb4bbf05ba98dba1d07a506acc9ac1e15a500530399ff8aee70860118" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -1531,7 +1552,7 @@ dependencies = [ "itertools 0.12.1", "log", "smallvec", - "wasmparser 0.209.1", + "wasmparser 0.217.0", "wasmtime-types", ] @@ -2758,6 +2779,12 @@ name = "gimli" version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "gimli" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" dependencies = [ "fallible-iterator 0.3.0", "indexmap 2.5.0", @@ -3090,15 +3117,6 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] - [[package]] name = "hashbrown" version = "0.14.3" @@ -5915,13 +5933,13 @@ dependencies = [ [[package]] name = "regalloc2" -version = "0.9.3" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" +checksum = "12908dbeb234370af84d0579b9f68258a0f67e201412dd9a2814e6f45b2fc0f0" dependencies = [ - "hashbrown 0.13.2", + "hashbrown 0.14.3", "log", - "rustc-hash", + "rustc-hash 2.0.0", "slice-group-by", "smallvec", ] @@ -6189,6 +6207,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustc_version" version = "0.4.0" @@ -8154,9 +8178,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.14" +version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "temp-dir" @@ -9479,7 +9503,6 @@ dependencies = [ "hashbrown 0.14.3", "indexmap 2.5.0", "semver", - "serde 1.0.210", ] [[package]] @@ -9508,29 +9531,31 @@ dependencies = [ [[package]] name = "wasmprinter" -version = "0.209.1" +version = "0.217.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceca8ae6eaa8c7c87b33c25c53bdf299f8c2a764aee1179402ff7652ef3a6859" +checksum = "50dc568b3e0d47e8f96ea547c90790cfa783f0205160c40de894a427114185ce" dependencies = [ "anyhow", - "wasmparser 0.209.1", + "termcolor", + "wasmparser 0.217.0", ] [[package]] name = "wasmtime" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786d8b5e7a4d54917c5ebe555b9667337e5f93383f49bddaaeec2eba68093b45" +checksum = "9e025f6280f91611a59f38057e0a4e72fbc08a2a4e6ed753a0d1970ac634a997" dependencies = [ - "addr2line", + "addr2line 0.22.0", "anyhow", "async-trait", + "bitflags 2.6.0", "bumpalo", "cc", "cfg-if", "encoding_rs", "fxprof-processed-profile", - "gimli", + "gimli 0.29.0", "hashbrown 0.14.3", "indexmap 2.5.0", "ittapi", @@ -9539,7 +9564,6 @@ dependencies = [ "log", "mach2", "memfd", - "memoffset 0.9.1", "object 0.36.0", "once_cell", "paste", @@ -9554,8 +9578,8 @@ dependencies = [ "smallvec", "sptr", "target-lexicon", - "wasm-encoder 0.209.1", - "wasmparser 0.209.1", + "wasm-encoder 0.217.0", + "wasmparser 0.217.0", "wasmtime-asm-macros", "wasmtime-cache", "wasmtime-component-macro", @@ -9574,18 +9598,18 @@ dependencies = [ [[package]] name = "wasmtime-asm-macros" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d697d99c341d4a9ffb72f3af7a02124d233eeb59aee010f36d88e97cca553d5e" +checksum = "2977f9d1d1228154598e8d1cc5d55c4aa744297e9a3523b258e20d6ba0cbc3c9" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "916610f9ae9a6c22deb25bba2e6247ba9f00b093d30620875203b91328a1adfa" +checksum = "97d80a94087214484c427095fdb28448643f16d4b4223d98e21f48df87844125" dependencies = [ "anyhow", "base64 0.21.7", @@ -9603,9 +9627,9 @@ dependencies = [ [[package]] name = "wasmtime-component-macro" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b29b462b068e73b5b27fae092a27f47e5937cabf6b26be2779c978698a52feca" +checksum = "65b4bc589d7839d8dbfc4f4a0ea3380b11062ae26ff77c3a133c202fc4b21a31" dependencies = [ "anyhow", "proc-macro2", @@ -9613,20 +9637,20 @@ dependencies = [ "syn 2.0.77", "wasmtime-component-util", "wasmtime-wit-bindgen", - "wit-parser 0.209.1", + "wit-parser 0.217.0", ] [[package]] name = "wasmtime-component-util" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d2912c53d9054984b380dfbd7579f9c3681b2a73b903a56bd71a1c4f175f1e" +checksum = "8553d3720625ad4e65a9c71e215566361fcefc4e4001f17e7c669c503c33e6f6" [[package]] name = "wasmtime-cranelift" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3975deafea000457ba84355c7c0fce0372937204f77026510b7b454f28a3a65" +checksum = "1b1b81791925aa182f0816562b8b41b9546077ba3a789ca18454a3ffe083963a" dependencies = [ "anyhow", "cfg-if", @@ -9636,46 +9660,49 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli", + "gimli 0.29.0", "log", "object 0.36.0", + "smallvec", "target-lexicon", "thiserror", - "wasmparser 0.209.1", + "wasmparser 0.217.0", "wasmtime-environ", "wasmtime-versioned-export-macros", ] [[package]] name = "wasmtime-environ" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f444e900e848b884d8a8a2949b6f5b92af642a3e663ff8fbe78731143a55be61" +checksum = "fe742ef5ee9ce201e513ee8da472eaf198e760499a730853622fc85a61cfb1eb" dependencies = [ "anyhow", "cpp_demangle", + "cranelift-bitset", "cranelift-entity", - "gimli", + "gimli 0.29.0", "indexmap 2.5.0", "log", "object 0.36.0", "postcard", "rustc-demangle", + "semver", "serde 1.0.210", "serde_derive", "target-lexicon", - "wasm-encoder 0.209.1", - "wasmparser 0.209.1", - "wasmprinter 0.209.1", + "wasm-encoder 0.217.0", + "wasmparser 0.217.0", + "wasmprinter 0.217.0", "wasmtime-component-util", "wasmtime-types", ] [[package]] name = "wasmtime-fiber" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ded58eb2d1bf0dcd2182d0ccd7055c4b10b50d711514f1d73f61515d0fa829d" +checksum = "2be377649da32af7b3eadd3ab5c89d645bdf0f5af9fe4fc59da457fbe4a87cdd" dependencies = [ "anyhow", "cc", @@ -9688,9 +9715,9 @@ dependencies = [ [[package]] name = "wasmtime-jit-debug" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bc54198c6720f098210a85efb3ba8c078d1de4d373cdb6778850a66ae088d11" +checksum = "109dcbe0367eeda5467ea2950ff81899dab3ee362220eadcae0691d336122d29" dependencies = [ "object 0.36.0", "once_cell", @@ -9700,9 +9727,9 @@ dependencies = [ [[package]] name = "wasmtime-jit-icache-coherence" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5afe2f0499542f9a4bcfa1b55bfdda803b6ade4e7c93c6b99e0f39dba44b0a91" +checksum = "a67e6379ff6f5eb316e4fe2baaf360c7871082006fc31addf3cf58011edb855c" dependencies = [ "anyhow", "cfg-if", @@ -9712,28 +9739,29 @@ dependencies = [ [[package]] name = "wasmtime-slab" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a7de1f2bec5bbb35d532e61c85c049dc84ae671df60492f90b954ecf21169e7" +checksum = "7e1daff42dc6660aa4aead9586a1c41e498a1c15674784589aeb5c5090d09930" [[package]] name = "wasmtime-types" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "412463e9000e14cf6856be48628d2213c20c153e29ffc22b036980c892ea6964" +checksum = "24adc06abbf23bf9abbdc4b4a3bb743436a60a2a76dfabb2e49bf5237d0dadcc" dependencies = [ + "anyhow", "cranelift-entity", "serde 1.0.210", "serde_derive", "smallvec", - "wasmparser 0.209.1", + "wasmparser 0.217.0", ] [[package]] name = "wasmtime-versioned-export-macros" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de5a9bc4f44ceeb168e9e8e3be4e0b4beb9095b468479663a9e24c667e36826f" +checksum = "467bf568f44048477d865a7bb42a1876acd1e2d3de77b42307f5d8e0126fc241" dependencies = [ "proc-macro2", "quote", @@ -9742,9 +9770,9 @@ dependencies = [ [[package]] name = "wasmtime-wasi" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8abb1301089ed8e0b4840f539cba316a73ac382090f1b25d22d8c8eed8df49c7" +checksum = "4f7155aadce49095eeced1a18634a443c8d8fdd2a23bb61f933774393a2c4acf" dependencies = [ "anyhow", "async-trait", @@ -9773,9 +9801,9 @@ dependencies = [ [[package]] name = "wasmtime-wasi-http" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "315cadc284b808cfbd6be9295da4009144c106723f09b421ce6c6d89275cfdb7" +checksum = "859b1d684902af4c5f5a6da6f2e576b666ffcd94fd5350b1a4e216e4fbbe6f0b" dependencies = [ "anyhow", "async-trait", @@ -9796,16 +9824,16 @@ dependencies = [ [[package]] name = "wasmtime-winch" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed4db238a0241df2d15f79ad17b3a37a27f2ea6cb885894d81b42ae107544466" +checksum = "4e8fdcd0682324b16fac3f3dd12eb4325d175e849b771aeda6edcb3065c85a4a" dependencies = [ "anyhow", "cranelift-codegen", - "gimli", + "gimli 0.29.0", "object 0.36.0", "target-lexicon", - "wasmparser 0.209.1", + "wasmparser 0.217.0", "wasmtime-cranelift", "wasmtime-environ", "winch-codegen", @@ -9813,14 +9841,14 @@ dependencies = [ [[package]] name = "wasmtime-wit-bindgen" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc077306b38288262e5ba01d4b21532a6987416cdc0aedf04bb06c22a68fdc" +checksum = "eb8a4c5f38371e9dc1718421b03bc8737696587af5e1b233ea515ba5a111d106" dependencies = [ "anyhow", "heck 0.4.1", "indexmap 2.5.0", - "wit-parser 0.209.1", + "wit-parser 0.217.0", ] [[package]] @@ -9834,24 +9862,24 @@ dependencies = [ [[package]] name = "wast" -version = "209.0.1" +version = "217.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fffef2ff6147e4d12e972765fd75332c6a11c722571d4ab7a780d81ffc8f0a4" +checksum = "79004ecebded92d3c710d4841383368c7f04b63d0992ddd6b0c7d5029b7629b7" dependencies = [ "bumpalo", "leb128", "memchr", "unicode-width", - "wasm-encoder 0.209.1", + "wasm-encoder 0.217.0", ] [[package]] name = "wat" -version = "1.209.1" +version = "1.217.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42203ec0271d113f8eb1f77ebc624886530cecb35915a7f63a497131f16e4d24" +checksum = "c126271c3d92ca0f7c63e4e462e40c69cca52fd4245fcda730d1cf558fb55088" dependencies = [ - "wast 209.0.1", + "wast 217.0.0", ] [[package]] @@ -9995,9 +10023,9 @@ dependencies = [ [[package]] name = "wiggle" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29830e5d01c182d24b94092c697aa7ab0ee97d22e78a2bf40ca91eae6ebca5c2" +checksum = "dc109a53e5475bae50294fecf9eec366ba9725d7fac0a4528f6c1d84d3e2583e" dependencies = [ "anyhow", "async-trait", @@ -10010,9 +10038,9 @@ dependencies = [ [[package]] name = "wiggle-generate" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "557567f2793508760cd855f7659b7a0b9dc4dbc451f53f1415d6943a15311ade" +checksum = "c1b1cfa1fca4076eed01a9e505351dce62f0a5b8b23385b2e0daf7d9b02abeeb" dependencies = [ "anyhow", "heck 0.4.1", @@ -10025,9 +10053,9 @@ dependencies = [ [[package]] name = "wiggle-macro" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc26129a8aea20b62c961d1b9ab4a3c3b56b10042ed85d004f8678af0f21ba6e" +checksum = "6d8565ac65a40335305bce35a2cf48bd3bddc244637008d493f63d6a6685be26" dependencies = [ "proc-macro2", "quote", @@ -10068,17 +10096,17 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winch-codegen" -version = "0.20.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c6915884e731b2db0d8cf08cb64474cb69221a161675fd3c135f91febc3daa" +checksum = "b160fca5249410873830548ba7b1d956d8bf2afe72ced5e78266622d07de1303" dependencies = [ "anyhow", "cranelift-codegen", - "gimli", + "gimli 0.29.0", "regalloc2", "smallvec", "target-lexicon", - "wasmparser 0.209.1", + "wasmparser 0.217.0", "wasmtime-cranelift", "wasmtime-environ", ] diff --git a/Cargo.toml b/Cargo.toml index 7ceb818630..e5fdb8eda3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -151,12 +151,12 @@ tracing = { version = "0.1", features = ["log"] } tracing-opentelemetry = { version = "0.26", default-features = false, features = ["metrics"] } url = "2" -wasi-common-preview1 = { version = "22.0.0", package = "wasi-common", features = [ +wasi-common-preview1 = { version = "25.0.0", package = "wasi-common", features = [ "tokio", ] } -wasmtime = "22.0.0" -wasmtime-wasi = "22.0.0" -wasmtime-wasi-http = "22.0.0" +wasmtime = "25.0.0" +wasmtime-wasi = "25.0.0" +wasmtime-wasi-http = "25.0.0" spin-componentize = { path = "crates/componentize" } diff --git a/crates/componentize/src/abi_conformance/mod.rs b/crates/componentize/src/abi_conformance/mod.rs index 19b7b7ea8b..452f580983 100644 --- a/crates/componentize/src/abi_conformance/mod.rs +++ b/crates/componentize/src/abi_conformance/mod.rs @@ -287,10 +287,13 @@ async fn run_command( match store.data().test_config.invocation_style { InvocationStyle::InboundHttp => { let func = instance - .exports(&mut *store) - .instance("fermyon:spin/inbound-http") - .ok_or_else(|| anyhow!("no fermyon:spin/inbound-http instance found"))? - .typed_func::<(Request,), (Response,)>("handle-request")?; + .get_export(&mut *store, None, "fermyon:spin/inbound-http") + .and_then(|i| instance.get_export(&mut *store, Some(&i), "handle-request")) + .ok_or_else(|| { + anyhow!("no fermyon:spin/inbound-http/handle-request function was found") + })?; + let func = + instance.get_typed_func::<(Request,), (Response,)>(&mut *store, &func)?; let result = func .call_async( diff --git a/crates/componentize/src/abi_conformance/test_inbound_http.rs b/crates/componentize/src/abi_conformance/test_inbound_http.rs index 9b23125d1f..6c0900842d 100644 --- a/crates/componentize/src/abi_conformance/test_inbound_http.rs +++ b/crates/componentize/src/abi_conformance/test_inbound_http.rs @@ -15,10 +15,12 @@ pub(crate) async fn test( let instance = pre.instantiate_async(&mut store).await?; let func = instance - .exports(&mut store) - .instance("fermyon:spin/inbound-http") - .ok_or_else(|| anyhow!("no fermyon:spin/inbound-http instance found"))? - .typed_func::<(Request,), (Response,)>("handle-request")?; + .get_export(&mut store, None, "fermyon:spin/inbound-http") + .and_then(|i| instance.get_export(&mut store, Some(&i), "handle-request")) + .ok_or_else(|| { + anyhow!("no fermyon:spin/inbound-http/handle-request function was found") + })?; + let func = instance.get_typed_func::<(Request,), (Response,)>(&mut store, &func)?; let (response,) = func .call_async( diff --git a/crates/componentize/src/abi_conformance/test_inbound_redis.rs b/crates/componentize/src/abi_conformance/test_inbound_redis.rs index ad39a8c87f..fe126de2ec 100644 --- a/crates/componentize/src/abi_conformance/test_inbound_redis.rs +++ b/crates/componentize/src/abi_conformance/test_inbound_redis.rs @@ -15,10 +15,13 @@ pub(crate) async fn test( let instance = pre.instantiate_async(&mut store).await?; let func = instance - .exports(&mut store) - .instance("fermyon:spin/inbound-redis") - .ok_or_else(|| anyhow!("no inbound-redis instance found"))? - .typed_func::<(Payload,), (Result<(), Error>,)>("handle-message")?; + .get_export(&mut store, None, "fermyon:spin/inbound-redis") + .and_then(|i| instance.get_export(&mut store, Some(&i), "handle-message")) + .ok_or_else(|| { + anyhow!("no fermyon:spin/inbound-redis/handle-message function was found") + })?; + let func = + instance.get_typed_func::<(Payload,), (Result<(), Error>,)>(&mut store, &func)?; match func .call_async(store, (b"Hello, SpinRedis!".to_vec(),)) diff --git a/crates/componentize/src/bugs.rs b/crates/componentize/src/bugs.rs index 0b9dbbfaeb..670230dc13 100644 --- a/crates/componentize/src/bugs.rs +++ b/crates/componentize/src/bugs.rs @@ -3,7 +3,7 @@ use crate::module_info::ModuleInfo; pub const EARLIEST_PROBABLY_SAFE_CLANG_VERSION: &str = "15.0.7"; /// This error represents the likely presence of the allocation bug fixed in -/// https://github.com/WebAssembly/wasi-libc/pull/377 in a Wasm module. +/// in a Wasm module. #[derive(Debug, PartialEq)] pub struct WasiLibc377Bug { clang_version: Option, diff --git a/crates/componentize/src/lib.rs b/crates/componentize/src/lib.rs index 061530f51c..73974b886b 100644 --- a/crates/componentize/src/lib.rs +++ b/crates/componentize/src/lib.rs @@ -388,7 +388,7 @@ mod tests { let component = Component::new(&engine, crate::componentize_command(module)?)?; - let (wasi, _) = Command::instantiate_async(&mut store, &component, &linker).await?; + let wasi = Command::instantiate_async(&mut store, &component, &linker).await?; wasi.wasi_cli_run() .call_run(&mut store) diff --git a/crates/core/tests/integration_test.rs b/crates/core/tests/integration_test.rs index ad47912b4d..14ff25f46f 100644 --- a/crates/core/tests/integration_test.rs +++ b/crates/core/tests/integration_test.rs @@ -157,12 +157,11 @@ async fn run_test( let instance_pre = engine.instantiate_pre(&component)?; let instance = instance_pre.instantiate_async(&mut store).await?; let func = { - let mut exports = instance.exports(&mut store); - - let mut instance = exports - .instance("wasi:cli/run@0.2.0") - .context("missing the expected 'wasi:cli/run@0.2.0' instance")?; - instance.typed_func::<(), (Result<(), ()>,)>("run")? + let func = instance + .get_export(&mut store, None, "wasi:cli/run@0.2.0") + .and_then(|i| instance.get_export(&mut store, Some(&i), "run")) + .context("missing the expected 'wasi:cli/run@0.2.0/run' function")?; + instance.get_typed_func::<(), (Result<(), ()>,)>(&mut store, &func)? }; func.call_async(&mut store, ()) diff --git a/crates/factor-key-value/src/host.rs b/crates/factor-key-value/src/host.rs index 3a28c115af..7cc76a04b3 100644 --- a/crates/factor-key-value/src/host.rs +++ b/crates/factor-key-value/src/host.rs @@ -135,7 +135,7 @@ impl key_value::HostStore for KeyValueDispatch { Ok(store.get_keys().await) } - fn drop(&mut self, store: Resource) -> Result<()> { + async fn drop(&mut self, store: Resource) -> Result<()> { self.stores.remove(store.rep()); Ok(()) } @@ -203,6 +203,6 @@ impl spin_world::v1::key_value::Host for KeyValueDispatch { async fn close(&mut self, store: u32) -> Result<()> { let this = Resource::new_borrow(store); - ::drop(self, this) + ::drop(self, this).await } } diff --git a/crates/factor-outbound-http/src/wasi_2023_10_18.rs b/crates/factor-outbound-http/src/wasi_2023_10_18.rs index 891853ec6c..d4b6a9bdb3 100644 --- a/crates/factor-outbound-http/src/wasi_2023_10_18.rs +++ b/crates/factor-outbound-http/src/wasi_2023_10_18.rs @@ -1,14 +1,8 @@ use anyhow::Result; use wasmtime::component::{Linker, Resource}; +use wasmtime_wasi_http::bindings as latest; use wasmtime_wasi_http::{WasiHttpImpl, WasiHttpView}; -mod latest { - pub use wasmtime_wasi_http::bindings::wasi::*; - pub mod http { - pub use wasmtime_wasi_http::bindings::http::*; - } -} - mod bindings { use super::latest; diff --git a/crates/factor-outbound-http/src/wasi_2023_11_10.rs b/crates/factor-outbound-http/src/wasi_2023_11_10.rs index 0a878cfcfb..56c85fb259 100644 --- a/crates/factor-outbound-http/src/wasi_2023_11_10.rs +++ b/crates/factor-outbound-http/src/wasi_2023_11_10.rs @@ -3,15 +3,9 @@ use super::wasi_2023_10_18::convert; use anyhow::Result; use wasmtime::component::{Linker, Resource}; +use wasmtime_wasi_http::bindings as latest; use wasmtime_wasi_http::{WasiHttpImpl, WasiHttpView}; -mod latest { - pub use wasmtime_wasi_http::bindings::wasi::*; - pub mod http { - pub use wasmtime_wasi_http::bindings::http::*; - } -} - mod bindings { use super::latest; diff --git a/crates/factor-outbound-mqtt/src/host.rs b/crates/factor-outbound-mqtt/src/host.rs index 460b888c16..ae3ca11181 100644 --- a/crates/factor-outbound-mqtt/src/host.rs +++ b/crates/factor-outbound-mqtt/src/host.rs @@ -113,7 +113,7 @@ impl v2::HostConnection for InstanceState { Ok(()) } - fn drop(&mut self, connection: Resource) -> anyhow::Result<()> { + async fn drop(&mut self, connection: Resource) -> anyhow::Result<()> { self.connections.remove(connection.rep()); Ok(()) } diff --git a/crates/factor-outbound-mysql/src/host.rs b/crates/factor-outbound-mysql/src/host.rs index b28a340a8f..4fe46b96d6 100644 --- a/crates/factor-outbound-mysql/src/host.rs +++ b/crates/factor-outbound-mysql/src/host.rs @@ -80,7 +80,7 @@ impl v2::HostConnection for InstanceState { .await?) } - fn drop(&mut self, connection: Resource) -> Result<()> { + async fn drop(&mut self, connection: Resource) -> Result<()> { self.connections.remove(connection.rep()); Ok(()) } diff --git a/crates/factor-outbound-pg/src/host.rs b/crates/factor-outbound-pg/src/host.rs index 1f7be3570b..c68eb3a189 100644 --- a/crates/factor-outbound-pg/src/host.rs +++ b/crates/factor-outbound-pg/src/host.rs @@ -105,7 +105,7 @@ impl v2::HostConnection for InstanceState { .await?) } - fn drop(&mut self, connection: Resource) -> anyhow::Result<()> { + async fn drop(&mut self, connection: Resource) -> anyhow::Result<()> { self.connections.remove(connection.rep()); Ok(()) } diff --git a/crates/factor-outbound-redis/src/host.rs b/crates/factor-outbound-redis/src/host.rs index 112fb5f87c..d31525d60e 100644 --- a/crates/factor-outbound-redis/src/host.rs +++ b/crates/factor-outbound-redis/src/host.rs @@ -195,7 +195,7 @@ impl v2::HostConnection for crate::InstanceState { .map_err(other_error) } - fn drop(&mut self, connection: Resource) -> anyhow::Result<()> { + async fn drop(&mut self, connection: Resource) -> anyhow::Result<()> { self.connections.remove(connection.rep()); Ok(()) } diff --git a/crates/factor-sqlite/src/host.rs b/crates/factor-sqlite/src/host.rs index 9deef168a6..ff4d087f03 100644 --- a/crates/factor-sqlite/src/host.rs +++ b/crates/factor-sqlite/src/host.rs @@ -101,7 +101,7 @@ impl v2::HostConnection for InstanceState { conn.query(&query, parameters).await } - fn drop(&mut self, connection: Resource) -> anyhow::Result<()> { + async fn drop(&mut self, connection: Resource) -> anyhow::Result<()> { let _ = self.connections.remove(connection.rep()); Ok(()) } @@ -132,7 +132,7 @@ impl v1::Host for InstanceState { } async fn close(&mut self, connection: u32) -> anyhow::Result<()> { - ::drop(self, Resource::new_own(connection)) + ::drop(self, Resource::new_own(connection)).await } fn convert_error(&mut self, error: v1::Error) -> anyhow::Result { diff --git a/crates/factor-wasi/src/wasi_2023_10_18.rs b/crates/factor-wasi/src/wasi_2023_10_18.rs index 386da6e722..a3f9ac67a7 100644 --- a/crates/factor-wasi/src/wasi_2023_10_18.rs +++ b/crates/factor-wasi/src/wasi_2023_10_18.rs @@ -22,6 +22,8 @@ mod bindings { "#, async: { only_imports: [ + "[drop]output-stream", + "[drop]input-stream", "[method]descriptor.access-at", "[method]descriptor.advise", "[method]descriptor.change-directory-permissions-at", @@ -54,12 +56,9 @@ mod bindings { "[method]descriptor.unlink-file-at", "[method]descriptor.unlock", "[method]descriptor.write", - "[method]input-stream.read", "[method]input-stream.blocking-read", "[method]input-stream.blocking-skip", - "[method]input-stream.skip", "[method]output-stream.forward", - "[method]output-stream.splice", "[method]output-stream.blocking-splice", "[method]output-stream.blocking-flush", "[method]output-stream.blocking-write", @@ -676,12 +675,12 @@ impl wasi::io::streams::HostInputStream for WasiImpl where T: WasiView, { - async fn read( + fn read( &mut self, self_: Resource, len: u64, ) -> wasmtime::Result, StreamError>> { - let result = latest::io::streams::HostInputStream::read(self, self_, len).await; + let result = latest::io::streams::HostInputStream::read(self, self_, len); convert_stream_result(self, result) } @@ -694,12 +693,12 @@ where convert_stream_result(self, result) } - async fn skip( + fn skip( &mut self, self_: Resource, len: u64, ) -> wasmtime::Result> { - let result = latest::io::streams::HostInputStream::skip(self, self_, len).await; + let result = latest::io::streams::HostInputStream::skip(self, self_, len); convert_stream_result(self, result) } @@ -716,8 +715,8 @@ where latest::io::streams::HostInputStream::subscribe(self, self_) } - fn drop(&mut self, rep: Resource) -> wasmtime::Result<()> { - latest::io::streams::HostInputStream::drop(self, rep) + async fn drop(&mut self, rep: Resource) -> wasmtime::Result<()> { + latest::io::streams::HostInputStream::drop(self, rep).await } } @@ -795,13 +794,13 @@ where convert_stream_result(self, result) } - async fn splice( + fn splice( &mut self, self_: Resource, src: Resource, len: u64, ) -> wasmtime::Result> { - let result = latest::io::streams::HostOutputStream::splice(self, self_, src, len).await; + let result = latest::io::streams::HostOutputStream::splice(self, self_, src, len); convert_stream_result(self, result) } @@ -824,8 +823,8 @@ where anyhow::bail!("forward API no longer supported") } - fn drop(&mut self, rep: Resource) -> wasmtime::Result<()> { - latest::io::streams::HostOutputStream::drop(self, rep) + async fn drop(&mut self, rep: Resource) -> wasmtime::Result<()> { + latest::io::streams::HostOutputStream::drop(self, rep).await } } diff --git a/crates/factor-wasi/src/wasi_2023_11_10.rs b/crates/factor-wasi/src/wasi_2023_11_10.rs index a98687885d..9eb8ca980d 100644 --- a/crates/factor-wasi/src/wasi_2023_11_10.rs +++ b/crates/factor-wasi/src/wasi_2023_11_10.rs @@ -21,6 +21,8 @@ mod bindings { "#, async: { only_imports: [ + "[drop]input-stream", + "[drop]output-stream", "[method]descriptor.advise", "[method]descriptor.create-directory-at", "[method]descriptor.get-flags", @@ -45,11 +47,8 @@ mod bindings { "[method]descriptor.sync-data", "[method]descriptor.unlink-file-at", "[method]descriptor.write", - "[method]input-stream.read", "[method]input-stream.blocking-read", "[method]input-stream.blocking-skip", - "[method]input-stream.skip", - "[method]output-stream.splice", "[method]output-stream.blocking-splice", "[method]output-stream.blocking-flush", "[method]output-stream.blocking-write", @@ -625,12 +624,12 @@ impl wasi::io::streams::HostInputStream for WasiImpl where T: WasiView, { - async fn read( + fn read( &mut self, self_: Resource, len: u64, ) -> wasmtime::Result, StreamError>> { - let result = latest::io::streams::HostInputStream::read(self, self_, len).await; + let result = latest::io::streams::HostInputStream::read(self, self_, len); convert_stream_result(self, result) } @@ -643,12 +642,12 @@ where convert_stream_result(self, result) } - async fn skip( + fn skip( &mut self, self_: Resource, len: u64, ) -> wasmtime::Result> { - let result = latest::io::streams::HostInputStream::skip(self, self_, len).await; + let result = latest::io::streams::HostInputStream::skip(self, self_, len); convert_stream_result(self, result) } @@ -665,8 +664,8 @@ where latest::io::streams::HostInputStream::subscribe(self, self_) } - fn drop(&mut self, rep: Resource) -> wasmtime::Result<()> { - latest::io::streams::HostInputStream::drop(self, rep) + async fn drop(&mut self, rep: Resource) -> wasmtime::Result<()> { + latest::io::streams::HostInputStream::drop(self, rep).await } } @@ -744,13 +743,13 @@ where convert_stream_result(self, result) } - async fn splice( + fn splice( &mut self, self_: Resource, src: Resource, len: u64, ) -> wasmtime::Result> { - let result = latest::io::streams::HostOutputStream::splice(self, self_, src, len).await; + let result = latest::io::streams::HostOutputStream::splice(self, self_, src, len); convert_stream_result(self, result) } @@ -765,8 +764,8 @@ where convert_stream_result(self, result) } - fn drop(&mut self, rep: Resource) -> wasmtime::Result<()> { - latest::io::streams::HostOutputStream::drop(self, rep) + async fn drop(&mut self, rep: Resource) -> wasmtime::Result<()> { + latest::io::streams::HostOutputStream::drop(self, rep).await } } diff --git a/crates/key-value-spin/src/store.rs b/crates/key-value-spin/src/store.rs index 182f0f4da6..e12f5e05c7 100644 --- a/crates/key-value-spin/src/store.rs +++ b/crates/key-value-spin/src/store.rs @@ -248,7 +248,7 @@ mod test { Ok(None) )); - kv.drop(Resource::new_own(rep))?; + kv.drop(Resource::new_own(rep)).await?; Ok(()) } diff --git a/crates/trigger-http/src/lib.rs b/crates/trigger-http/src/lib.rs index 85a7e108cd..bc004dc0df 100644 --- a/crates/trigger-http/src/lib.rs +++ b/crates/trigger-http/src/lib.rs @@ -22,7 +22,7 @@ use serde::Deserialize; use spin_app::App; use spin_factors::RuntimeFactors; use spin_trigger::Trigger; -use wasmtime_wasi_http::bindings::wasi::http::types::ErrorCode; +use wasmtime_wasi_http::bindings::http::types::ErrorCode; pub use server::HttpServer; diff --git a/crates/trigger-http/src/spin.rs b/crates/trigger-http/src/spin.rs index ce9a7cd12f..69343d6d57 100644 --- a/crates/trigger-http/src/spin.rs +++ b/crates/trigger-http/src/spin.rs @@ -35,12 +35,18 @@ impl HttpExecutor for SpinHttpExecutor { let (instance, mut store) = instance_builder.instantiate(()).await?; let headers = prepare_request_headers(&req, route_match, client_addr)?; - let func = instance - .exports(&mut store) - .instance("fermyon:spin/inbound-http") - // Safe since we have already checked that this instance exists - .expect("no fermyon:spin/inbound-http found") - .typed_func::<(http_types::Request,), (http_types::Response,)>("handle-request")?; + // Expects here are safe since we have already checked that this + // instance exists + let inbound_http = instance + .get_export(&mut store, None, "fermyon:spin/inbound-http") + .expect("no fermyon:spin/inbound-http found"); + let handle_request = instance + .get_export(&mut store, Some(&inbound_http), "handle-request") + .expect("no handle-request found"); + let func = instance.get_typed_func::<(http_types::Request,), (http_types::Response,)>( + &mut store, + &handle_request, + )?; let (parts, body) = req.into_parts(); let bytes = body.collect().await?.to_bytes().to_vec(); diff --git a/crates/trigger-http/src/wasi.rs b/crates/trigger-http/src/wasi.rs index 060c4d301d..2724f21da8 100644 --- a/crates/trigger-http/src/wasi.rs +++ b/crates/trigger-http/src/wasi.rs @@ -4,23 +4,18 @@ use anyhow::{anyhow, Context, Result}; use futures::TryFutureExt; use http::{HeaderName, HeaderValue}; use hyper::{Request, Response}; -use spin_factor_outbound_http::wasi_2023_10_18::exports::wasi::http::incoming_handler::Guest as IncomingHandler2023_10_18; -use spin_factor_outbound_http::wasi_2023_11_10::exports::wasi::http::incoming_handler::Guest as IncomingHandler2023_11_10; +use spin_factor_outbound_http::wasi_2023_10_18::exports::wasi::http::incoming_handler as incoming_handler2023_10_18; +use spin_factor_outbound_http::wasi_2023_11_10::exports::wasi::http::incoming_handler as incoming_handler2023_11_10; use spin_factors::RuntimeFactors; use spin_http::routes::RouteMatch; use tokio::{sync::oneshot, task}; use tracing::{instrument, Instrument, Level}; -use wasmtime_wasi_http::{ - body::HyperIncomingBody as Body, - proxy::exports::wasi::http::incoming_handler::Guest as IncomingHandler, WasiHttpView, -}; +use wasmtime_wasi_http::bindings::http::types::Scheme; +use wasmtime_wasi_http::{bindings::Proxy, body::HyperIncomingBody as Body, WasiHttpView}; use crate::{ headers::prepare_request_headers, - server::{ - HandlerType, HttpExecutor, WASI_HTTP_EXPORT_0_2_0, WASI_HTTP_EXPORT_0_2_1, - WASI_HTTP_EXPORT_2023_10_18, WASI_HTTP_EXPORT_2023_11_10, - }, + server::{HandlerType, HttpExecutor}, TriggerInstanceBuilder, }; @@ -63,7 +58,18 @@ impl HttpExecutor for WasiHttpExecutor { ) .context("missing OutboundHttpFactor")?; - let request = wasi_http.new_incoming_request(req)?; + let (parts, body) = req.into_parts(); + let body = wasmtime_wasi_http::body::HostIncomingBody::new( + body, + std::time::Duration::from_secs(600), + ); + let request = wasmtime_wasi_http::types::HostIncomingRequest::new( + &mut wasi_http, + parts, + Scheme::Http, + Some(body), + )?; + let request = wasi_http.table().push(request)?; let (response_tx, response_rx) = oneshot::channel(); let response = wasi_http.new_response_outparam(response_tx)?; @@ -71,47 +77,27 @@ impl HttpExecutor for WasiHttpExecutor { drop(wasi_http); enum Handler { - Latest(IncomingHandler), - Handler2023_11_10(IncomingHandler2023_11_10), - Handler2023_10_18(IncomingHandler2023_10_18), + Latest(Proxy), + Handler2023_11_10(incoming_handler2023_11_10::Guest), + Handler2023_10_18(incoming_handler2023_10_18::Guest), } - let handler = { - let mut exports = instance.exports(&mut store); - match self.handler_type { - HandlerType::Wasi2023_10_18 => { - let mut instance = - exports - .instance(WASI_HTTP_EXPORT_2023_10_18) - .ok_or_else(|| { - anyhow!("export of `{WASI_HTTP_EXPORT_2023_10_18}` not an instance") - })?; - Handler::Handler2023_10_18(IncomingHandler2023_10_18::new(&mut instance)?) - } - HandlerType::Wasi2023_11_10 => { - let mut instance = - exports - .instance(WASI_HTTP_EXPORT_2023_11_10) - .ok_or_else(|| { - anyhow!("export of `{WASI_HTTP_EXPORT_2023_11_10}` not an instance") - })?; - Handler::Handler2023_11_10(IncomingHandler2023_11_10::new(&mut instance)?) - } - HandlerType::Wasi0_2 => { - let handler = if let Some(mut export) = exports.instance(WASI_HTTP_EXPORT_0_2_1) - { - IncomingHandler::new(&mut export) - } else if let Some(mut export) = exports.instance(WASI_HTTP_EXPORT_0_2_0) { - IncomingHandler::new(&mut export) - } else { - Err(anyhow!("export of `{WASI_HTTP_EXPORT_0_2_0}` or `{WASI_HTTP_EXPORT_0_2_1}` not an instance")) - }?; - - Handler::Latest(handler) - } - HandlerType::Spin => unreachable!("should have used SpinHttpExecutor"), - HandlerType::Wagi => unreachable!("should have used WagiExecutor instead"), + let handler = match self.handler_type { + HandlerType::Wasi2023_10_18 => { + let indices = + incoming_handler2023_10_18::GuestIndices::new_instance(&mut store, &instance)?; + let guest = indices.load(&mut store, &instance)?; + Handler::Handler2023_10_18(guest) + } + HandlerType::Wasi2023_11_10 => { + let indices = + incoming_handler2023_11_10::GuestIndices::new_instance(&mut store, &instance)?; + let guest = indices.load(&mut store, &instance)?; + Handler::Handler2023_11_10(guest) } + HandlerType::Wasi0_2 => Handler::Latest(Proxy::new(&mut store, &instance)?), + HandlerType::Spin => unreachable!("should have used SpinHttpExecutor"), + HandlerType::Wagi => unreachable!("should have used WagiExecutor instead"), }; let span = tracing::debug_span!("execute_wasi"); @@ -120,6 +106,7 @@ impl HttpExecutor for WasiHttpExecutor { let result = match handler { Handler::Latest(handler) => { handler + .wasi_http_incoming_handler() .call_handle(&mut store, request, response) .instrument(span) .await diff --git a/crates/trigger-redis/src/lib.rs b/crates/trigger-redis/src/lib.rs index d7d3d99e30..9e50a74b82 100644 --- a/crates/trigger-redis/src/lib.rs +++ b/crates/trigger-redis/src/lib.rs @@ -210,13 +210,8 @@ impl Subscriber { .instantiate(()) .await?; - let guest = { - let exports = &mut instance.exports(&mut store); - let mut inbound_redis_export = exports - .instance("fermyon:spin/inbound-redis") - .context("no fermyon:spin/inbound-redis instance found")?; - inbound_redis::Guest::new(&mut inbound_redis_export)? - }; + let guest_indices = inbound_redis::GuestIndices::new_instance(&mut store, &instance)?; + let guest = guest_indices.load(&mut store, &instance)?; let payload = msg.get_payload_bytes().to_vec(); diff --git a/examples/spin-timer/Cargo.lock b/examples/spin-timer/Cargo.lock index 25ac6d3206..da3c626161 100644 --- a/examples/spin-timer/Cargo.lock +++ b/examples/spin-timer/Cargo.lock @@ -8,7 +8,16 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli", + "gimli 0.28.1", +] + +[[package]] +name = "addr2line" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +dependencies = [ + "gimli 0.29.0", ] [[package]] @@ -251,18 +260,17 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.20" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" dependencies = [ "async-trait", "axum-core", - "bitflags 1.3.2", "bytes", "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.30", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", "itoa", "matchit", "memchr", @@ -271,7 +279,7 @@ dependencies = [ "pin-project-lite", "rustversion", "serde", - "sync_wrapper 0.1.2", + "sync_wrapper 1.0.1", "tower", "tower-layer", "tower-service", @@ -279,17 +287,20 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.3.4" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" dependencies = [ "async-trait", "bytes", "futures-util", - "http 0.2.12", - "http-body 0.4.6", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", "mime", + "pin-project-lite", "rustversion", + "sync_wrapper 0.1.2", "tower-layer", "tower-service", ] @@ -379,7 +390,7 @@ version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ - "addr2line", + "addr2line 0.21.0", "cc", "cfg-if", "libc", @@ -412,14 +423,14 @@ version = "0.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "cexpr", "clang-sys", "itertools", "proc-macro2", "quote", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "shlex", "syn 2.0.76", ] @@ -432,9 +443,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "block-buffer" @@ -567,13 +578,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.99" +version = "1.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" +checksum = "07b1695e2c7e8fc85310cde85aeaab7e3097f593c91d209d3f9df76c928100f0" dependencies = [ "jobserver", "libc", - "once_cell", + "shlex", ] [[package]] @@ -742,74 +753,86 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.109.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6b33d7e757a887989eb18b35712b2a67d96171ec3149d1bfb657b29b7b367c" +checksum = "ad5264b5d315c515e0845dcd2cc1697ea0018d739d58b47477f8455842583568" dependencies = [ "cranelift-entity", ] +[[package]] +name = "cranelift-bitset" +version = "0.112.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c2797648025a7b2e32ec49fb2f71655fed74453cd41e209c6e39fd3107654f8" +dependencies = [ + "serde", + "serde_derive", +] + [[package]] name = "cranelift-codegen" -version = "0.109.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9acf15cb22be42d07c3b57d7856329cb228b7315d385346149df2566ad5e4aa" +checksum = "548a3af0d36a36bab5c6a3bb8684816d501fd012c3328beb0f57dbbcb364c479" dependencies = [ "bumpalo", "cranelift-bforest", + "cranelift-bitset", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-control", "cranelift-entity", "cranelift-isle", - "gimli", + "gimli 0.29.0", "hashbrown 0.14.3", "log", "regalloc2", - "rustc-hash", + "rustc-hash 2.0.0", "smallvec", "target-lexicon", ] [[package]] name = "cranelift-codegen-meta" -version = "0.109.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e934d301392b73b3f8b0540391fb82465a0f179a3cee7c726482ac4727efcc97" +checksum = "9001ad2a4893d3505be514d3b55acc6d7efecba4bcc9ab6a7c4d422765c84202" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.109.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb2a2566b3d54b854dfb288b3b187f6d3d17d6f762c92898207eba302931da" +checksum = "df4b34c22fdfd5d95287ae0cc766e962a976754f0cf7daa4bfa5c6af55c5fb6b" [[package]] name = "cranelift-control" -version = "0.109.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0100f33b704cdacd01ad66ff41f8c5030d57cbff078e2a4e49ab1822591299fa" +checksum = "a4d78c20a5ba56200e691e0a62d15ffd18ffc781064443acbadce1f7dc847917" dependencies = [ "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.109.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8cfdc315e5d18997093e040a8d234bea1ac1e118a716d3e30f40d449e78207b" +checksum = "67e9d6c799b0775d43211d983b5f9230ea604063003cb6d492daf8dcac51da9b" dependencies = [ + "cranelift-bitset", "serde", "serde_derive", ] [[package]] name = "cranelift-frontend" -version = "0.109.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f74b84f16af2e982b0c0c72233503d9d55cbfe3865dbe807ca28dc6642a28b5" +checksum = "7c1bd2fdbe0c0c10fcee7826c00ea0e7b2a0c4e95e6a879d88e11c006587560f" dependencies = [ "cranelift-codegen", "log", @@ -819,15 +842,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.109.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adf306d3dde705fb94bd48082f01d38c4ededc74293a4c007805f610bf08bc6e" +checksum = "e12b357f51e34f8e271977a5f422940aa985943d14ee8d49f66c6459ef458511" [[package]] name = "cranelift-native" -version = "0.109.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ea0ebdef7aff4a79bcbc8b6495f31315f16b3bf311152f472eaa8d679352581" +checksum = "da80e271413343c8ca2ca3375360a8d486355063bf96547db9714f2ac4580629" dependencies = [ "cranelift-codegen", "libc", @@ -836,9 +859,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.109.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d549108a1942065cdbac3bb96c2952afa0e1b9a3beff4b08c4308ac72257576d" +checksum = "aa9276bbb4bbf05ba98dba1d07a506acc9ac1e15a500530399ff8aee70860118" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -846,7 +869,7 @@ dependencies = [ "itertools", "log", "smallvec", - "wasmparser 0.209.1", + "wasmparser 0.217.0", "wasmtime-types", ] @@ -1413,7 +1436,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27d12c0aed7f1e24276a241aadc4cb8ea9f83000f34bc062b7cc2d51e3b0fabd" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "debugid", "fxhash", "serde", @@ -1459,6 +1482,12 @@ name = "gimli" version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "gimli" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" dependencies = [ "fallible-iterator 0.3.0", "indexmap 2.2.6", @@ -1515,15 +1544,6 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] - [[package]] name = "hashbrown" version = "0.14.3" @@ -1537,9 +1557,9 @@ dependencies = [ [[package]] name = "hashlink" -version = "0.8.4" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" dependencies = [ "hashbrown 0.14.3", ] @@ -1764,27 +1784,15 @@ dependencies = [ [[package]] name = "hyper-timeout" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" dependencies = [ - "hyper 0.14.30", + "hyper 1.4.1", + "hyper-util", "pin-project-lite", "tokio", - "tokio-io-timeout", -] - -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper 0.14.30", - "native-tls", - "tokio", - "tokio-native-tls", + "tower-service", ] [[package]] @@ -2034,20 +2042,20 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "libc", ] [[package]] name = "libsql" -version = "0.3.5" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bd17bcc143f2a5be449680dc63b91327d953bcabebe34a69c549fca8934ec9d" +checksum = "cc44962384bd2223269a81cd0d4a1683182b7bf0408b1d87e731c43e8c501270" dependencies = [ "async-stream", "async-trait", "base64 0.21.7", - "bitflags 2.4.2", + "bitflags 2.6.0", "bytes", "fallible-iterator 0.3.0", "futures", @@ -2067,23 +2075,23 @@ dependencies = [ [[package]] name = "libsql-hrana" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "220a925fe6d49dbfa7523b20f5a5391f579b5d9dcf9dd1225606d00929fcab3a" +checksum = "aeaf5d19e365465e1c23d687a28c805d7462531b3f619f0ba49d3cf369890a3e" dependencies = [ "base64 0.21.7", "bytes", - "prost", + "prost 0.12.6", "serde", ] [[package]] name = "libsql-sqlite3-parser" -version = "0.11.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "095d2cf702a5c9c152e48b369f69da30cc44351fa9432621dd8976834abc1752" +checksum = "15a90128c708356af8f7d767c9ac2946692c9112b4f74f07b99a01a60680e413" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "cc", "fallible-iterator 0.3.0", "indexmap 2.2.6", @@ -2092,15 +2100,14 @@ dependencies = [ "phf", "phf_codegen", "phf_shared", - "smallvec", "uncased", ] [[package]] name = "libsqlite3-sys" -version = "0.26.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc22eff61b133b115c6e8c74e818c628d6d5e7a502afea6f64dee076dd94326" +checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" dependencies = [ "cc", "pkg-config", @@ -2129,15 +2136,6 @@ version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" -[[package]] -name = "lru" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e7d46de488603ffdd5f30afbc64fbba2378214a2c3a2fb83abf3d33126df17" -dependencies = [ - "hashbrown 0.13.2", -] - [[package]] name = "lru" version = "0.12.4" @@ -2202,15 +2200,6 @@ dependencies = [ "rustix", ] -[[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" @@ -2248,28 +2237,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", - "log", "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.48.0", ] -[[package]] -name = "mio" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" -dependencies = [ - "hermit-abi 0.3.9", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.52.0", -] - [[package]] name = "mysql_async" -version = "0.33.0" +version = "0.34.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6750b17ce50f8f112ef1a8394121090d47c596b56a6a17569ca680a9626e2ef2" +checksum = "a0b66e411c31265e879d9814d03721f2daa7ad07337b6308cb4bb0cde7e6fd47" dependencies = [ "bytes", "crossbeam", @@ -2278,12 +2254,9 @@ dependencies = [ "futures-sink", "futures-util", "keyed_priority_queue", - "lazy_static", - "lru 0.12.4", - "mio 0.8.11", + "lru", "mysql_common", "native-tls", - "once_cell", "pem", "percent-encoding", "pin-project", @@ -2301,13 +2274,13 @@ dependencies = [ [[package]] name = "mysql_common" -version = "0.31.0" +version = "0.32.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06f19e4cfa0ab5a76b627cec2d81331c49b034988eaf302c3bafeada684eadef" +checksum = "478b0ff3f7d67b79da2b96f56f334431aef65e15ba4b29dd74a4236e29582bdc" dependencies = [ "base64 0.21.7", "bindgen", - "bitflags 2.4.2", + "bitflags 2.6.0", "btoi", "byteorder", "bytes", @@ -2329,7 +2302,7 @@ dependencies = [ "subprocess", "thiserror", "uuid", - "zstd 0.12.4", + "zstd", ] [[package]] @@ -2355,7 +2328,7 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "cfg-if", "cfg_aliases", "libc", @@ -2415,6 +2388,16 @@ dependencies = [ "autocfg", ] +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi 0.3.9", + "libc", +] + [[package]] name = "num_threads" version = "0.1.7" @@ -2476,7 +2459,7 @@ version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "cfg-if", "foreign-types", "libc", @@ -2516,9 +2499,9 @@ dependencies = [ [[package]] name = "opentelemetry" -version = "0.22.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900d57987be3f2aeb70d385fff9b27fb74c5723cc9a52d904d4f9c807a0667bf" +checksum = "803801d3d3b71cd026851a53f974ea03df3d179cb758b260136a6c9e22e196af" dependencies = [ "futures-core", "futures-sink", @@ -2526,38 +2509,36 @@ dependencies = [ "once_cell", "pin-project-lite", "thiserror", - "urlencoding", ] [[package]] name = "opentelemetry-http" -version = "0.11.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7690dc77bf776713848c4faa6501157469017eaf332baccd4eb1cea928743d94" +checksum = "88d8c2b76e5f7848a289aa9666dbe56b16f8a22a4c5246ef37a14941818d2913" dependencies = [ "async-trait", "bytes", - "http 0.2.12", + "http 1.1.0", "opentelemetry", - "reqwest 0.11.27", + "reqwest 0.12.7", ] [[package]] name = "opentelemetry-otlp" -version = "0.15.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a016b8d9495c639af2145ac22387dcb88e44118e45320d9238fbf4e7889abcb" +checksum = "596b1719b3cab83addb20bcbffdf21575279d9436d9ccccfe651a3bf0ab5ab06" dependencies = [ "async-trait", "futures-core", - "http 0.2.12", + "http 1.1.0", "opentelemetry", "opentelemetry-http", "opentelemetry-proto", - "opentelemetry-semantic-conventions", "opentelemetry_sdk", - "prost", - "reqwest 0.11.27", + "prost 0.13.2", + "reqwest 0.12.7", "thiserror", "tokio", "tonic", @@ -2565,37 +2546,35 @@ dependencies = [ [[package]] name = "opentelemetry-proto" -version = "0.5.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a8fddc9b68f5b80dae9d6f510b88e02396f006ad48cac349411fbecc80caae4" +checksum = "2c43620e8f93359eb7e627a3b16ee92d8585774986f24f2ab010817426c5ce61" dependencies = [ "opentelemetry", "opentelemetry_sdk", - "prost", + "prost 0.13.2", "tonic", ] [[package]] name = "opentelemetry-semantic-conventions" -version = "0.14.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9ab5bd6c42fb9349dcf28af2ba9a0667f697f9bdcca045d39f2cec5543e2910" +checksum = "9b8e442487022a943e2315740e443dc5ee95fd541c18f509a5a6251b408a9f95" [[package]] name = "opentelemetry_sdk" -version = "0.22.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e90c7113be649e31e9a0f8b5ee24ed7a16923b322c3c5ab6367469c049d6b7e" +checksum = "e0da0d6b47a3dbc6e9c9e36a0520e25cf943e046843818faaa3f87365a548c82" dependencies = [ "async-trait", - "crossbeam-channel", "futures-channel", "futures-executor", "futures-util", "glob", "once_cell", "opentelemetry", - "ordered-float", "percent-encoding", "rand 0.8.5", "serde_json", @@ -2610,15 +2589,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" -[[package]] -name = "ordered-float" -version = "4.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a91171844676f8c7990ce64959210cd2eaef32c2612c50f9fae9f8aaa6065a6" -dependencies = [ - "num-traits", -] - [[package]] name = "os_str_bytes" version = "6.6.1" @@ -2903,7 +2873,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.12.6", +] + +[[package]] +name = "prost" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2ecbe40f08db5c006b5764a2645f7f3f141ce756412ac9e1dd6087e6d32995" +dependencies = [ + "bytes", + "prost-derive 0.13.2", ] [[package]] @@ -2919,6 +2899,19 @@ dependencies = [ "syn 2.0.76", ] +[[package]] +name = "prost-derive" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acf0c195eebb4af52c752bec4f52f645da98b6e92077a04110c7f349477ae5ac" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn 2.0.76", +] + [[package]] name = "psm" version = "0.1.21" @@ -3072,13 +3065,13 @@ dependencies = [ [[package]] name = "regalloc2" -version = "0.9.3" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" +checksum = "12908dbeb234370af84d0579b9f68258a0f67e201412dd9a2814e6f45b2fc0f0" dependencies = [ - "hashbrown 0.13.2", + "hashbrown 0.14.3", "log", - "rustc-hash", + "rustc-hash 2.0.0", "slice-group-by", "smallvec", ] @@ -3133,7 +3126,6 @@ version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ - "async-compression", "base64 0.21.7", "bytes", "encoding_rs", @@ -3144,12 +3136,10 @@ dependencies = [ "http-body 0.4.6", "hyper 0.14.30", "hyper-rustls 0.24.2", - "hyper-tls 0.5.0", "ipnet", "js-sys", "log", "mime", - "native-tls", "once_cell", "percent-encoding", "pin-project-lite", @@ -3161,9 +3151,7 @@ dependencies = [ "sync_wrapper 0.1.2", "system-configuration 0.5.1", "tokio", - "tokio-native-tls", "tokio-rustls 0.24.1", - "tokio-util", "tower-service", "url", "wasm-bindgen", @@ -3183,6 +3171,7 @@ dependencies = [ "base64 0.22.1", "bytes", "encoding_rs", + "futures-channel", "futures-core", "futures-util", "h2 0.4.6", @@ -3191,7 +3180,7 @@ dependencies = [ "http-body-util", "hyper 1.4.1", "hyper-rustls 0.27.2", - "hyper-tls 0.6.0", + "hyper-tls", "hyper-util", "ipnet", "js-sys", @@ -3255,12 +3244,12 @@ dependencies = [ [[package]] name = "rusqlite" -version = "0.29.0" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "549b9d036d571d42e6e85d1c1425e2ac83491075078ca9a15be021c56b1641f2" +checksum = "7753b721174eb8ff87a9a0e799e2d7bc3749323e773db92e0984debb00019d6e" dependencies = [ - "bitflags 2.4.2", - "fallible-iterator 0.2.0", + "bitflags 2.6.0", + "fallible-iterator 0.3.0", "fallible-streaming-iterator", "hashlink", "libsqlite3-sys", @@ -3279,6 +3268,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustc_version" version = "0.4.1" @@ -3328,7 +3323,7 @@ version = "0.38.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "errno", "itoa", "libc", @@ -3772,7 +3767,6 @@ dependencies = [ "spin-componentize", "spin-serde", "thiserror", - "tokio", "wac-graph", ] @@ -3792,8 +3786,6 @@ version = "2.8.0-pre0" dependencies = [ "anyhow", "async-trait", - "dotenvy", - "once_cell", "serde", "spin-locked-app", "thiserror", @@ -3804,7 +3796,7 @@ name = "spin-factor-key-value" version = "2.8.0-pre0" dependencies = [ "anyhow", - "lru 0.9.0", + "lru", "serde", "spin-core", "spin-factors", @@ -3909,6 +3901,7 @@ dependencies = [ "spin-factor-wasi", "spin-factors", "spin-locked-app", + "spin-manifest", "spin-serde", "terminal", "tracing", @@ -3960,6 +3953,7 @@ dependencies = [ "table", "tokio", "toml", + "tracing", ] [[package]] @@ -4061,7 +4055,6 @@ name = "spin-key-value-spin" version = "2.8.0-pre0" dependencies = [ "anyhow", - "once_cell", "rusqlite", "serde", "spin-core", @@ -4075,8 +4068,7 @@ name = "spin-llm-remote-http" version = "2.8.0-pre0" dependencies = [ "anyhow", - "http 0.2.12", - "reqwest 0.11.27", + "reqwest 0.12.7", "serde", "serde_json", "spin-telemetry", @@ -4096,6 +4088,22 @@ dependencies = [ "thiserror", ] +[[package]] +name = "spin-manifest" +version = "2.8.0-pre0" +dependencies = [ + "anyhow", + "indexmap 2.2.6", + "semver", + "serde", + "spin-serde", + "terminal", + "thiserror", + "toml", + "url", + "wasm-pkg-common", +] + [[package]] name = "spin-runtime-config" version = "2.8.0-pre0" @@ -4183,13 +4191,11 @@ version = "2.8.0-pre0" dependencies = [ "anyhow", "async-trait", - "once_cell", "rand 0.8.5", "rusqlite", "spin-factor-sqlite", "spin-world", "tokio", - "tracing", ] [[package]] @@ -4200,10 +4206,10 @@ dependencies = [ "async-trait", "libsql", "rusqlite", + "spin-factor-sqlite", "spin-world", "sqlparser", "tokio", - "tracing", ] [[package]] @@ -4268,9 +4274,9 @@ checksum = "3b9b39299b249ad65f3b7e96443bad61c02ca5cd3589f46cb6d610a0fd6c0d6a" [[package]] name = "sqlparser" -version = "0.34.0" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3706eefb17039056234df6b566b0014f303f867f2656108334a55b8096f59" +checksum = "5fe11944a61da0da3f592e19a45ebe5ab92dc14a779907ff1f08fbb797bfefc7" dependencies = [ "log", ] @@ -4386,7 +4392,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "658bc6ee10a9b4fcf576e9b0819d95ec16f4d2c02d39fd83ac1c8789785c4a42" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "core-foundation", "system-configuration-sys 0.6.0", ] @@ -4417,7 +4423,7 @@ version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b858526d22750088a9b3cf2e3c2aacebd5377f13adeec02860c30d09113010a6" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "cap-fs-ext", "cap-std", "fd-lock", @@ -4433,9 +4439,9 @@ version = "2.8.0-pre0" [[package]] name = "target-lexicon" -version = "0.12.13" +version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" @@ -4464,7 +4470,6 @@ name = "terminal" version = "2.8.0-pre0" dependencies = [ "atty", - "once_cell", "termcolor", ] @@ -4555,37 +4560,28 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "eb2caba9f80616f438e09748d5acda951967e1ea58508ef53d9c6402485a46df" dependencies = [ "backtrace", "bytes", "libc", - "mio 1.0.2", + "mio", + "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.52.0", -] - -[[package]] -name = "tokio-io-timeout" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" -dependencies = [ - "pin-project-lite", - "tokio", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.4.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", @@ -4700,6 +4696,7 @@ version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" dependencies = [ + "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", @@ -4730,23 +4727,26 @@ dependencies = [ [[package]] name = "tonic" -version = "0.11.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" +checksum = "c6f6ba989e4b2c58ae83d862d3a3e27690b6e3ae630d0deb59f3697f32aa88ad" dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.21.7", + "base64 0.22.1", "bytes", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.30", + "h2 0.4.6", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.4.1", "hyper-timeout", + "hyper-util", "percent-encoding", "pin-project", - "prost", + "prost 0.13.2", + "socket2", "tokio", "tokio-stream", "tower", @@ -4834,9 +4834,9 @@ dependencies = [ [[package]] name = "tracing-opentelemetry" -version = "0.23.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9be14ba1bbe4ab79e9229f7f89fab8d120b865859f10527f31c033e599d2284" +checksum = "5eabc56d23707ad55ba2a0750fc24767125d5a0f51993ba41ad2c441cc7b8dea" dependencies = [ "js-sys", "once_cell", @@ -5048,9 +5048,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wac-graph" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d62ffef518aba9d62dc1532960702a67a62ca1b0ffb3cf152391d477bc7e11" +checksum = "86f708c892ce0ebc06de9915f3da2da9b4e482a8b7d417fa447263b110d0a244" dependencies = [ "anyhow", "id-arena", @@ -5067,9 +5067,9 @@ dependencies = [ [[package]] name = "wac-types" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fe3e5531080631b8d14f355119f4b3bac92bdacaad6786599cf474958eee01f" +checksum = "b96fe715180f72ab776d90e8c4f47f8e4297e0e61ab263567a31f73c77d45d8d" dependencies = [ "anyhow", "id-arena", @@ -5198,18 +5198,9 @@ dependencies = [ [[package]] name = "wasm-encoder" -version = "0.209.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4a05336882dae732ce6bd48b7e11fe597293cb72c13da4f35d7d5f8d53b2a7" -dependencies = [ - "leb128", -] - -[[package]] -name = "wasm-encoder" -version = "0.211.1" +version = "0.217.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e7d931a1120ef357f32b74547646b6fa68ea25e377772b72874b131a9ed70d4" +checksum = "7b88b0814c9a2b323a9b46c687e726996c255ac8b64aa237dd11c81ed4854760" dependencies = [ "leb128", ] @@ -5282,7 +5273,7 @@ version = "0.200.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a03f65ac876612140c57ff6c3b8fe4990067cce97c2cfdb07368a3cc3354b062" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "indexmap 2.2.6", "semver", ] @@ -5293,19 +5284,19 @@ version = "0.202.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6998515d3cf3f8b980ef7c11b29a9b1017d4cf86b99ae93b546992df9931413" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "indexmap 2.2.6", "semver", ] [[package]] name = "wasmparser" -version = "0.209.1" +version = "0.217.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07035cc9a9b41e62d3bb3a3815a66ab87c993c06fe1cf6b2a3f2a18499d937db" +checksum = "ca917a21307d3adf2b9857b94dd05ebf8496bdcff4437a9b9fb3899d3e6c74e7" dependencies = [ "ahash", - "bitflags 2.4.2", + "bitflags 2.6.0", "hashbrown 0.14.3", "indexmap 2.2.6", "semver", @@ -5314,29 +5305,31 @@ dependencies = [ [[package]] name = "wasmprinter" -version = "0.209.1" +version = "0.217.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceca8ae6eaa8c7c87b33c25c53bdf299f8c2a764aee1179402ff7652ef3a6859" +checksum = "50dc568b3e0d47e8f96ea547c90790cfa783f0205160c40de894a427114185ce" dependencies = [ "anyhow", - "wasmparser 0.209.1", + "termcolor", + "wasmparser 0.217.0", ] [[package]] name = "wasmtime" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786d8b5e7a4d54917c5ebe555b9667337e5f93383f49bddaaeec2eba68093b45" +checksum = "9e025f6280f91611a59f38057e0a4e72fbc08a2a4e6ed753a0d1970ac634a997" dependencies = [ - "addr2line", + "addr2line 0.22.0", "anyhow", "async-trait", + "bitflags 2.6.0", "bumpalo", "cc", "cfg-if", "encoding_rs", "fxprof-processed-profile", - "gimli", + "gimli 0.29.0", "hashbrown 0.14.3", "indexmap 2.2.6", "ittapi", @@ -5345,7 +5338,6 @@ dependencies = [ "log", "mach2", "memfd", - "memoffset", "object 0.36.0", "once_cell", "paste", @@ -5360,8 +5352,8 @@ dependencies = [ "smallvec", "sptr", "target-lexicon", - "wasm-encoder 0.209.1", - "wasmparser 0.209.1", + "wasm-encoder 0.217.0", + "wasmparser 0.217.0", "wasmtime-asm-macros", "wasmtime-cache", "wasmtime-component-macro", @@ -5380,18 +5372,18 @@ dependencies = [ [[package]] name = "wasmtime-asm-macros" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d697d99c341d4a9ffb72f3af7a02124d233eeb59aee010f36d88e97cca553d5e" +checksum = "2977f9d1d1228154598e8d1cc5d55c4aa744297e9a3523b258e20d6ba0cbc3c9" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "916610f9ae9a6c22deb25bba2e6247ba9f00b093d30620875203b91328a1adfa" +checksum = "97d80a94087214484c427095fdb28448643f16d4b4223d98e21f48df87844125" dependencies = [ "anyhow", "base64 0.21.7", @@ -5404,14 +5396,14 @@ dependencies = [ "sha2", "toml", "windows-sys 0.52.0", - "zstd 0.13.1", + "zstd", ] [[package]] name = "wasmtime-component-macro" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b29b462b068e73b5b27fae092a27f47e5937cabf6b26be2779c978698a52feca" +checksum = "65b4bc589d7839d8dbfc4f4a0ea3380b11062ae26ff77c3a133c202fc4b21a31" dependencies = [ "anyhow", "proc-macro2", @@ -5419,20 +5411,20 @@ dependencies = [ "syn 2.0.76", "wasmtime-component-util", "wasmtime-wit-bindgen", - "wit-parser 0.209.1", + "wit-parser 0.217.0", ] [[package]] name = "wasmtime-component-util" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d2912c53d9054984b380dfbd7579f9c3681b2a73b903a56bd71a1c4f175f1e" +checksum = "8553d3720625ad4e65a9c71e215566361fcefc4e4001f17e7c669c503c33e6f6" [[package]] name = "wasmtime-cranelift" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3975deafea000457ba84355c7c0fce0372937204f77026510b7b454f28a3a65" +checksum = "1b1b81791925aa182f0816562b8b41b9546077ba3a789ca18454a3ffe083963a" dependencies = [ "anyhow", "cfg-if", @@ -5442,36 +5434,39 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli", + "gimli 0.29.0", "log", "object 0.36.0", + "smallvec", "target-lexicon", "thiserror", - "wasmparser 0.209.1", + "wasmparser 0.217.0", "wasmtime-environ", "wasmtime-versioned-export-macros", ] [[package]] name = "wasmtime-environ" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f444e900e848b884d8a8a2949b6f5b92af642a3e663ff8fbe78731143a55be61" +checksum = "fe742ef5ee9ce201e513ee8da472eaf198e760499a730853622fc85a61cfb1eb" dependencies = [ "anyhow", "cpp_demangle", + "cranelift-bitset", "cranelift-entity", - "gimli", + "gimli 0.29.0", "indexmap 2.2.6", "log", "object 0.36.0", "postcard", "rustc-demangle", + "semver", "serde", "serde_derive", "target-lexicon", - "wasm-encoder 0.209.1", - "wasmparser 0.209.1", + "wasm-encoder 0.217.0", + "wasmparser 0.217.0", "wasmprinter", "wasmtime-component-util", "wasmtime-types", @@ -5479,9 +5474,9 @@ dependencies = [ [[package]] name = "wasmtime-fiber" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ded58eb2d1bf0dcd2182d0ccd7055c4b10b50d711514f1d73f61515d0fa829d" +checksum = "2be377649da32af7b3eadd3ab5c89d645bdf0f5af9fe4fc59da457fbe4a87cdd" dependencies = [ "anyhow", "cc", @@ -5494,9 +5489,9 @@ dependencies = [ [[package]] name = "wasmtime-jit-debug" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bc54198c6720f098210a85efb3ba8c078d1de4d373cdb6778850a66ae088d11" +checksum = "109dcbe0367eeda5467ea2950ff81899dab3ee362220eadcae0691d336122d29" dependencies = [ "object 0.36.0", "once_cell", @@ -5506,9 +5501,9 @@ dependencies = [ [[package]] name = "wasmtime-jit-icache-coherence" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5afe2f0499542f9a4bcfa1b55bfdda803b6ade4e7c93c6b99e0f39dba44b0a91" +checksum = "a67e6379ff6f5eb316e4fe2baaf360c7871082006fc31addf3cf58011edb855c" dependencies = [ "anyhow", "cfg-if", @@ -5518,28 +5513,29 @@ dependencies = [ [[package]] name = "wasmtime-slab" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a7de1f2bec5bbb35d532e61c85c049dc84ae671df60492f90b954ecf21169e7" +checksum = "7e1daff42dc6660aa4aead9586a1c41e498a1c15674784589aeb5c5090d09930" [[package]] name = "wasmtime-types" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "412463e9000e14cf6856be48628d2213c20c153e29ffc22b036980c892ea6964" +checksum = "24adc06abbf23bf9abbdc4b4a3bb743436a60a2a76dfabb2e49bf5237d0dadcc" dependencies = [ + "anyhow", "cranelift-entity", "serde", "serde_derive", "smallvec", - "wasmparser 0.209.1", + "wasmparser 0.217.0", ] [[package]] name = "wasmtime-versioned-export-macros" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de5a9bc4f44ceeb168e9e8e3be4e0b4beb9095b468479663a9e24c667e36826f" +checksum = "467bf568f44048477d865a7bb42a1876acd1e2d3de77b42307f5d8e0126fc241" dependencies = [ "proc-macro2", "quote", @@ -5548,13 +5544,13 @@ dependencies = [ [[package]] name = "wasmtime-wasi" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8abb1301089ed8e0b4840f539cba316a73ac382090f1b25d22d8c8eed8df49c7" +checksum = "4f7155aadce49095eeced1a18634a443c8d8fdd2a23bb61f933774393a2c4acf" dependencies = [ "anyhow", "async-trait", - "bitflags 2.4.2", + "bitflags 2.6.0", "bytes", "cap-fs-ext", "cap-net-ext", @@ -5579,9 +5575,9 @@ dependencies = [ [[package]] name = "wasmtime-wasi-http" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "315cadc284b808cfbd6be9295da4009144c106723f09b421ce6c6d89275cfdb7" +checksum = "859b1d684902af4c5f5a6da6f2e576b666ffcd94fd5350b1a4e216e4fbbe6f0b" dependencies = [ "anyhow", "async-trait", @@ -5602,16 +5598,16 @@ dependencies = [ [[package]] name = "wasmtime-winch" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed4db238a0241df2d15f79ad17b3a37a27f2ea6cb885894d81b42ae107544466" +checksum = "4e8fdcd0682324b16fac3f3dd12eb4325d175e849b771aeda6edcb3065c85a4a" dependencies = [ "anyhow", "cranelift-codegen", - "gimli", + "gimli 0.29.0", "object 0.36.0", "target-lexicon", - "wasmparser 0.209.1", + "wasmparser 0.217.0", "wasmtime-cranelift", "wasmtime-environ", "winch-codegen", @@ -5619,14 +5615,14 @@ dependencies = [ [[package]] name = "wasmtime-wit-bindgen" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc077306b38288262e5ba01d4b21532a6987416cdc0aedf04bb06c22a68fdc" +checksum = "eb8a4c5f38371e9dc1718421b03bc8737696587af5e1b233ea515ba5a111d106" dependencies = [ "anyhow", "heck", "indexmap 2.2.6", - "wit-parser 0.209.1", + "wit-parser 0.217.0", ] [[package]] @@ -5640,24 +5636,24 @@ dependencies = [ [[package]] name = "wast" -version = "211.0.1" +version = "217.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b25506dd82d00da6b14a87436b3d52b1d264083fa79cdb72a0d1b04a8595ccaa" +checksum = "79004ecebded92d3c710d4841383368c7f04b63d0992ddd6b0c7d5029b7629b7" dependencies = [ "bumpalo", "leb128", "memchr", "unicode-width", - "wasm-encoder 0.211.1", + "wasm-encoder 0.217.0", ] [[package]] name = "wat" -version = "1.211.1" +version = "1.217.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb716ca6c86eecac2d82541ffc39860118fc0af9309c4f2670637bea2e1bdd7d" +checksum = "c126271c3d92ca0f7c63e4e462e40c69cca52fd4245fcda730d1cf558fb55088" dependencies = [ - "wast 211.0.1", + "wast 217.0.0", ] [[package]] @@ -5708,13 +5704,13 @@ dependencies = [ [[package]] name = "wiggle" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29830e5d01c182d24b94092c697aa7ab0ee97d22e78a2bf40ca91eae6ebca5c2" +checksum = "dc109a53e5475bae50294fecf9eec366ba9725d7fac0a4528f6c1d84d3e2583e" dependencies = [ "anyhow", "async-trait", - "bitflags 2.4.2", + "bitflags 2.6.0", "thiserror", "tracing", "wasmtime", @@ -5723,9 +5719,9 @@ dependencies = [ [[package]] name = "wiggle-generate" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "557567f2793508760cd855f7659b7a0b9dc4dbc451f53f1415d6943a15311ade" +checksum = "c1b1cfa1fca4076eed01a9e505351dce62f0a5b8b23385b2e0daf7d9b02abeeb" dependencies = [ "anyhow", "heck", @@ -5738,9 +5734,9 @@ dependencies = [ [[package]] name = "wiggle-macro" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc26129a8aea20b62c961d1b9ab4a3c3b56b10042ed85d004f8678af0f21ba6e" +checksum = "6d8565ac65a40335305bce35a2cf48bd3bddc244637008d493f63d6a6685be26" dependencies = [ "proc-macro2", "quote", @@ -5781,17 +5777,17 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winch-codegen" -version = "0.20.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c6915884e731b2db0d8cf08cb64474cb69221a161675fd3c135f91febc3daa" +checksum = "b160fca5249410873830548ba7b1d956d8bf2afe72ced5e78266622d07de1303" dependencies = [ "anyhow", "cranelift-codegen", - "gimli", + "gimli 0.29.0", "regalloc2", "smallvec", "target-lexicon", - "wasmparser 0.209.1", + "wasmparser 0.217.0", "wasmtime-cranelift", "wasmtime-environ", ] @@ -6008,7 +6004,7 @@ version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9643b83820c0cd246ecabe5fa454dd04ba4fa67996369466d0747472d337346" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "windows-sys 0.52.0", ] @@ -6019,7 +6015,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39979723340baea490b87b11b2abae05f149d86f2b55c18d41d78a2a2b284c16" dependencies = [ "anyhow", - "bitflags 2.4.2", + "bitflags 2.6.0", "indexmap 2.2.6", "log", "serde", @@ -6051,9 +6047,9 @@ dependencies = [ [[package]] name = "wit-parser" -version = "0.209.1" +version = "0.217.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e79b9e3c0b6bb589dec46317e645851e0db2734c44e2be5e251b03ff4a51269" +checksum = "fb893dcd6d370cfdf19a0d9adfcd403efb8e544e1a0ea3a8b81a21fe392eaa78" dependencies = [ "anyhow", "id-arena", @@ -6064,7 +6060,7 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser 0.209.1", + "wasmparser 0.217.0", ] [[package]] @@ -6106,32 +6102,13 @@ version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" -[[package]] -name = "zstd" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" -dependencies = [ - "zstd-safe 6.0.6", -] - [[package]] name = "zstd" version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" dependencies = [ - "zstd-safe 7.1.0", -] - -[[package]] -name = "zstd-safe" -version = "6.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" -dependencies = [ - "libc", - "zstd-sys", + "zstd-safe", ] [[package]] diff --git a/examples/spin-timer/Cargo.toml b/examples/spin-timer/Cargo.toml index b16e49b471..6071955d28 100644 --- a/examples/spin-timer/Cargo.toml +++ b/examples/spin-timer/Cargo.toml @@ -14,6 +14,6 @@ spin-runtime-factors = { path = "../../crates/runtime-factors" } spin-trigger = { path = "../../crates/trigger" } tokio = { version = "1", features = ["full"] } tokio-scoped = "0.2.0" -wasmtime = "22.0.0" +wasmtime = "25.0.0" [workspace]