summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2025-07-25 22:34:19 +0100
committerAndrew Clayton <a.clayton@nginx.com>2025-07-25 22:46:32 +0100
commit45da9d1da5002d08981ed32b215547b55be90038 (patch)
tree69e08cd542d5f3aef4798237625fd9b28744d019
parentfc26ae4f600ee84d350376b1d91759f54f2cef90 (diff)
downloadunit-45da9d1da5002d08981ed32b215547b55be90038.tar.gz
unit-45da9d1da5002d08981ed32b215547b55be90038.tar.bz2
wasm-wc: Update to wasmtime 35.0.0
This is mainly just to be on the latest version for the next release of Unit. This required some changes to the language module as described here <https://github.com/bytecodealliance/wasmtime/pull/10016>. We also add unnecessary_transmutes to the list of allowed linters to quell warnings like warning: unnecessary transmute --> /home/andrew/src/unit/src/wasm-wasi-component/target/debug/build/wasm-wasi-component-9ae3c2c94201e6be/out/bindings.rs:440:13 | 440 | ... ::std::mem::transmute(self._bitfield_1.get(0usize, 24u8) as u32) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace this with: `u32::cast_signed(self._bitfield_1.get(0usize, 24u8) as u32)` | = note: `#[warn(unnecessary_transmutes)]` on by default Also, because this is new in rustc 1.88, to avoid warnings on older compilers the simplest thing is to just add unknown_lints to the list. Link: <https://lists.gnu.org/archive/html/qemu-rust/2025-07/msg00006.html> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
-rw-r--r--src/wasm-wasi-component/Cargo.lock556
-rw-r--r--src/wasm-wasi-component/Cargo.toml8
-rw-r--r--src/wasm-wasi-component/src/lib.rs28
3 files changed, 287 insertions, 305 deletions
diff --git a/src/wasm-wasi-component/Cargo.lock b/src/wasm-wasi-component/Cargo.lock
index 5a0c26b7..bec4d261 100644
--- a/src/wasm-wasi-component/Cargo.lock
+++ b/src/wasm-wasi-component/Cargo.lock
@@ -18,18 +18,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
[[package]]
-name = "ahash"
-version = "0.8.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75"
-dependencies = [
- "cfg-if",
- "once_cell",
- "version_check",
- "zerocopy",
-]
-
-[[package]]
name = "aho-corasick"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -39,6 +27,12 @@ dependencies = [
]
[[package]]
+name = "allocator-api2"
+version = "0.2.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
+
+[[package]]
name = "ambient-authority"
version = "0.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -131,6 +125,9 @@ name = "bumpalo"
version = "3.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43"
+dependencies = [
+ "allocator-api2",
+]
[[package]]
name = "bytes"
@@ -267,19 +264,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]]
+name = "cranelift-assembler-x64"
+version = "0.122.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ae7b60ec3fd7162427d3b3801520a1908bef7c035b52983cd3ca11b8e7deb51"
+dependencies = [
+ "cranelift-assembler-x64-meta",
+]
+
+[[package]]
+name = "cranelift-assembler-x64-meta"
+version = "0.122.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6511c200fed36452697b4b6b161eae57d917a2044e6333b1c1389ed63ccadeee"
+dependencies = [
+ "cranelift-srcgen",
+]
+
+[[package]]
name = "cranelift-bforest"
-version = "0.114.0"
+version = "0.122.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2ba4f80548f22dc9c43911907b5e322c5555544ee85f785115701e6a28c9abe1"
+checksum = "5f7086a645aa58bae979312f64e3029ac760ac1b577f5cd2417844842a2ca07f"
dependencies = [
"cranelift-entity",
]
[[package]]
name = "cranelift-bitset"
-version = "0.114.0"
+version = "0.122.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "005884e3649c3e5ff2dc79e8a94b138f11569cc08a91244a292714d2a86e9156"
+checksum = "5225b4dec45f3f3dbf383f12560fac5ce8d780f399893607e21406e12e77f491"
dependencies = [
"serde",
"serde_derive",
@@ -287,11 +302,12 @@ dependencies = [
[[package]]
name = "cranelift-codegen"
-version = "0.114.0"
+version = "0.122.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fe4036255ec33ce9a37495dfbcfc4e1118fd34e693eff9a1e106336b7cd16a9b"
+checksum = "858fb3331e53492a95979378d6df5208dd1d0d315f19c052be8115f4efc888e0"
dependencies = [
"bumpalo",
+ "cranelift-assembler-x64",
"cranelift-bforest",
"cranelift-bitset",
"cranelift-codegen-meta",
@@ -300,44 +316,49 @@ dependencies = [
"cranelift-entity",
"cranelift-isle",
"gimli",
- "hashbrown 0.14.5",
+ "hashbrown",
"log",
+ "pulley-interpreter",
"regalloc2",
"rustc-hash 2.1.1",
"serde",
"smallvec",
"target-lexicon",
+ "wasmtime-internal-math",
]
[[package]]
name = "cranelift-codegen-meta"
-version = "0.114.0"
+version = "0.122.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7ca74f4b68319da11d39e894437cb6e20ec7c2e11fbbda823c3bf207beedff7"
+checksum = "456715b9d5f12398f156d5081096e7b5d039f01b9ecc49790a011c8e43e65b5f"
dependencies = [
+ "cranelift-assembler-x64-meta",
"cranelift-codegen-shared",
+ "cranelift-srcgen",
+ "pulley-interpreter",
]
[[package]]
name = "cranelift-codegen-shared"
-version = "0.114.0"
+version = "0.122.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "897e54f433a0269c4187871aa06d452214d5515d228d5bdc22219585e9eef895"
+checksum = "0306041099499833f167a0ddb707e1e54100f1a84eab5631bc3dad249708f482"
[[package]]
name = "cranelift-control"
-version = "0.114.0"
+version = "0.122.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "29cb4018f5bf59fb53f515fa9d80e6f8c5ce19f198dc538984ebd23ecf8965ec"
+checksum = "1672945e1f9afc2297f49c92623f5eabc64398e2cb0d824f8f72a2db2df5af23"
dependencies = [
"arbitrary",
]
[[package]]
name = "cranelift-entity"
-version = "0.114.0"
+version = "0.122.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "305399fd781a2953ac78c1396f02ff53144f39c33eb7fc7789cf4e8936d13a96"
+checksum = "aa3cd55eb5f3825b9ae5de1530887907360a6334caccdc124c52f6d75246c98a"
dependencies = [
"cranelift-bitset",
"serde",
@@ -346,9 +367,9 @@ dependencies = [
[[package]]
name = "cranelift-frontend"
-version = "0.114.0"
+version = "0.122.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9230b460a128d53653456137751d27baf567947a3ab8c0c4d6e31fd08036d81e"
+checksum = "781f9905f8139b8de22987b66b522b416fe63eb76d823f0b3a8c02c8fd9500c7"
dependencies = [
"cranelift-codegen",
"log",
@@ -358,15 +379,15 @@ dependencies = [
[[package]]
name = "cranelift-isle"
-version = "0.114.0"
+version = "0.122.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b961e24ae3ec9813a24a15ae64bbd2a42e4de4d79a7f3225a412e3b94e78d1c8"
+checksum = "a05337a2b02c3df00b4dd9a263a027a07b3dff49f61f7da3b5d195c21eaa633d"
[[package]]
name = "cranelift-native"
-version = "0.114.0"
+version = "0.122.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4d5bd76df6c9151188dfa428c863b33da5b34561b67f43c0cf3f24a794f9fa1f"
+checksum = "2eee7a496dd66380082c9c5b6f2d5fa149cec0ec383feec5caf079ca2b3671c2"
dependencies = [
"cranelift-codegen",
"libc",
@@ -374,6 +395,12 @@ dependencies = [
]
[[package]]
+name = "cranelift-srcgen"
+version = "0.122.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b530783809a55cb68d070e0de60cfbb3db0dc94c8850dd5725411422bedcf6bb"
+
+[[package]]
name = "crc32fast"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -383,26 +410,6 @@ dependencies = [
]
[[package]]
-name = "dirs"
-version = "4.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059"
-dependencies = [
- "dirs-sys",
-]
-
-[[package]]
-name = "dirs-sys"
-version = "0.3.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"
-dependencies = [
- "libc",
- "redox_users",
- "winapi",
-]
-
-[[package]]
name = "displaydoc"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -643,21 +650,12 @@ dependencies = [
[[package]]
name = "hashbrown"
-version = "0.14.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
-dependencies = [
- "ahash",
- "serde",
-]
-
-[[package]]
-name = "hashbrown"
version = "0.15.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5"
dependencies = [
"foldhash",
+ "serde",
]
[[package]]
@@ -886,7 +884,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661"
dependencies = [
"equivalent",
- "hashbrown 0.15.4",
+ "hashbrown",
"serde",
]
@@ -925,9 +923,9 @@ checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130"
[[package]]
name = "itertools"
-version = "0.12.1"
+version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
+checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285"
dependencies = [
"either",
]
@@ -967,6 +965,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67"
[[package]]
+name = "leb128fmt"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2"
+
+[[package]]
name = "libc"
version = "0.2.174"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -989,16 +993,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de"
[[package]]
-name = "libredox"
-version = "0.1.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4488594b9328dee448adb906d8b126d9b7deb7cf5c22161ee591610bb1be83c0"
-dependencies = [
- "bitflags",
- "libc",
-]
-
-[[package]]
name = "linux-raw-sys"
version = "0.4.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1095,7 +1089,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87"
dependencies = [
"crc32fast",
- "hashbrown 0.15.4",
+ "hashbrown",
"indexmap",
"memchr",
]
@@ -1107,12 +1101,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
[[package]]
-name = "paste"
-version = "1.0.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
-
-[[package]]
name = "peeking_take_while"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1186,23 +1174,26 @@ dependencies = [
]
[[package]]
-name = "psm"
-version = "0.1.26"
+name = "pulley-interpreter"
+version = "35.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e944464ec8536cd1beb0bbfd96987eb5e3b72f2ecdafdc5c769a37f1fa2ae1f"
+checksum = "b89c4319786b16c1a6a38ee04788d32c669b61ba4b69da2162c868c18be99c1b"
dependencies = [
- "cc",
+ "cranelift-bitset",
+ "log",
+ "pulley-macros",
+ "wasmtime-internal-math",
]
[[package]]
-name = "pulley-interpreter"
-version = "27.0.0"
+name = "pulley-macros"
+version = "35.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a3b8d81cf799e20564931e9867ca32de545188c6ee4c2e0f6e41d32f0c7dc6fb"
+checksum = "938543690519c20c3a480d20a8efcc8e69abeb44093ab1df4e7c1f81f26c677a"
dependencies = [
- "cranelift-bitset",
- "log",
- "sptr",
+ "proc-macro2",
+ "quote",
+ "syn",
]
[[package]]
@@ -1245,26 +1236,16 @@ dependencies = [
]
[[package]]
-name = "redox_users"
-version = "0.4.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"
-dependencies = [
- "getrandom",
- "libredox",
- "thiserror 1.0.69",
-]
-
-[[package]]
name = "regalloc2"
-version = "0.10.2"
+version = "0.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "12908dbeb234370af84d0579b9f68258a0f67e201412dd9a2814e6f45b2fc0f0"
+checksum = "5216b1837de2149f8bc8e6d5f88a9326b63b8c836ed58ce4a0a29ec736a59734"
dependencies = [
- "hashbrown 0.14.5",
+ "allocator-api2",
+ "bumpalo",
+ "hashbrown",
"log",
"rustc-hash 2.1.1",
- "slice-group-by",
"smallvec",
]
@@ -1453,15 +1434,6 @@ dependencies = [
]
[[package]]
-name = "shellexpand"
-version = "2.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ccc8076840c4da029af4f87e4e8daeb0fca6b87bbb02e10cb60b791450e11e4"
-dependencies = [
- "dirs",
-]
-
-[[package]]
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1474,12 +1446,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d"
[[package]]
-name = "slice-group-by"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7"
-
-[[package]]
name = "smallvec"
version = "1.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1499,12 +1465,6 @@ dependencies = [
]
[[package]]
-name = "sptr"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b9b39299b249ad65f3b7e96443bad61c02ca5cd3589f46cb6d610a0fd6c0d6a"
-
-[[package]]
name = "stable_deref_trait"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1556,9 +1516,9 @@ dependencies = [
[[package]]
name = "target-lexicon"
-version = "0.12.16"
+version = "0.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
+checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a"
[[package]]
name = "termcolor"
@@ -1693,6 +1653,17 @@ dependencies = [
]
[[package]]
+name = "trait-variant"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70977707304198400eb4835a78f6a9f928bf41bba420deb8fdb175cd965d77a7"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
name = "try-lock"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1734,12 +1705,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
[[package]]
-name = "version_check"
-version = "0.9.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
-
-[[package]]
name = "want"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1756,9 +1721,9 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
[[package]]
name = "wasi-common"
-version = "27.0.0"
+version = "35.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "829f6c8c15912907b472bd9d195893bcdb1bde9cd8de55f134f6ab8aa507bf10"
+checksum = "8f17747bf7f2275572f4e3ed884e8143285a711fbf25999244d61644fe212340"
dependencies = [
"anyhow",
"bitflags",
@@ -1770,9 +1735,9 @@ dependencies = [
"io-extras",
"io-lifetimes",
"log",
- "rustix 0.38.44",
+ "rustix 1.0.8",
"system-interface",
- "thiserror 1.0.69",
+ "thiserror 2.0.12",
"tracing",
"wasmtime",
"wiggle",
@@ -1839,11 +1804,11 @@ dependencies = [
[[package]]
name = "wasm-encoder"
-version = "0.219.2"
+version = "0.235.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8aa79bcd666a043b58f5fa62b221b0b914dd901e6f620e8ab7371057a797f3e1"
+checksum = "b3bc393c395cb621367ff02d854179882b9a351b4e0c93d1397e6090b53a5c2a"
dependencies = [
- "leb128",
+ "leb128fmt",
"wasmparser",
]
@@ -1870,13 +1835,12 @@ dependencies = [
[[package]]
name = "wasmparser"
-version = "0.219.2"
+version = "0.235.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5220ee4c6ffcc0cb9d7c47398052203bc902c8ef3985b0c8134118440c0b2921"
+checksum = "161296c618fa2d63f6ed5fffd1112937e803cb9ec71b32b01a76321555660917"
dependencies = [
- "ahash",
"bitflags",
- "hashbrown 0.14.5",
+ "hashbrown",
"indexmap",
"semver",
"serde",
@@ -1884,9 +1848,9 @@ dependencies = [
[[package]]
name = "wasmprinter"
-version = "0.219.2"
+version = "0.235.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c68c93bcc5e934985afd8b65214bdd77abd3863b2e1855eae1b07a11c4ef30a8"
+checksum = "75aa8e9076de6b9544e6dab4badada518cca0bf4966d35b131bbd057aed8fa0a"
dependencies = [
"anyhow",
"termcolor",
@@ -1895,10 +1859,11 @@ dependencies = [
[[package]]
name = "wasmtime"
-version = "27.0.0"
+version = "35.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b79302e3e084713249cc5622e8608e7410afdeeea8c8026d04f491d1fab0b4b"
+checksum = "b6fe976922a16af3b0d67172c473d1fd4f1aa5d0af9c8ba6538c741f3af686f4"
dependencies = [
+ "addr2line",
"anyhow",
"async-trait",
"bitflags",
@@ -1906,75 +1871,99 @@ dependencies = [
"cc",
"cfg-if",
"encoding_rs",
- "hashbrown 0.14.5",
+ "hashbrown",
"indexmap",
"libc",
- "libm",
"log",
"mach2",
"memfd",
"object",
"once_cell",
- "paste",
"postcard",
- "psm",
"pulley-interpreter",
- "rustix 0.38.44",
+ "rustix 1.0.8",
"semver",
"serde",
"serde_derive",
"smallvec",
- "sptr",
"target-lexicon",
+ "trait-variant",
"wasmparser",
- "wasmtime-asm-macros",
- "wasmtime-component-macro",
- "wasmtime-component-util",
- "wasmtime-cranelift",
"wasmtime-environ",
- "wasmtime-fiber",
- "wasmtime-jit-icache-coherence",
- "wasmtime-slab",
- "wasmtime-versioned-export-macros",
- "wasmtime-winch",
+ "wasmtime-internal-asm-macros",
+ "wasmtime-internal-component-macro",
+ "wasmtime-internal-component-util",
+ "wasmtime-internal-cranelift",
+ "wasmtime-internal-fiber",
+ "wasmtime-internal-jit-icache-coherence",
+ "wasmtime-internal-math",
+ "wasmtime-internal-slab",
+ "wasmtime-internal-unwinder",
+ "wasmtime-internal-versioned-export-macros",
+ "wasmtime-internal-winch",
"windows-sys 0.59.0",
]
[[package]]
-name = "wasmtime-asm-macros"
-version = "27.0.0"
+name = "wasmtime-environ"
+version = "35.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fe53a24e7016a5222875d8ca3ad6024b464465985693c42098cd0bb710002c28"
+checksum = "44b6264a78d806924abbc76bbc75eac24976bc83bdfb938e5074ae551242436f"
+dependencies = [
+ "anyhow",
+ "cranelift-bitset",
+ "cranelift-entity",
+ "gimli",
+ "indexmap",
+ "log",
+ "object",
+ "postcard",
+ "semver",
+ "serde",
+ "serde_derive",
+ "smallvec",
+ "target-lexicon",
+ "wasm-encoder",
+ "wasmparser",
+ "wasmprinter",
+ "wasmtime-internal-component-util",
+]
+
+[[package]]
+name = "wasmtime-internal-asm-macros"
+version = "35.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6775a9b516559716e5710e95a8014ca0adcc81e5bf4d3ad7899d89ae40094d1a"
dependencies = [
"cfg-if",
]
[[package]]
-name = "wasmtime-component-macro"
-version = "27.0.0"
+name = "wasmtime-internal-component-macro"
+version = "35.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e118acbd2bc09b32ad8606bc7cef793bf5019c1b107772e64dc6c76b5055d40b"
+checksum = "dc3d098205e405e6b5ced06c1815621b823464b6ea289eaafe494139b0aee287"
dependencies = [
"anyhow",
"proc-macro2",
"quote",
"syn",
- "wasmtime-component-util",
- "wasmtime-wit-bindgen",
+ "wasmtime-internal-component-util",
+ "wasmtime-internal-wit-bindgen",
"wit-parser",
]
[[package]]
-name = "wasmtime-component-util"
-version = "27.0.0"
+name = "wasmtime-internal-component-util"
+version = "35.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4a6db4f3ee18c699629eabb9c64e77efe5a93a5137f098db7cab295037ba41c2"
+checksum = "219252067216242ed2b32665611b0ee356d6e92cbb897ecb9a10cae0b97bdeca"
[[package]]
-name = "wasmtime-cranelift"
-version = "27.0.0"
+name = "wasmtime-internal-cranelift"
+version = "35.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b87e6c78f562b50aff1afd87ff32a57e241424c846c1c8f3c5fd352d2d62906"
+checksum = "7ec9ad7565e6a8de7cb95484e230ff689db74a4a085219e0da0cbd637a29c01c"
dependencies = [
"anyhow",
"cfg-if",
@@ -1987,77 +1976,77 @@ dependencies = [
"itertools",
"log",
"object",
+ "pulley-interpreter",
"smallvec",
"target-lexicon",
- "thiserror 1.0.69",
+ "thiserror 2.0.12",
"wasmparser",
"wasmtime-environ",
- "wasmtime-versioned-export-macros",
+ "wasmtime-internal-math",
+ "wasmtime-internal-versioned-export-macros",
]
[[package]]
-name = "wasmtime-environ"
-version = "27.0.0"
+name = "wasmtime-internal-fiber"
+version = "35.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c25bfeaa16432d59a0706e2463d315ef4c9ebcfaf5605670b99d46373bdf9f27"
+checksum = "8b636ff8b220ebaf29dfe3b23770e4b2bad317b9683e3bf7345e162387385b39"
dependencies = [
"anyhow",
- "cranelift-bitset",
- "cranelift-entity",
- "gimli",
- "indexmap",
- "log",
- "object",
- "postcard",
- "semver",
- "serde",
- "serde_derive",
- "smallvec",
- "target-lexicon",
- "wasm-encoder",
- "wasmparser",
- "wasmprinter",
- "wasmtime-component-util",
+ "cc",
+ "cfg-if",
+ "libc",
+ "rustix 1.0.8",
+ "wasmtime-internal-asm-macros",
+ "wasmtime-internal-versioned-export-macros",
+ "windows-sys 0.59.0",
]
[[package]]
-name = "wasmtime-fiber"
-version = "27.0.0"
+name = "wasmtime-internal-jit-icache-coherence"
+version = "35.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "759ab0caa3821a6211743fe1eed448ab9df439e3af6c60dea15486c055611806"
+checksum = "4417e06b7f80baff87d9770852c757a39b8d7f11d78b2620ca992b8725f16f50"
dependencies = [
"anyhow",
- "cc",
"cfg-if",
- "rustix 0.38.44",
- "wasmtime-asm-macros",
- "wasmtime-versioned-export-macros",
+ "libc",
"windows-sys 0.59.0",
]
[[package]]
-name = "wasmtime-jit-icache-coherence"
-version = "27.0.0"
+name = "wasmtime-internal-math"
+version = "35.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "91b218a92866f74f35162f5d03a4e0f62cd0e1cc624285b1014275e5d4575fad"
+checksum = "7710d5c4ecdaa772927fd11e5dc30a9a62d1fc8fe933e11ad5576ad596ab6612"
dependencies = [
- "anyhow",
- "cfg-if",
- "libc",
- "windows-sys 0.59.0",
+ "libm",
]
[[package]]
-name = "wasmtime-slab"
-version = "27.0.0"
+name = "wasmtime-internal-slab"
+version = "35.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4d5f8acf677ee6b3b8ba400dd9753ea4769e56a95c4b30b045ac6d2d54b2f8ea"
+checksum = "e6ab22fabe1eed27ab01fd47cd89deacf43ad222ed7fd169ba6f4dd1fbddc53b"
[[package]]
-name = "wasmtime-versioned-export-macros"
-version = "27.0.0"
+name = "wasmtime-internal-unwinder"
+version = "35.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df09be00c38f49172ca9936998938476e3f2df782673a39ae2ef9fb0838341b6"
+checksum = "307708f302f5dcf19c1bbbfb3d9f2cbc837dd18088a7988747b043a46ba38ecc"
+dependencies = [
+ "anyhow",
+ "cfg-if",
+ "cranelift-codegen",
+ "log",
+ "object",
+]
+
+[[package]]
+name = "wasmtime-internal-versioned-export-macros"
+version = "35.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "342b0466f92b7217a4de9e114175fedee1907028567d2548bcd42f71a8b5b016"
dependencies = [
"proc-macro2",
"quote",
@@ -2065,10 +2054,39 @@ dependencies = [
]
[[package]]
+name = "wasmtime-internal-winch"
+version = "35.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2012e7384c25b91aab2f1b6a1e1cbab9d0f199bbea06cc873597a3f047f05730"
+dependencies = [
+ "anyhow",
+ "cranelift-codegen",
+ "gimli",
+ "object",
+ "target-lexicon",
+ "wasmparser",
+ "wasmtime-environ",
+ "wasmtime-internal-cranelift",
+ "winch-codegen",
+]
+
+[[package]]
+name = "wasmtime-internal-wit-bindgen"
+version = "35.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ae057d44a5b60e6ec529b0c21809a9d1fc92e91ef6e0f6771ed11dd02a94a08"
+dependencies = [
+ "anyhow",
+ "heck",
+ "indexmap",
+ "wit-parser",
+]
+
+[[package]]
name = "wasmtime-wasi"
-version = "27.0.0"
+version = "35.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad5cf227161565057fc994edf14180341817372a218f1597db48a43946e5f875"
+checksum = "6d252bc54438b6b979320dc48fe8328429761aaef62cee12a848b0389b1f255c"
dependencies = [
"anyhow",
"async-trait",
@@ -2083,22 +2101,23 @@ dependencies = [
"futures",
"io-extras",
"io-lifetimes",
- "rustix 0.38.44",
+ "rustix 1.0.8",
"system-interface",
- "thiserror 1.0.69",
+ "thiserror 2.0.12",
"tokio",
"tracing",
"url",
"wasmtime",
+ "wasmtime-wasi-io",
"wiggle",
"windows-sys 0.59.0",
]
[[package]]
name = "wasmtime-wasi-http"
-version = "27.0.0"
+version = "35.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78d5dc4907e8f41873b1c8475a14c263f6f7babb6724e9fe3d92c6403a8d9870"
+checksum = "e8de4cddef458af6d8efac0b03df4bae4446d90db007999da76b789ddb921f98"
dependencies = [
"anyhow",
"async-trait",
@@ -2114,36 +2133,21 @@ dependencies = [
"tracing",
"wasmtime",
"wasmtime-wasi",
+ "wasmtime-wasi-io",
"webpki-roots 0.26.11",
]
[[package]]
-name = "wasmtime-winch"
-version = "27.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89d6b5297bea14d8387c3974b2b011de628cc9b188f135cec752b74fd368964b"
-dependencies = [
- "anyhow",
- "cranelift-codegen",
- "gimli",
- "object",
- "target-lexicon",
- "wasmparser",
- "wasmtime-cranelift",
- "wasmtime-environ",
- "winch-codegen",
-]
-
-[[package]]
-name = "wasmtime-wit-bindgen"
-version = "27.0.0"
+name = "wasmtime-wasi-io"
+version = "35.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf3963c9c29df91564d8bd181eb00d0dbaeafa1b2a01e15952bb7391166b704e"
+checksum = "7b2664b7dabe650a102559ae49108fb00f884f319aadefcf20806ab5f2dbd535"
dependencies = [
"anyhow",
- "heck",
- "indexmap",
- "wit-parser",
+ "async-trait",
+ "bytes",
+ "futures",
+ "wasmtime",
]
[[package]]
@@ -2187,14 +2191,14 @@ dependencies = [
[[package]]
name = "wiggle"
-version = "27.0.0"
+version = "35.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "80e0f6ef83a263c0fa11957c363aeaa76dc84832484d0e119f22810d4d0e09a7"
+checksum = "fc3ea480ce117a35b61e466e4f77422f2b29f744400e05de3ad87d73b8a1877c"
dependencies = [
"anyhow",
"async-trait",
"bitflags",
- "thiserror 1.0.69",
+ "thiserror 2.0.12",
"tracing",
"wasmtime",
"wiggle-macro",
@@ -2202,24 +2206,23 @@ dependencies = [
[[package]]
name = "wiggle-generate"
-version = "27.0.0"
+version = "35.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd266b290a0fdace3af6a05c6ebbcc54de303a774448ecf5a98cd0bc12d89c52"
+checksum = "cec945b902cacd960fe5d441b60146b24639d81b887451a30bf86824a8185d79"
dependencies = [
"anyhow",
"heck",
"proc-macro2",
"quote",
- "shellexpand",
"syn",
"witx",
]
[[package]]
name = "wiggle-macro"
-version = "27.0.0"
+version = "35.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b8eb1a5783540696c59cefbfc9e52570c2d5e62bd47bdf0bdcef29231879db2"
+checksum = "f5872fbe512b73acd514e7ef5bd5aee0ff951a12c1fed0293e1f7992de30df9f"
dependencies = [
"proc-macro2",
"quote",
@@ -2228,22 +2231,6 @@ dependencies = [
]
[[package]]
-name = "winapi"
-version = "0.3.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
-dependencies = [
- "winapi-i686-pc-windows-gnu",
- "winapi-x86_64-pc-windows-gnu",
-]
-
-[[package]]
-name = "winapi-i686-pc-windows-gnu"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
-
-[[package]]
name = "winapi-util"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2253,26 +2240,23 @@ dependencies = [
]
[[package]]
-name = "winapi-x86_64-pc-windows-gnu"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
-
-[[package]]
name = "winch-codegen"
-version = "27.0.0"
+version = "35.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b42b678c8651ec4900d7600037d235429fc985c31cbc33515885ec0d2a9e158"
+checksum = "839a334ef7c62d8368dbd427e767a6fbb1ba08cc12ecce19cbb666c10613b585"
dependencies = [
"anyhow",
+ "cranelift-assembler-x64",
"cranelift-codegen",
"gimli",
"regalloc2",
"smallvec",
"target-lexicon",
+ "thiserror 2.0.12",
"wasmparser",
- "wasmtime-cranelift",
"wasmtime-environ",
+ "wasmtime-internal-cranelift",
+ "wasmtime-internal-math",
]
[[package]]
@@ -2501,9 +2485,9 @@ dependencies = [
[[package]]
name = "wit-parser"
-version = "0.219.2"
+version = "0.235.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca004bb251010fe956f4a5b9d4bf86b4e415064160dd6669569939e8cbf2504f"
+checksum = "0a1f95a87d03a33e259af286b857a95911eb46236a0f726cbaec1227b3dfc67a"
dependencies = [
"anyhow",
"id-arena",
diff --git a/src/wasm-wasi-component/Cargo.toml b/src/wasm-wasi-component/Cargo.toml
index e9252bcc..e4c36bf1 100644
--- a/src/wasm-wasi-component/Cargo.toml
+++ b/src/wasm-wasi-component/Cargo.toml
@@ -17,10 +17,10 @@ http-body = { version = "1.0.0", default-features = false }
http-body-util = "0.1.0"
hyper = "1.4.1"
tokio = { version = "1.33.0", default-features = false }
-wasi-common = "27.0.0"
-wasmtime = { version = "27.0.0", default-features = false, features = ['component-model', 'cranelift'] }
-wasmtime-wasi = "27.0.0"
-wasmtime-wasi-http = "27.0.0"
+wasi-common = "35.0.0"
+wasmtime = { version = "35.0.0", default-features = false, features = ['component-model', 'cranelift'] }
+wasmtime-wasi = "35.0.0"
+wasmtime-wasi-http = "35.0.0"
[build-dependencies]
bindgen = "0.68.1"
diff --git a/src/wasm-wasi-component/src/lib.rs b/src/wasm-wasi-component/src/lib.rs
index 93c26214..0fb176ea 100644
--- a/src/wasm-wasi-component/src/lib.rs
+++ b/src/wasm-wasi-component/src/lib.rs
@@ -11,7 +11,9 @@ use std::sync::OnceLock;
use tokio::sync::mpsc;
use wasmtime::component::{Component, Linker, ResourceTable};
use wasmtime::{Config, Engine, Store};
-use wasmtime_wasi::{DirPerms, FilePerms, WasiCtx, WasiCtxBuilder, WasiView};
+use wasmtime_wasi::p2::{WasiCtx, WasiCtxBuilder, WasiView, IoView,
+ add_to_linker_async};
+use wasmtime_wasi::{DirPerms, FilePerms};
use wasmtime_wasi_http::bindings::http::types::{ErrorCode, Scheme};
use wasmtime_wasi_http::bindings::ProxyPre;
use wasmtime_wasi_http::{WasiHttpCtx, WasiHttpView};
@@ -20,7 +22,9 @@ use wasmtime_wasi_http::{WasiHttpCtx, WasiHttpView};
non_camel_case_types,
non_upper_case_globals,
non_snake_case,
- dead_code
+ dead_code,
+ unknown_lints,
+ unnecessary_transmutes
)]
mod bindings {
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
@@ -208,7 +212,7 @@ impl GlobalState {
let component = Component::from_file(&engine, &global_config.component)
.context("failed to compile component")?;
let mut linker = Linker::<StoreState>::new(&engine);
- wasmtime_wasi::add_to_linker_async(&mut linker)
+ add_to_linker_async(&mut linker)
.context("failed to add wasi to linker")?;
wasmtime_wasi_http::add_only_http_to_linker_sync(&mut linker)
.context("failed to add wasi:http to linker")?;
@@ -591,22 +595,16 @@ struct StoreState {
table: ResourceTable,
}
+impl IoView for StoreState {
+ fn table(&mut self) -> &mut ResourceTable { &mut self.table }
+}
+
impl WasiView for StoreState {
- fn table(&mut self) -> &mut ResourceTable {
- &mut self.table
- }
- fn ctx(&mut self) -> &mut WasiCtx {
- &mut self.ctx
- }
+ fn ctx(&mut self) -> &mut WasiCtx { &mut self.ctx }
}
impl WasiHttpView for StoreState {
- fn ctx(&mut self) -> &mut WasiHttpCtx {
- &mut self.http
- }
- fn table(&mut self) -> &mut ResourceTable {
- &mut self.table
- }
+ fn ctx(&mut self) -> &mut WasiHttpCtx { &mut self.http }
}
impl StoreState {}