From cd2282b4d20cf44871b195eac148769aeec3c2e1 Mon Sep 17 00:00:00 2001 From: Yordis Prieto Date: Tue, 23 Dec 2025 02:49:23 -0500 Subject: [PATCH] Add support for map type Signed-off-by: Yordis Prieto --- Cargo.lock | 1892 +++++++++-------- Cargo.toml | 26 +- crates/c-api/CMakeLists.txt | 8 +- .../include/wasmtime/component/types/val.h | 43 + .../include/wasmtime/component/types/val.hh | 40 + crates/c-api/include/wasmtime/component/val.h | 17 + crates/c-api/src/component/types/val.rs | 29 + crates/c-api/src/component/val.rs | 42 + crates/c-api/tests/component/types.cc | 9 + crates/environ/src/compile/module_environ.rs | 5 +- crates/environ/src/component/translate.rs | 3 - crates/environ/src/component/types.rs | 18 +- crates/environ/src/component/types_builder.rs | 38 + crates/environ/src/fact/trampoline.rs | 275 ++- crates/test-util/src/component.rs | 1 + crates/test-util/src/component_fuzz.rs | 28 +- crates/test-util/src/wasmtime_wast.rs | 3 + crates/test-util/src/wast.rs | 3 + crates/wasmtime/src/config.rs | 13 +- .../src/runtime/component/func/typed.rs | 1 + .../wasmtime/src/runtime/component/types.rs | 45 +- .../wasmtime/src/runtime/component/values.rs | 136 +- crates/wasmtime/src/runtime/wave/component.rs | 11 +- crates/wast/src/component.rs | 1 + crates/wit-bindgen/src/lib.rs | 20 + crates/wit-bindgen/src/rust.rs | 6 + crates/wit-bindgen/src/types.rs | 5 + crates/wizer/src/parse.rs | 2 +- tests/all/component_model.rs | 2 +- tests/all/component_model/dynamic.rs | 341 +++ tests/all/component_model/func.rs | 287 ++- .../misc_testsuite/component-model/types.wast | 6 + 32 files changed, 2444 insertions(+), 912 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 28683179234d..7fd11f4900ba 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,15 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "addr2line" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" -dependencies = [ - "gimli 0.31.1", -] - [[package]] name = "addr2line" version = "0.25.1" @@ -22,9 +13,9 @@ dependencies = [ [[package]] name = "adler2" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aes" @@ -39,18 +30,18 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] [[package]] name = "allocator-api2" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "ambient-authority" @@ -155,7 +146,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -166,23 +157,23 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.1.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "backtrace" -version = "0.3.75" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" +checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" dependencies = [ - "addr2line 0.24.1", + "addr2line", "cfg-if", "libc", "miniz_oxide", - "object 0.36.5", + "object", "rustc-demangle", - "windows-targets 0.52.6", + "windows-link", ] [[package]] @@ -193,9 +184,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" -version = "1.6.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +checksum = "0e050f626429857a27ddccb31e0aca21356bfa709c04041aefddac081a8f068a" [[package]] name = "beef" @@ -209,7 +200,7 @@ version = "0.72.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "cexpr", "clang-sys", "itertools 0.13.0", @@ -220,23 +211,23 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] name = "bit-set" -version = "0.5.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e11e16035ea35e4e5997b393eacbf6f63983188f7a2ad25bfb13465f5ad59de" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" dependencies = [ "bit-vec", ] [[package]] name = "bit-vec" -version = "0.6.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" [[package]] name = "bitflags" @@ -246,9 +237,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.4" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" [[package]] name = "bitmaps" @@ -261,29 +252,29 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.2" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] [[package]] name = "bstr" -version = "1.6.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" +checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" dependencies = [ "memchr", - "regex-automata 0.3.3", + "regex-automata", "serde", ] [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" dependencies = [ "allocator-api2", ] @@ -294,21 +285,21 @@ version = "41.0.0" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" [[package]] name = "bytesize" -version = "2.0.1" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3c8f83209414aacf0eeae3cf730b18d6981697fba62f200fcfb92b9f082acba" +checksum = "6bd91ee7b2422bcb158d90ef4d14f75ef67f340943fc4149891dcce8f8b972a3" [[package]] name = "bzip2" @@ -322,12 +313,11 @@ dependencies = [ [[package]] name = "bzip2-sys" -version = "0.1.11+1.0.8" +version = "0.1.13+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14" dependencies = [ "cc", - "libc", "pkg-config", ] @@ -343,11 +333,11 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.4" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2" +checksum = "e629a66d692cb9ff1a1c664e41771b3dcaf961985a9774c0eb0bd1b51cf60a48" dependencies = [ - "serde", + "serde_core", ] [[package]] @@ -359,7 +349,7 @@ dependencies = [ "cap-primitives", "cap-std", "io-lifetimes", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -370,8 +360,8 @@ checksum = "20a158160765c6a7d0d8c072a53d772e4cb243f38b04bfcf6b4939cfbe7482e7" dependencies = [ "cap-primitives", "cap-std", - "rustix 1.0.8", - "smallvec", + "rustix 1.1.2", + "smallvec 1.15.1", ] [[package]] @@ -386,9 +376,9 @@ dependencies = [ "io-lifetimes", "ipnet", "maybe-owned", - "rustix 1.0.8", + "rustix 1.1.2", "rustix-linux-procfs", - "windows-sys 0.52.0", + "windows-sys 0.59.0", "winx", ] @@ -411,7 +401,7 @@ dependencies = [ "cap-primitives", "io-extras", "io-lifetimes", - "rustix 1.0.8", + "rustix 1.1.2", ] [[package]] @@ -424,7 +414,7 @@ dependencies = [ "cap-primitives", "iana-time-zone", "once_cell", - "rustix 1.0.8", + "rustix 1.1.2", "winx", ] @@ -450,9 +440,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.2" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" dependencies = [ "serde", ] @@ -479,9 +469,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.41" +version = "1.2.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac9fe6cdbb24b6ade63616c0a0688e45bb56732262c158df3c0c4bea4ca47cb7" +checksum = "9f50d563227a1c37cc0a263f64eca3334388c01c5e4c4861a9def205c614383c" dependencies = [ "find-msvc-tools", "jobserver", @@ -500,15 +490,15 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "ciborium" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c137568cc60b904a7724001b35ce2630fd00d5d84805fbb608ab89509d788f" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" dependencies = [ "ciborium-io", "ciborium-ll", @@ -517,18 +507,18 @@ dependencies = [ [[package]] name = "ciborium-io" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "346de753af073cc87b52b2083a506b38ac176a44cfb05497b622e27be899b369" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" [[package]] name = "ciborium-ll" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213030a2b5a4e0c0892b6652260cf6ccac84827b83a85a534e178e3906c4cf1b" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" dependencies = [ "ciborium-io", - "half 1.8.2", + "half", ] [[package]] @@ -554,9 +544,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.48" +version = "4.5.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2134bb3ea021b78629caa971416385309e0131b351b25e01dc16fb54e1b5fae" +checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8" dependencies = [ "clap_builder", "clap_derive", @@ -564,9 +554,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.48" +version = "4.5.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2ba64afa3c0a6df7fa517765e31314e983f51dda798ffba27b988194fb65dc9" +checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00" dependencies = [ "anstream", "anstyle", @@ -577,30 +567,30 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.58" +version = "4.5.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75bf0b32ad2e152de789bb635ea4d3078f6b838ad7974143e99b99f45a04af4a" +checksum = "004eef6b14ce34759aa7de4aea3217e368f463f46a3ed3764ca4b5a4404003b4" dependencies = [ "clap", ] [[package]] name = "clap_derive" -version = "4.5.47" +version = "4.5.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfd7eae0b0f1a6e63d4b13c9c478de77c2eb546fba158ad50b4203dc24b9f9c" +checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] name = "clap_lex" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" +checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" [[package]] name = "cobs" @@ -618,7 +608,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" dependencies = [ "termcolor", - "unicode-width 0.1.9", + "unicode-width 0.1.14", ] [[package]] @@ -633,14 +623,14 @@ version = "0.0.0" dependencies = [ "anyhow", "bytes", - "env_logger 0.11.5", + "env_logger 0.11.8", "futures", "once_cell", "tempfile", "test-programs-artifacts", "tokio", "wasm-compose", - "wasmparser 0.243.0", + "wasmparser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", "wasmtime", "wasmtime-wasi", ] @@ -671,24 +661,24 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpp_demangle" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8227005286ec39567949b33df9896bcadfa6051bccca2488129f108ca23119" +checksum = "f2bb79cb74d735044c972aae58ed0aaa9a837e85b01106a54c39e42e97f62253" dependencies = [ "cfg-if", ] [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] @@ -763,9 +753,9 @@ dependencies = [ "cranelift-entity", "cranelift-isle", "criterion", - "env_logger 0.11.5", + "env_logger 0.11.8", "gimli 0.32.3", - "hashbrown 0.15.2", + "hashbrown 0.15.5", "log", "postcard", "proptest", @@ -776,7 +766,7 @@ dependencies = [ "serde_derive", "sha2", "similar", - "smallvec", + "smallvec 1.15.1", "souper-ir", "target-lexicon", "wasmtime-internal-math", @@ -837,7 +827,7 @@ dependencies = [ "serde", "serde_derive", "similar", - "smallvec", + "smallvec 1.15.1", "target-lexicon", "thiserror 2.0.17", "toml", @@ -850,11 +840,11 @@ name = "cranelift-frontend" version = "0.128.0" dependencies = [ "cranelift-codegen", - "env_logger 0.11.5", - "hashbrown 0.15.2", + "env_logger 0.11.8", + "hashbrown 0.15.5", "log", "similar", - "smallvec", + "smallvec 1.15.1", "target-lexicon", ] @@ -880,7 +870,7 @@ dependencies = [ "cranelift-reader", "libm", "log", - "smallvec", + "smallvec 1.15.1", "thiserror 2.0.17", ] @@ -922,7 +912,7 @@ dependencies = [ "anyhow", "cranelift-codegen", "cranelift-control", - "hashbrown 0.15.2", + "hashbrown 0.15.5", "serde", "serde_derive", ] @@ -947,7 +937,7 @@ dependencies = [ "cranelift-frontend", "cranelift-module", "log", - "object 0.37.3", + "object", "target-lexicon", ] @@ -957,7 +947,7 @@ version = "0.128.0" dependencies = [ "anyhow", "cranelift-codegen", - "smallvec", + "smallvec 1.15.1", "target-lexicon", ] @@ -994,7 +984,7 @@ dependencies = [ "cranelift-native", "cranelift-object", "cranelift-reader", - "env_logger 0.11.5", + "env_logger 0.11.8", "filecheck", "log", "pulley-interpreter", @@ -1011,9 +1001,9 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" dependencies = [ "cfg-if", ] @@ -1052,11 +1042,10 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.1" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ - "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] @@ -1072,21 +1061,21 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crunchy" -version = "0.2.2" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "crypto-common" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" dependencies = [ "generic-array", "typenum", @@ -1107,24 +1096,34 @@ dependencies = [ "uuid", ] +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "pem-rfc7468", + "zeroize", +] + [[package]] name = "deranged" -version = "0.3.11" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" dependencies = [ "powerfmt", ] [[package]] name = "derive_arbitrary" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d475dfebcb4854d596b17b09f477616f80f17a550517f2b3615d8c205d5c802b" +checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -1167,23 +1166,25 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] name = "dlmalloc" -version = "0.2.4" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "203540e710bfadb90e5e29930baf5d10270cec1f43ab34f46f78b147b2de715a" +checksum = "6738d2e996274e499bc7b0d693c858b7720b9cd2543a0643a3087e6cb0a4fa16" dependencies = [ + "cfg-if", "libc", + "windows-sys 0.61.2", ] [[package]] name = "easy-smt" -version = "0.2.2" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc74633db03a8b18de7c933fbd72402d45dfaf2d1736c1fd8ff9bbe461b4572" +checksum = "5f07ca2cd196ea6f5c1a728d609f4a38b02d5d0f1bd26c913929396bd38002d6" dependencies = [ "log", "unicode-segmentation", @@ -1195,19 +1196,19 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05a6c0bbc92278f84e742f08c0ab9cb16a987376cd2bc39d228ef9c74d98d6f7" dependencies = [ - "indexmap 1.9.1", + "indexmap 1.9.3", "instant", "log", "once_cell", - "smallvec", + "smallvec 1.15.1", "symbolic_expressions", ] [[package]] name = "either" -version = "1.13.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "embedded-io" @@ -1234,18 +1235,18 @@ dependencies = [ [[package]] name = "encoding_rs" -version = "0.8.31" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] [[package]] name = "env_filter" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" +checksum = "1bf3c259d255ca70051b30e2e95b5446cdb8949ac4cd22c0d7fd634d89f568e2" dependencies = [ "log", "regex", @@ -1253,9 +1254,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.10.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ "humantime", "is-terminal", @@ -1266,22 +1267,22 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.5" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" +checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f" dependencies = [ "anstream", "anstyle", "env_filter", - "humantime", + "jiff", "log", ] [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" @@ -1295,12 +1296,9 @@ dependencies = [ [[package]] name = "escape8259" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4911e3666fcd7826997b4745c8224295a6f3072f1418c3067b97a67557ee" -dependencies = [ - "rustversion", -] +checksum = "5692dd7b5a1978a5aeb0ce83b7655c58ca8efdcb79d21036ea249da95afec2c6" [[package]] name = "example-component-wasm" @@ -1347,8 +1345,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78" dependencies = [ "cfg-if", - "rustix 1.0.8", - "windows-sys 0.52.0", + "rustix 1.1.2", + "windows-sys 0.59.0", ] [[package]] @@ -1357,7 +1355,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a3cc21c33af89af0930c8cae4ade5e6fdc17b5d2c97b3d2e2edb67a1cf683f3" dependencies = [ - "env_logger 0.10.0", + "env_logger 0.10.2", "log", ] @@ -1368,26 +1366,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fe00b427b7c4835f8b82170eb7b9a63634376b63d73b9a9093367e82570bbaa" dependencies = [ "regex", - "thiserror 1.0.65", + "thiserror 1.0.69", ] [[package]] name = "filetime" -version = "0.2.16" +version = "0.2.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0408e2626025178a6a7f7ffc05a25bc47103229f19c113755de7bf63816290c" +checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed" dependencies = [ "cfg-if", "libc", - "redox_syscall", - "winapi", + "libredox", + "windows-sys 0.60.2", ] [[package]] name = "find-msvc-tools" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" +checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" [[package]] name = "fixedbitset" @@ -1397,18 +1395,18 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flagset" -version = "0.4.3" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda653ca797810c02f7ca4b804b40b8b95ae046eb989d356bce17919a8c25499" +checksum = "b7ac824320a75a52197e8f2d787f6a38b6718bb6897a35142d749af3c0e8f4fe" dependencies = [ "serde", ] [[package]] name = "flate2" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc5a4e564e38c699f2880d3fda590bedc2e69f3f84cd48b457bd892ce61d0aa9" +checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb" dependencies = [ "crc32fast", "miniz_oxide", @@ -1422,9 +1420,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foldhash" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" [[package]] name = "foreign-types" @@ -1457,8 +1455,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94e7099f6313ecacbe1256e8ff9d617b75d1bcb16a6fddef94866d225a01a14a" dependencies = [ "io-lifetimes", - "rustix 1.0.8", - "windows-sys 0.52.0", + "rustix 1.1.2", + "windows-sys 0.59.0", ] [[package]] @@ -1527,7 +1525,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -1566,7 +1564,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25234f20a3ec0a962a61770cfe39ecf03cb529a6e474ad8cff025ed497eda557" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "debugid", "rustc-hash", "serde", @@ -1576,9 +1574,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.5" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -1586,25 +1584,25 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", ] [[package]] name = "getrandom" -version = "0.3.1" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", "libc", - "wasi 0.13.3+wasi-0.2.2", - "windows-targets 0.52.6", + "r-efi", + "wasip2", ] [[package]] @@ -1614,7 +1612,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" dependencies = [ "fallible-iterator", - "indexmap 2.11.4", + "indexmap 2.12.1", "stable_deref_trait", ] @@ -1625,15 +1623,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" dependencies = [ "fallible-iterator", - "indexmap 2.11.4", + "indexmap 2.12.1", "stable_deref_trait", ] [[package]] name = "glob" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "gzip-header" @@ -1646,17 +1644,17 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.4" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "816ec7294445779408f36fe57bc5b7fc1cf59664059096c65f905c1c61f58069" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" dependencies = [ + "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "futures-util", "http", - "indexmap 2.11.4", + "indexmap 2.12.1", "slab", "tokio", "tokio-util", @@ -1665,18 +1663,13 @@ dependencies = [ [[package]] name = "half" -version = "1.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" - -[[package]] -name = "half" -version = "2.4.1" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" dependencies = [ "cfg-if", "crunchy", + "zerocopy", ] [[package]] @@ -1687,14 +1680,20 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.15.2" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ "foldhash", "serde", ] +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" + [[package]] name = "heck" version = "0.4.1" @@ -1733,12 +1732,11 @@ dependencies = [ [[package]] name = "http" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" dependencies = [ "bytes", - "fnv", "itoa", ] @@ -1773,21 +1771,21 @@ checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" -version = "2.1.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" [[package]] name = "hyper" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" dependencies = [ "atomic-waker", "bytes", @@ -1801,23 +1799,24 @@ dependencies = [ "itoa", "pin-project-lite", "pin-utils", - "smallvec", + "smallvec 1.15.1", "tokio", "want", ] [[package]] name = "iana-time-zone" -version = "0.1.61" +version = "0.1.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" +checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", + "log", "wasm-bindgen", - "windows-core", + "windows-core 0.62.2", ] [[package]] @@ -1831,21 +1830,22 @@ dependencies = [ [[package]] name = "icu_collections" -version = "1.5.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" dependencies = [ "displaydoc", + "potential_utf", "yoke", "zerofrom", "zerovec", ] [[package]] -name = "icu_locid" -version = "1.5.0" +name = "icu_locale_core" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" dependencies = [ "displaydoc", "litemap", @@ -1854,99 +1854,61 @@ dependencies = [ "zerovec", ] -[[package]] -name = "icu_locid_transform" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_locid_transform_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_locid_transform_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" - [[package]] name = "icu_normalizer" -version = "1.5.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" dependencies = [ - "displaydoc", "icu_collections", "icu_normalizer_data", "icu_properties", "icu_provider", - "smallvec", - "utf16_iter", - "utf8_iter", - "write16", + "smallvec 1.15.1", "zerovec", ] [[package]] name = "icu_normalizer_data" -version = "1.5.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" [[package]] name = "icu_properties" -version = "1.5.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" dependencies = [ - "displaydoc", "icu_collections", - "icu_locid_transform", + "icu_locale_core", "icu_properties_data", "icu_provider", - "tinystr", + "zerotrie", "zerovec", ] [[package]] name = "icu_properties_data" -version = "1.5.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" [[package]] name = "icu_provider" -version = "1.5.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" dependencies = [ "displaydoc", - "icu_locid", - "icu_provider_macros", - "stable_deref_trait", - "tinystr", + "icu_locale_core", "writeable", "yoke", "zerofrom", + "zerotrie", "zerovec", ] -[[package]] -name = "icu_provider_macros" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.106", -] - [[package]] name = "id-arena" version = "2.2.1" @@ -1960,15 +1922,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" dependencies = [ "idna_adapter", - "smallvec", + "smallvec 1.15.1", "utf8_iter", ] [[package]] name = "idna_adapter" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" dependencies = [ "icu_normalizer", "icu_properties", @@ -1981,7 +1943,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1955a75fa080c677d3972822ec4bad316169ab1cfc6c257a942c2265dbe5fe" dependencies = [ "bitmaps", - "rand_core 0.6.3", + "rand_core 0.6.4", "rand_xoshiro", "sized-chunks", "typenum", @@ -1990,9 +1952,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.1" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", @@ -2000,30 +1962,30 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.11.4" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5" +checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" dependencies = [ "equivalent", - "hashbrown 0.15.2", + "hashbrown 0.16.1", "serde", "serde_core", ] [[package]] name = "inout" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" dependencies = [ "generic-array", ] [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] @@ -2035,20 +1997,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2285ddfe3054097ef4b2fe909ef8c3bcd1ea52a8f0d274416caebeef39f04a65" dependencies = [ "io-lifetimes", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "io-lifetimes" -version = "2.0.3" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a611371471e98973dbcab4e0ec66c31a10bc356eeb4d54a0e05eac8158fe38c" +checksum = "06432fb54d3be7964ecd3649233cddf80db2832f47fec34c01f65b3d9d774983" [[package]] name = "ipnet" -version = "2.5.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] name = "is-terminal" @@ -2063,16 +2025,16 @@ dependencies = [ [[package]] name = "is_terminal_polyfill" -version = "1.70.1" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "isle-fuzz" version = "0.0.0" dependencies = [ "cranelift-isle", - "env_logger 0.11.5", + "env_logger 0.11.8", "libfuzzer-sys", "log", ] @@ -2083,7 +2045,7 @@ version = "0.0.0" dependencies = [ "clap", "cranelift-isle", - "env_logger 0.11.5", + "env_logger 0.11.8", ] [[package]] @@ -2106,9 +2068,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" +checksum = "7ee5b5339afb4c41626dde77b7a611bd4f2c202b897852b4bcf5d03eddc61010" [[package]] name = "ittapi" @@ -2130,20 +2092,45 @@ dependencies = [ "cc", ] +[[package]] +name = "jiff" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49cce2b81f2098e7e3efc35bc2e0a6b7abec9d34128283d7a26fa8f32a6dbb35" +dependencies = [ + "jiff-static", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", +] + +[[package]] +name = "jiff-static" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "980af8b43c3ad5d8d349ace167ec8170839f753a42d233ba19e08afe1850fa69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + [[package]] name = "jobserver" -version = "0.1.32" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" dependencies = [ + "getrandom 0.3.4", "libc", ] [[package]] name = "js-sys" -version = "0.3.74" +version = "0.3.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705" +checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" dependencies = [ "once_cell", "wasm-bindgen", @@ -2152,8 +2139,7 @@ dependencies = [ [[package]] name = "json-from-wast" version = "0.243.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f47aa6916e07fa82816d3b845e41828be0670f81466ae5ed84a595f8f762d6b" +source = "git+https://github.com/bytecodealliance/wasm-tools#3ab232a61b7d2ffd6051c56a81ee863815d9db78" dependencies = [ "anyhow", "serde", @@ -2163,9 +2149,9 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "leb128" @@ -2181,9 +2167,9 @@ checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" [[package]] name = "libc" -version = "0.2.177" +version = "0.2.178" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" +checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" [[package]] name = "libfuzzer-sys" @@ -2197,12 +2183,12 @@ dependencies = [ [[package]] name = "libloading" -version = "0.8.6" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-link", ] [[package]] @@ -2211,6 +2197,17 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" +[[package]] +name = "libredox" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df15f6eac291ed1cf25865b1ee60399f57e7c227e7f51bdbd4c5270396a9ed50" +dependencies = [ + "bitflags 2.10.0", + "libc", + "redox_syscall", +] + [[package]] name = "libtest-mimic" version = "0.8.1" @@ -2225,21 +2222,21 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "linux-raw-sys" -version = "0.9.4" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" [[package]] name = "listenfd" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14e4fcc00ff6731d94b70e16e71f43bda62883461f31230742e3bc6dddf12988" +checksum = "b87bc54a4629b4294d0b3ef041b64c40c611097a677d9dc07b2c67739fe39dba" dependencies = [ "libc", "uuid", @@ -2248,54 +2245,54 @@ dependencies = [ [[package]] name = "litemap" -version = "0.7.4" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" [[package]] name = "log" -version = "0.4.28" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "logos" -version = "0.14.2" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c6b6e02facda28ca5fb8dbe4b152496ba3b1bd5a4b40bb2b1b2d8ad74e0f39b" +checksum = "7251356ef8cb7aec833ddf598c6cb24d17b689d20b993f9d11a3d764e34e6458" dependencies = [ "logos-derive", ] [[package]] name = "logos-codegen" -version = "0.14.2" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b32eb6b5f26efacd015b000bfc562186472cd9b34bdba3f6b264e2a052676d10" +checksum = "59f80069600c0d66734f5ff52cc42f2dabd6b29d205f333d61fd7832e9e9963f" dependencies = [ "beef", "fnv", "lazy_static", "proc-macro2", "quote", - "regex-syntax 0.8.5", - "syn 2.0.106", + "regex-syntax", + "syn 2.0.111", ] [[package]] name = "logos-derive" -version = "0.14.2" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e5d0c5463c911ef55624739fc353238b4e310f0144be1f875dc42fec6bfd5ec" +checksum = "24fb722b06a9dc12adb0963ed585f19fc61dc5413e6a9be9422ef92c091e731d" dependencies = [ "logos-codegen", ] [[package]] name = "mach2" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" +checksum = "d640282b302c0bb0a2a8e0233ead9035e3bed871f0b7e81fe4a1ec829765db44" dependencies = [ "libc", ] @@ -2306,14 +2303,14 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" dependencies = [ - "regex-automata 0.4.11", + "regex-automata", ] [[package]] name = "matrixmultiply" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9380b911e3e96d10c1f415da0876389aaf1b56759054eeb0de7df940c456ba1a" +checksum = "a06de3016e9fae57a36fd14dba131fccf49f74b40b7fbdb472f96e361ec71a08" dependencies = [ "autocfg", "rawpointer", @@ -2337,7 +2334,7 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad38eb12aea514a0466ea40a80fd8cc83637065948eb4a426e4aa46261175227" dependencies = [ - "rustix 1.0.8", + "rustix 1.1.2", ] [[package]] @@ -2355,7 +2352,7 @@ version = "41.0.0" dependencies = [ "anyhow", "libloading", - "object 0.37.3", + "object", "wasmtime", ] @@ -2377,12 +2374,12 @@ dependencies = [ [[package]] name = "mio" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d83b0086dc8ecf3ce9ae2874b2d1290252e2a30720bea58a5c6639b0092873" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.61.2", ] @@ -2487,15 +2484,6 @@ dependencies = [ "libc", ] -[[package]] -name = "object" -version = "0.36.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" -dependencies = [ - "memchr", -] - [[package]] name = "object" version = "0.37.3" @@ -2503,8 +2491,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" dependencies = [ "crc32fast", - "hashbrown 0.15.2", - "indexmap 2.11.4", + "hashbrown 0.15.5", + "indexmap 2.12.1", "memchr", ] @@ -2539,29 +2527,29 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "once_cell_polyfill" -version = "1.70.1" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] name = "oorandom" -version = "11.1.3" +version = "11.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" [[package]] name = "openssl" -version = "0.10.73" +version = "0.10.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" +checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "cfg-if", "foreign-types", "libc", @@ -2578,7 +2566,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -2589,9 +2577,9 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-sys" -version = "0.9.109" +version = "0.9.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" +checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321" dependencies = [ "cc", "libc", @@ -2601,9 +2589,9 @@ dependencies = [ [[package]] name = "openvino" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3308ec088481c27b5b521598ced2d5d5f67253d9639f5a3cce5a2ea4c4062a94" +checksum = "94957bde49dd820f68c962949115ba8d012c0fe3d604b7722de72b6bf3398724" dependencies = [ "openvino-finder", "openvino-sys", @@ -2611,9 +2599,9 @@ dependencies = [ [[package]] name = "openvino-finder" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bba5393f3522f98d9c4703a6a73afc7feff2bf9cc00a0722957b54c44ecda5fe" +checksum = "cf255f8d09ab4ab7f6fd08326fa5df9f875b57807ee8eb1702ce1a88db7d0390" dependencies = [ "cfg-if", "log", @@ -2621,35 +2609,33 @@ dependencies = [ [[package]] name = "openvino-sys" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da7d035914ff5c8e12d7e05982929fb275e6f06eafcbe529f316001760b08786" +checksum = "1ac8d4a70a99d5afb7091e6c0b7c2b2bb509b6b3322877ccb97d2075553f9c01" dependencies = [ - "env_logger 0.11.5", + "env_logger 0.11.8", "libloading", "openvino-finder", ] [[package]] name = "ort" -version = "2.0.0-rc.2" +version = "2.0.0-rc.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bc80894094c6a875bfac64415ed456fa661081a278a035e22be661305c87e14" +checksum = "1fa7e49bd669d32d7bc2a15ec540a527e7764aec722a45467814005725bcd721" dependencies = [ - "js-sys", "ort-sys", - "thiserror 1.0.65", - "tracing", - "web-sys", + "smallvec 2.0.0-alpha.10", ] [[package]] name = "ort-sys" -version = "2.0.0-rc.2" +version = "2.0.0-rc.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d9c1373fc813d3f024d394f621f4c6dde0734c79b1c17113c3bb5bf0084bbe" +checksum = "e2aba9f5c7c479925205799216e7e5d07cc1d4fa76ea8058c60a9a30f6a4e890" dependencies = [ "flate2", + "pkg-config", "sha2", "tar", "ureq", @@ -2662,15 +2648,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" dependencies = [ "base64ct", - "rand_core 0.6.3", + "rand_core 0.6.4", "subtle", ] [[package]] name = "paste" -version = "1.0.7" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c520e05135d6e763148b6426a837e239041653ba7becd2e538c076c738025fc" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pbkdf2" @@ -2684,6 +2670,15 @@ dependencies = [ "sha2", ] +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + [[package]] name = "percent-encoding" version = "2.3.2" @@ -2697,14 +2692,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.11.4", + "indexmap 2.12.1", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -2714,9 +2709,24 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.29" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "portable-atomic" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f59e70c4aef1e55797c2e8fd94a4f2a973fc972cfde0e0b05f683667b0cd39dd" + +[[package]] +name = "portable-atomic-util" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +dependencies = [ + "portable-atomic", +] [[package]] name = "postcard" @@ -2730,6 +2740,15 @@ dependencies = [ "serde", ] +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -2738,47 +2757,49 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.16" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] [[package]] name = "prettyplease" -version = "0.2.31" +version = "0.2.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5316f57387668042f561aae71480de936257848f9c43ce528e311d89a07cadeb" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] name = "proc-macro2" -version = "1.0.101" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" dependencies = [ "unicode-ident", ] [[package]] name = "proptest" -version = "1.0.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0d9cc07f18492d879586c92b485def06bc850da3118075cd45d50e9c95b0e5" +checksum = "bee689443a2bd0a16ab0348b52ee43e3b2d1b1f931c8aa5c9f8de4c86fbe8c40" dependencies = [ "bit-set", - "bitflags 1.3.2", - "byteorder", - "lazy_static", + "bit-vec", + "bitflags 2.10.0", "num-traits", - "quick-error 2.0.1", - "rand 0.8.5", - "rand_chacha 0.3.1", + "rand 0.9.2", + "rand_chacha 0.9.0", "rand_xorshift", - "regex-syntax 0.6.25", + "regex-syntax", "rusty-fork", "tempfile", + "unarray", ] [[package]] @@ -2789,7 +2810,7 @@ dependencies = [ "arbitrary", "clap", "cranelift-bitset", - "env_logger 0.11.5", + "env_logger 0.11.8", "log", "pulley-macros", "termcolor", @@ -2800,7 +2821,7 @@ dependencies = [ name = "pulley-interpreter-fuzz" version = "0.0.0" dependencies = [ - "env_logger 0.11.5", + "env_logger 0.11.8", "log", "pulley-interpreter", ] @@ -2811,7 +2832,7 @@ version = "41.0.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -2820,21 +2841,21 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" -[[package]] -name = "quick-error" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" - [[package]] name = "quote" -version = "1.0.41" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + [[package]] name = "rand" version = "0.8.5" @@ -2843,7 +2864,7 @@ checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha 0.3.1", - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] @@ -2863,7 +2884,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] @@ -2878,11 +2899,11 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.2.16", ] [[package]] @@ -2891,16 +2912,16 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom 0.3.1", + "getrandom 0.3.4", ] [[package]] name = "rand_xorshift" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +checksum = "513962919efc330f829edb2535844d1b912b0fbe2ca165d613e4e8788bb05a5a" dependencies = [ - "rand_core 0.6.3", + "rand_core 0.9.3", ] [[package]] @@ -2909,16 +2930,16 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" dependencies = [ - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] name = "raw-cpuid" -version = "11.5.0" +version = "11.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6df7ab838ed27997ba19a4664507e6f82b41fe6e20be42929332156e5e85146" +checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", ] [[package]] @@ -2929,21 +2950,19 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.5.3" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" +checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" dependencies = [ - "autocfg", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -2951,22 +2970,22 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.13" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" +checksum = "ec96166dafa0886eb81fe1c0a388bece180fbef2135f97c1e2cf8302e74b43b5" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.10.0", ] [[package]] name = "redox_users" -version = "0.4.3" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom 0.2.15", - "redox_syscall", - "thiserror 1.0.65", + "getrandom 0.2.16", + "libredox", + "thiserror 1.0.69", ] [[package]] @@ -2977,45 +2996,34 @@ checksum = "4e249c660440317032a71ddac302f25f1d5dff387667bcc3978d1f77aa31ac34" dependencies = [ "allocator-api2", "bumpalo", - "hashbrown 0.15.2", + "hashbrown 0.15.5", "log", "rustc-hash", "serde", - "smallvec", + "smallvec 1.15.1", ] [[package]] name = "regex" -version = "1.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.3.3", - "regex-syntax 0.7.4", -] - -[[package]] -name = "regex-automata" -version = "0.3.3" +version = "1.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.4", + "regex-automata", + "regex-syntax", ] [[package]] name = "regex-automata" -version = "0.4.11" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "833eb9ce86d40ef33cb1306d8accf7bc8ec2bfea4355cbdebb3df68b40925cad" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.5", + "regex-syntax", ] [[package]] @@ -3027,21 +3035,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" - -[[package]] -name = "regex-syntax" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" - -[[package]] -name = "regex-syntax" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" [[package]] name = "regex-test" @@ -3070,7 +3066,7 @@ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.15", + "getrandom 0.2.16", "libc", "untrusted", "windows-sys 0.52.0", @@ -3078,9 +3074,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustc-hash" @@ -3090,28 +3086,28 @@ checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "rustix" -version = "0.38.43" +version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "errno", "libc", - "linux-raw-sys 0.4.14", - "windows-sys 0.52.0", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", ] [[package]] name = "rustix" -version = "1.0.8" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" +checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "errno", "libc", - "linux-raw-sys 0.9.4", - "windows-sys 0.60.2", + "linux-raw-sys 0.11.0", + "windows-sys 0.61.2", ] [[package]] @@ -3121,7 +3117,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fc84bf7e9aa16c4f2c758f27412dc9841341e16aa682d9c7ac308fe3ee12056" dependencies = [ "once_cell", - "rustix 1.0.8", + "rustix 1.1.2", ] [[package]] @@ -3139,31 +3135,19 @@ dependencies = [ ] [[package]] -name = "rustls" -version = "0.23.7" +name = "rustls-pki-types" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebbbdb961df0ad3f2652da8f3fdc4b36122f568f968f45ad3316f26c025c677b" +checksum = "21e6f2ab2928ca4291b86736a8bd920a277a399bba1589409d72154ff87c1282" dependencies = [ - "log", - "once_cell", - "ring", - "rustls-pki-types", - "rustls-webpki", - "subtle", "zeroize", ] -[[package]] -name = "rustls-pki-types" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ede67b28608b4c60685c7d54122d4400d90f62b40caee7700e700380a390fa8" - [[package]] name = "rustls-webpki" -version = "0.102.2" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring", "rustls-pki-types", @@ -3172,27 +3156,27 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "rusty-fork" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +checksum = "cc6bf79ff24e648f6da1f8d1f011e9cac26491b619e6b9280f2b47f1774e6ee2" dependencies = [ "fnv", - "quick-error 1.2.3", + "quick-error", "tempfile", "wait-timeout", ] [[package]] name = "ryu" -version = "1.0.9" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +checksum = "62049b2877bf12821e8f9ad256ee38fdc31db7387ec2d3b3f403024de2034aea" [[package]] name = "safetensors" @@ -3228,7 +3212,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "core-foundation", "core-foundation-sys", "libc", @@ -3237,9 +3221,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.14.0" +version = "2.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" dependencies = [ "core-foundation-sys", "libc", @@ -3282,26 +3266,27 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.146" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "217ca874ae0207aac254aa02c957ded05585a90892cc8d87f9e5fa49669dadd8" dependencies = [ "itoa", "memchr", "ryu", "serde", + "serde_core", ] [[package]] name = "serde_spanned" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e24345aa0fe688594e73770a5f6d1b216508b4f93484c0026d521acd30134392" +checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" dependencies = [ "serde_core", ] @@ -3312,7 +3297,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.11.4", + "indexmap 2.12.1", "itoa", "ryu", "serde", @@ -3332,9 +3317,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.2" +version = "0.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", "cpufeatures", @@ -3343,9 +3328,9 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] @@ -3370,18 +3355,18 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "7664a098b8e616bdfcc2dc0e9ac44eb231eedf41db4e9fe95d8d32ec728dedad" dependencies = [ "libc", ] [[package]] name = "simd-adler32" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" +checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" [[package]] name = "similar" @@ -3414,6 +3399,12 @@ dependencies = [ "serde", ] +[[package]] +name = "smallvec" +version = "2.0.0-alpha.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d44cfb396c3caf6fbfd0ab422af02631b69ddd96d2eff0b0f0724f9024051b" + [[package]] name = "socket2" version = "0.6.1" @@ -3424,6 +3415,17 @@ dependencies = [ "windows-sys 0.60.2", ] +[[package]] +name = "socks" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c3dbbd9ae980613c6dd8e28a9407b50509d3803b57624d5dfe8315218cd58b" +dependencies = [ + "byteorder", + "libc", + "winapi", +] + [[package]] name = "souper-ir" version = "2.1.0" @@ -3441,9 +3443,9 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "stable_deref_trait" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "static_assertions" @@ -3457,7 +3459,7 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23de088478b31c349c9ba67816fa55d9355232d63c3afea8bf513e31f0f1d2c0" dependencies = [ - "hashbrown 0.15.2", + "hashbrown 0.15.5", "serde", ] @@ -3483,14 +3485,14 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 1.0.92", + "syn 1.0.109", ] [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "symbolic_expressions" @@ -3500,20 +3502,20 @@ checksum = "7c68d531d83ec6c531150584c42a4290911964d5f0d79132b193b67252a23b71" [[package]] name = "syn" -version = "1.0.92" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff7c592601f11445996a06f8ad0c27f094a58857c2f89e97974ab9235b92c52" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] [[package]] name = "syn" -version = "2.0.106" +version = "2.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" dependencies = [ "proc-macro2", "quote", @@ -3522,13 +3524,13 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3537,21 +3539,21 @@ version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc4592f674ce18521c2a81483873a49596655b179f71c5e05d10c1fe66c78745" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "cap-fs-ext", "cap-std", "fd-lock", "io-lifetimes", - "rustix 0.38.43", - "windows-sys 0.52.0", + "rustix 0.38.44", + "windows-sys 0.59.0", "winx", ] [[package]] name = "tar" -version = "0.4.41" +version = "0.4.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" +checksum = "1d863878d212c87a19c1a610eb53bb01fe12951c0501cf5a0d65f724914a667a" dependencies = [ "filetime", "libc", @@ -3560,9 +3562,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.13.0" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ff4a4048091358129767b8a200d6927f58876c8b5ea16fb7b0222d43b79bfa8" +checksum = "b1dd07eb858a2067e2f3c7155d54e929265c264e6f37efe3ee7a8d1b5a1dd0ba" [[package]] name = "tch" @@ -3570,13 +3572,13 @@ version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3585f5bbf1ddf2498d7586bf870c7bb785a0bf1be09c54d0f93fce51d5f3c7fc" dependencies = [ - "half 2.4.1", + "half", "lazy_static", "libc", "ndarray", "rand 0.8.5", "safetensors", - "thiserror 1.0.65", + "thiserror 1.0.69", "torch-sys", "zip", ] @@ -3588,9 +3590,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" dependencies = [ "fastrand", - "getrandom 0.3.1", + "getrandom 0.3.4", "once_cell", - "rustix 1.0.8", + "rustix 1.1.2", "windows-sys 0.61.2", ] @@ -3609,15 +3611,15 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60b8cb979cb11c32ce1603f8137b22262a9d131aaa5c37b5678025f22b8becd0" dependencies = [ - "rustix 1.0.8", + "rustix 1.1.2", "windows-sys 0.60.2", ] [[package]] name = "test-log" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e33b98a582ea0be1168eba097538ee8dd4bbe0f2b01b22ac92ea30054e5be7b" +checksum = "37d53ac171c92a39e4769491c4b4dde7022c60042254b5fc044ae409d34a24d4" dependencies = [ "test-log-macros", "tracing-subscriber", @@ -3625,13 +3627,13 @@ dependencies = [ [[package]] name = "test-log-macros" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "451b374529930d7601b1eef8d32bc79ae870b6079b069401709c2a8bf9e75f36" +checksum = "be35209fd0781c5401458ab66e4f98accf63553e8fae7425503e92fdd319783b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3640,7 +3642,7 @@ version = "0.0.0" dependencies = [ "anyhow", "base64", - "env_logger 0.11.5", + "env_logger 0.11.8", "flate2", "futures", "libc", @@ -3666,16 +3668,16 @@ dependencies = [ "wasmtime", "wasmtime-test-util", "wat", - "wit-component", + "wit-component 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", ] [[package]] name = "thiserror" -version = "1.0.65" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl 1.0.65", + "thiserror-impl 1.0.69", ] [[package]] @@ -3689,13 +3691,13 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "1.0.65" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3706,23 +3708,23 @@ checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] name = "thread_local" -version = "1.1.4" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" dependencies = [ - "once_cell", + "cfg-if", ] [[package]] name = "time" -version = "0.3.36" +version = "0.3.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" dependencies = [ "deranged", "num-conv", @@ -3733,15 +3735,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.2" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" [[package]] name = "tinystr" -version = "0.7.6" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" dependencies = [ "displaydoc", "zerovec", @@ -3781,7 +3783,7 @@ checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3800,16 +3802,16 @@ version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" dependencies = [ - "rustls 0.22.4", + "rustls", "rustls-pki-types", "tokio", ] [[package]] name = "tokio-util" -version = "0.7.16" +version = "0.7.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" +checksum = "2efa149fe76073d6e8fd97ef4f4eca7b67f599660115591483572e406e165594" dependencies = [ "bytes", "futures-core", @@ -3820,11 +3822,11 @@ dependencies = [ [[package]] name = "toml" -version = "0.9.8" +version = "0.9.10+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dc8b1fb61449e27716ec0e1bdf0f6b8f3e8f6b05391e8497b8b6d7804ea6d8" +checksum = "0825052159284a1a8b4d6c0c86cbc801f2da5afd2b225fa548c72f2e74002f48" dependencies = [ - "indexmap 2.11.4", + "indexmap 2.12.1", "serde_core", "serde_spanned", "toml_datetime", @@ -3835,27 +3837,27 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.7.3" +version = "0.7.5+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" dependencies = [ "serde_core", ] [[package]] name = "toml_parser" -version = "1.0.4" +version = "1.0.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" +checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" dependencies = [ "winnow", ] [[package]] name = "toml_writer" -version = "1.0.4" +version = "1.0.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df8b2b54733674ad286d16267dcfc7a71ed5c776e4ac7aa3c3e2561f7c637bf2" +checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" [[package]] name = "torch-sys" @@ -3871,9 +3873,9 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.41" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ "log", "pin-project-lite", @@ -3883,20 +3885,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] name = "tracing-core" -version = "0.1.34" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ "once_cell", "valuable", @@ -3915,14 +3917,14 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.20" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" +checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" dependencies = [ "matchers", "nu-ansi-term", "once_cell", - "regex-automata 0.4.11", + "regex-automata", "sharded-slab", "thread_local", "tracing", @@ -3932,15 +3934,15 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typenum" -version = "1.15.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" [[package]] name = "uap-bench" @@ -3951,35 +3953,41 @@ dependencies = [ "serde_yaml", ] +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + [[package]] name = "unicode-ident" -version = "1.0.19" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.1.9" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode-width" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" [[package]] name = "unicode-xid" -version = "0.2.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "unsafe-libyaml" @@ -3995,17 +4003,32 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "2.10.0" +version = "3.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72139d247e5f97a3eff96229a7ae85ead5328a39efe76f8bf5a06313d505b6ea" +checksum = "d39cb1dbab692d82a977c0392ffac19e188bd9186a9f32806f0aaa859d75585a" dependencies = [ "base64", + "der", "log", - "once_cell", - "rustls 0.23.7", + "native-tls", + "percent-encoding", "rustls-pki-types", - "url", - "webpki-roots", + "socks", + "ureq-proto", + "utf-8", + "webpki-root-certs", +] + +[[package]] +name = "ureq-proto" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d81f9efa9df032be5934a46a068815a10a042b494b6a58cb0a1a97bb5467ed6f" +dependencies = [ + "base64", + "http", + "httparse", + "log", ] [[package]] @@ -4021,10 +4044,10 @@ dependencies = [ ] [[package]] -name = "utf16_iter" -version = "1.0.5" +name = "utf-8" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "utf8_iter" @@ -4040,9 +4063,13 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.0.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfcd319456c4d6ea10087ed423473267e1a071f3bc0aa89f80d60997843c6f0" +checksum = "e2e054861b4bd027cd373e18e8d8d8e6548085000e41290d95ce0c373a654b4a" +dependencies = [ + "js-sys", + "wasm-bindgen", +] [[package]] name = "v8" @@ -4051,7 +4078,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a33ccf9cc537275d7bb848e94f160986164e2ea5138e60166551d115c7ea8f1a" dependencies = [ "bindgen", - "bitflags 2.9.4", + "bitflags 2.10.0", "fslock", "gzip-header", "home", @@ -4062,9 +4089,9 @@ dependencies = [ [[package]] name = "valuable" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] name = "vcpkg" @@ -4082,7 +4109,7 @@ dependencies = [ "cranelift-codegen-meta", "cranelift-isle", "easy-smt", - "env_logger 0.11.5", + "env_logger 0.11.8", "itertools 0.14.0", "log", "strum", @@ -4099,21 +4126,21 @@ name = "verify-component-adapter" version = "41.0.0" dependencies = [ "anyhow", - "wasmparser 0.243.0", + "wasmparser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", "wat", ] [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wait-timeout" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11" dependencies = [ "libc", ] @@ -4130,28 +4157,18 @@ dependencies = [ [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasi" -version = "0.13.3+wasi-0.2.2" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" -dependencies = [ - "wit-bindgen-rt", -] +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi-common" @@ -4159,7 +4176,7 @@ version = "41.0.0" dependencies = [ "anyhow", "async-trait", - "bitflags 2.9.4", + "bitflags 2.10.0", "cap-fs-ext", "cap-rand", "cap-std", @@ -4169,7 +4186,7 @@ dependencies = [ "io-lifetimes", "libc", "log", - "rustix 1.0.8", + "rustix 1.1.2", "system-interface", "tempfile", "test-log", @@ -4190,18 +4207,18 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7031683cc05a71515d9200fb159b28d717ded3c40dbb979d1602cf46f3a68f40" dependencies = [ - "thiserror 1.0.65", + "thiserror 1.0.69", ] [[package]] name = "wasi-preview1-component-adapter" version = "41.0.0" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "byte-array-literals", - "object 0.37.3", + "object", "wasip1", - "wasm-encoder", + "wasm-encoder 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", "wit-bindgen-rust-macro", ] @@ -4213,44 +4230,31 @@ checksum = "b5e26842486624357dbeb8f0381cf1fb42f022291fd787d4a816768fec8cc760" [[package]] name = "wasip2" -version = "1.0.0+wasi-0.2.4" +version = "1.0.1+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03fa2761397e5bd52002cd7e73110c71af2109aca4e521a9f40473fe685b0a24" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" dependencies = [ - "wit-bindgen 0.45.1", + "wit-bindgen 0.46.0", ] [[package]] name = "wasm-bindgen" -version = "0.2.97" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c" +checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.97" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.106", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.97" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051" +checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4258,41 +4262,43 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.97" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d" +checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" dependencies = [ + "bumpalo", "proc-macro2", "quote", - "syn 2.0.106", - "wasm-bindgen-backend", + "syn 2.0.111", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.97" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49" +checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" +dependencies = [ + "unicode-ident", +] [[package]] name = "wasm-compose" version = "0.243.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af801b6f36459023eaec63fdbaedad2fd5a4ab7dc74ecc110a8b5d375c5775e4" +source = "git+https://github.com/bytecodealliance/wasm-tools#3ab232a61b7d2ffd6051c56a81ee863815d9db78" dependencies = [ "anyhow", "heck 0.5.0", "im-rc", - "indexmap 2.11.4", + "indexmap 2.12.1", "log", "petgraph", "serde", "serde_derive", "serde_yaml", - "smallvec", - "wasm-encoder", - "wasmparser 0.243.0", + "smallvec 1.15.1", + "wasm-encoder 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", + "wasmparser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", "wat", ] @@ -4303,7 +4309,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c55db9c896d70bd9fa535ce83cd4e1f2ec3726b0edd2142079f594fc3be1cb35" dependencies = [ "leb128fmt", - "wasmparser 0.243.0", + "wasmparser 0.243.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-encoder" +version = "0.243.0" +source = "git+https://github.com/bytecodealliance/wasm-tools#3ab232a61b7d2ffd6051c56a81ee863815d9db78" +dependencies = [ + "leb128fmt", + "wasmparser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", ] [[package]] @@ -4313,37 +4328,46 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae05bf9579f45a62e8d0a4e3f52eaa8da518883ac5afa482ec8256c329ecd56" dependencies = [ "anyhow", - "indexmap 2.11.4", - "wasm-encoder", - "wasmparser 0.243.0", + "indexmap 2.12.1", + "wasm-encoder 0.243.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmparser 0.243.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-metadata" +version = "0.243.0" +source = "git+https://github.com/bytecodealliance/wasm-tools#3ab232a61b7d2ffd6051c56a81ee863815d9db78" +dependencies = [ + "anyhow", + "indexmap 2.12.1", + "wasm-encoder 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", + "wasmparser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", ] [[package]] name = "wasm-mutate" version = "0.243.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56c94870d1398b2f01e7cd7c44efd9f557e9baaf306f0d246b6b9c862c22b8a" +source = "git+https://github.com/bytecodealliance/wasm-tools#3ab232a61b7d2ffd6051c56a81ee863815d9db78" dependencies = [ "egg", "log", "rand 0.9.2", "thiserror 2.0.17", - "wasm-encoder", - "wasmparser 0.243.0", + "wasm-encoder 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", + "wasmparser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", ] [[package]] name = "wasm-smith" version = "0.243.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "119b7dd7690868543d344025ee894271d9c66fa00d5c1cd233a5c72eb7a2ea03" +source = "git+https://github.com/bytecodealliance/wasm-tools#3ab232a61b7d2ffd6051c56a81ee863815d9db78" dependencies = [ "anyhow", "arbitrary", "flagset", "serde", "serde_derive", - "wasm-encoder", + "wasm-encoder 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", "wat", ] @@ -4358,20 +4382,18 @@ dependencies = [ [[package]] name = "wasm-wave" version = "0.243.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bd23c879ec35d708f4eff3456f33c415d113363a2e38420098bf42976bacb31" +source = "git+https://github.com/bytecodealliance/wasm-tools#3ab232a61b7d2ffd6051c56a81ee863815d9db78" dependencies = [ - "indexmap 2.11.4", "logos", "thiserror 2.0.17", - "wit-parser", + "wit-parser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", ] [[package]] name = "wasmi" -version = "0.51.1" +version = "0.51.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4f6b71d5cb04a4615b9a8a2e522ba284c491ad847afd9e905d89be15e3efc0" +checksum = "bb321403ce594274827657a908e13d1d9918aa02257b8bf8391949d9764023ff" dependencies = [ "spin", "wasmi_collections", @@ -4382,27 +4404,27 @@ dependencies = [ [[package]] name = "wasmi_collections" -version = "0.51.1" +version = "0.51.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a4a11fa090c4d742e5a77dbbc8efbbe1aa151db7335ca6850232e6cafbb1023" +checksum = "e9b8e98e45a2a534489f8225e765cbf1cb9a3078072605e58158910cf4749172" dependencies = [ "string-interner", ] [[package]] name = "wasmi_core" -version = "0.51.1" +version = "0.51.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3e422fc1f4df78c9ded6ed48c4ca6d1f55f4609f04c99962fc07532e4db61d" +checksum = "c25f375c0cdf14810eab07f532f61f14d4966f09c747a55067fdf3196e8512e6" dependencies = [ "libm", ] [[package]] name = "wasmi_ir" -version = "0.51.1" +version = "0.51.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13fe9f9f1747ec81644e764c4dc798f063f5d54a495f0a3b4a375bce9af65399" +checksum = "624e2a68a4293ecb8f564260b68394b29cf3b3edba6bce35532889a2cb33c3d9" dependencies = [ "wasmi_core", ] @@ -4413,8 +4435,8 @@ version = "0.228.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4abf1132c1fdf747d56bbc1bb52152400c70f336870f968b85e89ea422198ae3" dependencies = [ - "bitflags 2.9.4", - "indexmap 2.11.4", + "bitflags 2.10.0", + "indexmap 2.12.1", ] [[package]] @@ -4423,9 +4445,20 @@ version = "0.243.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6d8db401b0528ec316dfbe579e6ab4152d61739cfe076706d2009127970159d" dependencies = [ - "bitflags 2.9.4", - "hashbrown 0.15.2", - "indexmap 2.11.4", + "bitflags 2.10.0", + "hashbrown 0.15.5", + "indexmap 2.12.1", + "semver", +] + +[[package]] +name = "wasmparser" +version = "0.243.0" +source = "git+https://github.com/bytecodealliance/wasm-tools#3ab232a61b7d2ffd6051c56a81ee863815d9db78" +dependencies = [ + "bitflags 2.10.0", + "hashbrown 0.15.5", + "indexmap 2.12.1", "semver", "serde", ] @@ -4433,60 +4466,59 @@ dependencies = [ [[package]] name = "wasmprinter" version = "0.243.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb2b6035559e146114c29a909a3232928ee488d6507a1504d8934e8607b36d7b" +source = "git+https://github.com/bytecodealliance/wasm-tools#3ab232a61b7d2ffd6051c56a81ee863815d9db78" dependencies = [ "anyhow", "termcolor", - "wasmparser 0.243.0", + "wasmparser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", ] [[package]] name = "wasmtime" version = "41.0.0" dependencies = [ - "addr2line 0.25.1", + "addr2line", "anyhow", "async-trait", - "bitflags 2.9.4", + "bitflags 2.10.0", "bumpalo", "bytes", "cc", "cfg-if", "cranelift-native", "encoding_rs", - "env_logger 0.11.5", + "env_logger 0.11.8", "futures", "fxprof-processed-profile", "gimli 0.32.3", - "hashbrown 0.15.2", - "indexmap 2.11.4", + "hashbrown 0.15.5", + "indexmap 2.12.1", "ittapi", "libc", "libtest-mimic", "log", "mach2", "memfd", - "object 0.37.3", + "object", "once_cell", "postcard", "proptest", "pulley-interpreter", "rand 0.9.2", "rayon", - "rustix 1.0.8", + "rustix 1.1.2", "semver", "serde", "serde_derive", "serde_json", - "smallvec", + "smallvec 1.15.1", "target-lexicon", "tempfile", "tokio", "wasm-compose", - "wasm-encoder", + "wasm-encoder 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", "wasm-wave", - "wasmparser 0.243.0", + "wasmparser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", "wasmtime-environ", "wasmtime-internal-cache", "wasmtime-internal-component-macro", @@ -4537,7 +4569,7 @@ dependencies = [ "async-trait", "bytes", "cap-std", - "env_logger 0.11.5", + "env_logger 0.11.8", "futures", "log", "tokio", @@ -4567,7 +4599,7 @@ dependencies = [ "cranelift-native", "cranelift-reader", "criterion", - "env_logger 0.11.5", + "env_logger 0.11.8", "filecheck", "futures", "gimli 0.32.3", @@ -4580,15 +4612,15 @@ dependencies = [ "log", "memchr", "num_cpus", - "object 0.37.3", + "object", "pulley-interpreter", "rayon", - "rustix 1.0.8", + "rustix 1.1.2", "serde", "serde_derive", "serde_json", "similar", - "smallvec", + "smallvec 1.15.1", "target-lexicon", "tempfile", "termcolor", @@ -4598,8 +4630,8 @@ dependencies = [ "tracing", "walkdir", "wasi-common", - "wasm-encoder", - "wasmparser 0.243.0", + "wasm-encoder 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", + "wasmparser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", "wasmtime", "wasmtime-cli-flags", "wasmtime-environ", @@ -4622,7 +4654,7 @@ dependencies = [ "wast 243.0.0", "wat", "windows-sys 0.61.2", - "wit-component", + "wit-component 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", ] [[package]] @@ -4651,20 +4683,20 @@ dependencies = [ "cpp_demangle", "cranelift-bitset", "cranelift-entity", - "env_logger 0.11.5", + "env_logger 0.11.8", "gimli 0.32.3", - "indexmap 2.11.4", + "indexmap 2.12.1", "log", - "object 0.37.3", + "object", "postcard", "rustc-demangle", "semver", "serde", "serde_derive", - "smallvec", + "smallvec 1.15.1", "target-lexicon", - "wasm-encoder", - "wasmparser 0.243.0", + "wasm-encoder 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", + "wasmparser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", "wasmprinter", "wasmtime-internal-component-util", "wat", @@ -4675,9 +4707,9 @@ name = "wasmtime-environ-fuzz" version = "0.0.0" dependencies = [ "arbitrary", - "env_logger 0.11.5", + "env_logger 0.11.8", "libfuzzer-sys", - "wasmparser 0.243.0", + "wasmparser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", "wasmprinter", "wasmtime-environ", "wasmtime-test-util", @@ -4698,7 +4730,7 @@ dependencies = [ "cranelift-interpreter", "cranelift-native", "cranelift-reader", - "env_logger 0.11.5", + "env_logger 0.11.8", "libfuzzer-sys", "log", "mutatis", @@ -4708,9 +4740,9 @@ dependencies = [ "quote", "rand 0.8.5", "rand 0.9.2", - "smallvec", + "smallvec 1.15.1", "target-lexicon", - "wasmparser 0.243.0", + "wasmparser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", "wasmtime", "wasmtime-fuzzing", "wasmtime-test-util", @@ -4723,27 +4755,27 @@ dependencies = [ "anyhow", "arbitrary", "backtrace", - "env_logger 0.11.5", + "env_logger 0.11.8", "futures", - "indexmap 2.11.4", + "indexmap 2.12.1", "log", "mutatis", "rand 0.8.5", "rayon", "serde", "serde_json", - "smallvec", + "smallvec 1.15.1", "target-lexicon", "tempfile", "test-programs-artifacts", "v8", "wasm-compose", - "wasm-encoder", + "wasm-encoder 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", "wasm-mutate", "wasm-smith", "wasm-spec-interpreter", "wasmi", - "wasmparser 0.243.0", + "wasmparser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", "wasmprinter", "wasmtime", "wasmtime-cli-flags", @@ -4769,18 +4801,18 @@ dependencies = [ "anyhow", "base64", "directories-next", - "env_logger 0.11.5", + "env_logger 0.11.8", "filetime", "log", "postcard", - "rustix 1.0.8", + "rustix 1.1.2", "serde", "serde_derive", "sha2", "tempfile", "toml", "windows-sys 0.61.2", - "zstd 0.13.0", + "zstd 0.13.3", ] [[package]] @@ -4795,12 +4827,12 @@ dependencies = [ "serde", "serde_json", "similar", - "syn 2.0.106", + "syn 2.0.111", "tracing", "wasmtime", "wasmtime-internal-component-util", "wasmtime-internal-wit-bindgen", - "wit-parser", + "wit-parser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", ] [[package]] @@ -4820,12 +4852,12 @@ dependencies = [ "gimli 0.32.3", "itertools 0.14.0", "log", - "object 0.37.3", + "object", "pulley-interpreter", - "smallvec", + "smallvec 1.15.1", "target-lexicon", "thiserror 2.0.17", - "wasmparser 0.243.0", + "wasmparser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", "wasmtime-environ", "wasmtime-internal-math", "wasmtime-internal-unwinder", @@ -4862,7 +4894,7 @@ dependencies = [ "cc", "cfg-if", "libc", - "rustix 1.0.8", + "rustix 1.1.2", "wasmtime-environ", "wasmtime-internal-versioned-export-macros", "windows-sys 0.61.2", @@ -4873,8 +4905,8 @@ name = "wasmtime-internal-jit-debug" version = "41.0.0" dependencies = [ "cc", - "object 0.37.3", - "rustix 1.0.8", + "object", + "rustix 1.1.2", "wasmtime-internal-versioned-export-macros", ] @@ -4907,7 +4939,7 @@ dependencies = [ "cfg-if", "cranelift-codegen", "log", - "object 0.37.3", + "object", ] [[package]] @@ -4916,7 +4948,7 @@ version = "41.0.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -4926,9 +4958,9 @@ dependencies = [ "cranelift-codegen", "gimli 0.32.3", "log", - "object 0.37.3", + "object", "target-lexicon", - "wasmparser 0.243.0", + "wasmparser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", "wasmtime-environ", "wasmtime-internal-cranelift", "winch-codegen", @@ -4939,10 +4971,10 @@ name = "wasmtime-internal-wit-bindgen" version = "41.0.0" dependencies = [ "anyhow", - "bitflags 2.9.4", + "bitflags 2.10.0", "heck 0.5.0", - "indexmap 2.11.4", - "wit-parser", + "indexmap 2.12.1", + "wit-parser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", ] [[package]] @@ -4956,7 +4988,7 @@ dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", "wasmtime-test-util", ] @@ -4967,8 +4999,8 @@ dependencies = [ "anyhow", "arbitrary", "arbtest", - "env_logger 0.11.5", - "indexmap 2.11.4", + "env_logger 0.11.8", + "indexmap 2.12.1", "proc-macro2", "quote", "rand 0.9.2", @@ -4976,7 +5008,7 @@ dependencies = [ "serde_derive", "target-lexicon", "toml", - "wasmparser 0.243.0", + "wasmparser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", "wasmprinter", "wasmtime", "wasmtime-environ", @@ -4990,19 +5022,19 @@ version = "41.0.0" dependencies = [ "anyhow", "async-trait", - "bitflags 2.9.4", + "bitflags 2.10.0", "bytes", "cap-fs-ext", "cap-net-ext", "cap-rand", "cap-std", "cap-time-ext", - "env_logger 0.11.5", + "env_logger 0.11.8", "fs-set-times", "futures", "io-extras", "io-lifetimes", - "rustix 1.0.8", + "rustix 1.1.2", "system-interface", "tempfile", "test-log", @@ -5038,14 +5070,14 @@ dependencies = [ "async-trait", "base64", "bytes", - "env_logger 0.11.5", + "env_logger 0.11.8", "flate2", "futures", "http", "http-body", "http-body-util", "hyper", - "rustls 0.22.4", + "rustls", "sha2", "tempfile", "test-log", @@ -5059,7 +5091,7 @@ dependencies = [ "wasmtime", "wasmtime-wasi", "wasmtime-wasi-io", - "webpki-roots", + "webpki-roots 0.26.11", ] [[package]] @@ -5124,13 +5156,13 @@ dependencies = [ "anyhow", "bytes", "futures", - "rustls 0.22.4", + "rustls", "test-programs-artifacts", "tokio", "tokio-rustls", "wasmtime", "wasmtime-wasi", - "webpki-roots", + "webpki-roots 0.26.11", ] [[package]] @@ -5155,10 +5187,10 @@ dependencies = [ "anyhow", "json-from-wast", "log", - "object 0.37.3", + "object", "serde_json", "tokio", - "wasmparser 0.243.0", + "wasmparser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", "wasmtime", "wast 243.0.0", ] @@ -5170,12 +5202,12 @@ dependencies = [ "anyhow", "clap", "criterion", - "env_logger 0.11.5", + "env_logger 0.11.8", "log", "rayon", "tokio", - "wasm-encoder", - "wasmparser 0.243.0", + "wasm-encoder 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", + "wasmparser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", "wasmprinter", "wasmtime", "wasmtime-wasi", @@ -5194,41 +5226,47 @@ dependencies = [ [[package]] name = "wast" version = "243.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df21d01c2d91e46cb7a221d79e58a2d210ea02020d57c092e79255cc2999ca7f" +source = "git+https://github.com/bytecodealliance/wasm-tools#3ab232a61b7d2ffd6051c56a81ee863815d9db78" dependencies = [ "bumpalo", "gimli 0.31.1", "leb128fmt", "memchr", - "unicode-width 0.2.0", - "wasm-encoder", + "unicode-width 0.2.2", + "wasm-encoder 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", ] [[package]] name = "wat" version = "1.243.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226a9a91cd80a50449312fef0c75c23478fcecfcc4092bdebe1dc8e760ef521b" +source = "git+https://github.com/bytecodealliance/wasm-tools#3ab232a61b7d2ffd6051c56a81ee863815d9db78" dependencies = [ "wast 243.0.0", ] [[package]] -name = "web-sys" -version = "0.3.57" +name = "webpki-root-certs" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b17e741662c70c8bd24ac5c5b18de314a2c26c32bf8346ee1e6f53de919c283" +checksum = "ee3e3b5f5e80bc89f30ce8d0343bf4e5f12341c51f3e26cbeecbc7c85443e85b" dependencies = [ - "js-sys", - "wasm-bindgen", + "rustls-pki-types", ] [[package]] name = "webpki-roots" -version = "0.26.1" +version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" +checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" +dependencies = [ + "webpki-roots 1.0.4", +] + +[[package]] +name = "webpki-roots" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2878ef029c47c6e8cf779119f20fcf52bde7ad42a731b2a304bc221df17571e" dependencies = [ "rustls-pki-types", ] @@ -5241,7 +5279,7 @@ checksum = "b4ee928febd44d98f2f459a4a79bd4d928591333a494a10a868418ac1b39cf1f" dependencies = [ "either", "home", - "rustix 0.38.43", + "rustix 0.38.44", "winsafe", ] @@ -5250,7 +5288,7 @@ name = "wiggle" version = "41.0.0" dependencies = [ "anyhow", - "bitflags 2.9.4", + "bitflags 2.10.0", "proptest", "thiserror 2.0.17", "tokio", @@ -5269,7 +5307,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", "witx", ] @@ -5279,7 +5317,7 @@ version = "41.0.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", "wiggle", "wiggle-generate", ] @@ -5289,7 +5327,7 @@ name = "wiggle-test" version = "0.0.0" dependencies = [ "anyhow", - "env_logger 0.11.5", + "env_logger 0.11.8", "proptest", "thiserror 2.0.17", "tracing", @@ -5315,11 +5353,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "winapi", + "windows-sys 0.61.2", ] [[package]] @@ -5337,10 +5375,10 @@ dependencies = [ "cranelift-codegen", "gimli 0.32.3", "regalloc2", - "smallvec", + "smallvec 1.15.1", "target-lexicon", "thiserror 2.0.17", - "wasmparser 0.243.0", + "wasmparser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", "wasmtime-environ", "wasmtime-internal-cranelift", "wasmtime-internal-math", @@ -5352,9 +5390,9 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ - "windows-core", - "windows-implement", - "windows-interface", + "windows-core 0.52.0", + "windows-implement 0.52.0", + "windows-interface 0.52.0", "windows-targets 0.52.6", ] @@ -5367,6 +5405,19 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement 0.60.2", + "windows-interface 0.59.3", + "windows-link", + "windows-result", + "windows-strings", +] + [[package]] name = "windows-implement" version = "0.52.0" @@ -5375,7 +5426,18 @@ checksum = "12168c33176773b86799be25e2a2ba07c7aab9968b37541f1094dbd7a60c8946" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", ] [[package]] @@ -5386,7 +5448,18 @@ checksum = "9d8dc32e0095a7eeccebd0e3f09e9509365ecb3fc6ac4d6f5f14a3f6392942d1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", ] [[package]] @@ -5395,6 +5468,24 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + [[package]] name = "windows-sys" version = "0.52.0" @@ -5404,6 +5495,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.60.2" @@ -5553,9 +5653,9 @@ checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" [[package]] name = "winnow" -version = "0.7.13" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" +checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" [[package]] name = "winsafe" @@ -5569,17 +5669,17 @@ version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f3fd376f71958b862e7afb20cfe5a22830e1963462f3a17f49d82a6c1d1f42d" dependencies = [ - "bitflags 2.9.4", - "windows-sys 0.52.0", + "bitflags 2.10.0", + "windows-sys 0.59.0", ] [[package]] name = "wit-bindgen" -version = "0.45.1" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c573471f125075647d03df72e026074b7203790d41351cd6edc96f46bcccd36" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", ] [[package]] @@ -5588,7 +5688,7 @@ version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3f72f96146c1e2648232350c3c59efe5a17738767f72efdc5e766b9e4a8c896" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "futures", "wit-bindgen-rust-macro", ] @@ -5601,16 +5701,7 @@ checksum = "6ee98d5747ec63897e51101c8cafad569cc639346332c0378772ef4baeea8ed2" dependencies = [ "anyhow", "heck 0.5.0", - "wit-parser", -] - -[[package]] -name = "wit-bindgen-rt" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" -dependencies = [ - "bitflags 2.9.4", + "wit-parser 0.243.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5621,12 +5712,12 @@ checksum = "8596d6a44bcc2b66e99213c342a85ff72be1109972f5353bb07d05a890a0c257" dependencies = [ "anyhow", "heck 0.5.0", - "indexmap 2.11.4", + "indexmap 2.12.1", "prettyplease", - "syn 2.0.106", - "wasm-metadata", + "syn 2.0.111", + "wasm-metadata 0.243.0 (registry+https://github.com/rust-lang/crates.io-index)", "wit-bindgen-core", - "wit-component", + "wit-component 0.243.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5639,7 +5730,7 @@ dependencies = [ "prettyplease", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", "wit-bindgen-core", "wit-bindgen-rust", ] @@ -5651,16 +5742,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36f9fc53513e461ce51dcf17a3e331752cb829f1d187069e54af5608fc998fe4" dependencies = [ "anyhow", - "bitflags 2.9.4", - "indexmap 2.11.4", + "bitflags 2.10.0", + "indexmap 2.12.1", "log", "serde", "serde_derive", "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser 0.243.0", - "wit-parser", + "wasm-encoder 0.243.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-metadata 0.243.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmparser 0.243.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wit-parser 0.243.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wit-component" +version = "0.243.0" +source = "git+https://github.com/bytecodealliance/wasm-tools#3ab232a61b7d2ffd6051c56a81ee863815d9db78" +dependencies = [ + "anyhow", + "bitflags 2.10.0", + "indexmap 2.12.1", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", + "wasm-metadata 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", + "wasmparser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", + "wit-parser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", ] [[package]] @@ -5671,14 +5780,31 @@ checksum = "df983a8608e513d8997f435bb74207bf0933d0e49ca97aa9d8a6157164b9b7fc" dependencies = [ "anyhow", "id-arena", - "indexmap 2.11.4", + "indexmap 2.12.1", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.243.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wit-parser" +version = "0.243.0" +source = "git+https://github.com/bytecodealliance/wasm-tools#3ab232a61b7d2ffd6051c56a81ee863815d9db78" +dependencies = [ + "anyhow", + "id-arena", + "indexmap 2.12.1", "log", "semver", "serde", "serde_derive", "serde_json", "unicode-xid", - "wasmparser 0.243.0", + "wasmparser 0.243.0 (git+https://github.com/bytecodealliance/wasm-tools)", ] [[package]] @@ -5689,7 +5815,7 @@ checksum = "e366f27a5cabcddb2706a78296a40b8fcc451e1a6aba2fc1d94b4a01bdaaef4b" dependencies = [ "anyhow", "log", - "thiserror 1.0.65", + "thiserror 1.0.69", "wast 35.0.2", ] @@ -5697,7 +5823,7 @@ dependencies = [ name = "wizer-fuzz" version = "0.0.0" dependencies = [ - "env_logger 0.11.5", + "env_logger 0.11.8", "libfuzzer-sys", "log", "wasm-smith", @@ -5706,17 +5832,11 @@ dependencies = [ "wasmtime-wizer", ] -[[package]] -name = "write16" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" - [[package]] name = "writeable" -version = "0.5.5" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" [[package]] name = "xattr" @@ -5725,16 +5845,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156" dependencies = [ "libc", - "rustix 1.0.8", + "rustix 1.1.2", ] [[package]] name = "yoke" -version = "0.7.5" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" dependencies = [ - "serde", "stable_deref_trait", "yoke-derive", "zerofrom", @@ -5742,48 +5861,79 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.7.5" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", "synstructure", ] +[[package]] +name = "zerocopy" +version = "0.8.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd74ec98b9250adb3ca554bdde269adf631549f51d8a8f8f0a10b50f1cb298c3" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a8d209fdf45cf5138cbb5a506f6b52522a25afccc534d1475dad8e31105c6a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + [[package]] name = "zerofrom" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", "synstructure", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" + +[[package]] +name = "zerotrie" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] [[package]] name = "zerovec" -version = "0.10.4" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" dependencies = [ "yoke", "zerofrom", @@ -5792,13 +5942,13 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.10.3" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -5832,11 +5982,11 @@ dependencies = [ [[package]] name = "zstd" -version = "0.13.0" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bffb3309596d527cfcba7dfc6ed6052f1d39dfbd7c867aa2e865e4a449c10110" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" dependencies = [ - "zstd-safe 7.0.0", + "zstd-safe 7.2.4", ] [[package]] @@ -5851,18 +6001,18 @@ dependencies = [ [[package]] name = "zstd-safe" -version = "7.0.0" +version = "7.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43747c7422e2924c11144d5229878b98180ef8b06cca4ab5af37afc8a8d8ea3e" +checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" +version = "2.0.16+zstd.1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index 891dd3ea3c3c..a8bfdc8eb4cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -341,18 +341,20 @@ wit-bindgen = { version = "0.50.0", default-features = false } wit-bindgen-rust-macro = { version = "0.50.0", default-features = false } # wasm-tools family: -wasmparser = { version = "0.243.0", default-features = false, features = ['simd'] } -wat = "1.243.0" -wast = "243.0.0" -wasmprinter = "0.243.0" -wasm-encoder = "0.243.0" -wasm-smith = "0.243.0" -wasm-mutate = "0.243.0" -wit-parser = "0.243.0" -wit-component = "0.243.0" -wasm-wave = "0.243.0" -wasm-compose = "0.243.0" -json-from-wast = "0.243.0" +# TODO: well, these are not published to crates.io yet, so we need to use the git repository. +# I am gonna remove this once the feature is "completed" and the crates are published to crates.io. +wasmparser = { git = "https://github.com/bytecodealliance/wasm-tools", default-features = false, features = ['simd'] } +wat = { git = "https://github.com/bytecodealliance/wasm-tools" } +wast = { git = "https://github.com/bytecodealliance/wasm-tools" } +wasmprinter = { git = "https://github.com/bytecodealliance/wasm-tools" } +wasm-encoder = { git = "https://github.com/bytecodealliance/wasm-tools" } +wasm-smith = { git = "https://github.com/bytecodealliance/wasm-tools" } +wasm-mutate = { git = "https://github.com/bytecodealliance/wasm-tools" } +wit-parser = { git = "https://github.com/bytecodealliance/wasm-tools" } +wit-component = { git = "https://github.com/bytecodealliance/wasm-tools" } +wasm-wave = { git = "https://github.com/bytecodealliance/wasm-tools" } +wasm-compose = { git = "https://github.com/bytecodealliance/wasm-tools" } +json-from-wast = { git = "https://github.com/bytecodealliance/wasm-tools" } # Non-Bytecode Alliance maintained dependencies: # -------------------------- diff --git a/crates/c-api/CMakeLists.txt b/crates/c-api/CMakeLists.txt index 3ca05cd48cb5..a6e0bd01641f 100644 --- a/crates/c-api/CMakeLists.txt +++ b/crates/c-api/CMakeLists.txt @@ -32,7 +32,13 @@ else() endif() endif() -set(WASMTIME_TARGET_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../target/${WASMTIME_TARGET}/${WASMTIME_BUILD_TYPE}) +# Respect CARGO_TARGET_DIR if set, allowing users to customize where Cargo +# outputs build artifacts +if(DEFINED ENV{CARGO_TARGET_DIR}) + set(WASMTIME_TARGET_DIR $ENV{CARGO_TARGET_DIR}/${WASMTIME_TARGET}/${WASMTIME_BUILD_TYPE}) +else() + set(WASMTIME_TARGET_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../target/${WASMTIME_TARGET}/${WASMTIME_BUILD_TYPE}) +endif() if(WASMTIME_TARGET MATCHES "apple") set(WASMTIME_SHARED_FILES libwasmtime.dylib) diff --git a/crates/c-api/include/wasmtime/component/types/val.h b/crates/c-api/include/wasmtime/component/types/val.h index 85301056ad6f..4c86a702117a 100644 --- a/crates/c-api/include/wasmtime/component/types/val.h +++ b/crates/c-api/include/wasmtime/component/types/val.h @@ -335,6 +335,43 @@ WASM_API_EXTERN bool wasmtime_component_stream_type_ty( const wasmtime_component_stream_type_t *ty, struct wasmtime_component_valtype_t *type_ret); +// ----------- maps ------------------------------------------------------------ + +/// \brief Opaque type representing a component map type. +typedef struct wasmtime_component_map_type wasmtime_component_map_type_t; + +/// \brief Clones a component map type. +/// +/// The returned pointer must be deallocated with +/// `wasmtime_component_map_type_delete`. +WASM_API_EXTERN wasmtime_component_map_type_t * +wasmtime_component_map_type_clone(const wasmtime_component_map_type_t *ty); + +/// \brief Compares two component map types for equality. +WASM_API_EXTERN bool +wasmtime_component_map_type_equal(const wasmtime_component_map_type_t *a, + const wasmtime_component_map_type_t *b); + +/// \brief Deallocates a component map type. +WASM_API_EXTERN void +wasmtime_component_map_type_delete(wasmtime_component_map_type_t *ptr); + +/// \brief Returns the key type of a component map type. +/// +/// The returned type must be deallocated with +/// `wasmtime_component_valtype_delete`. +WASM_API_EXTERN void wasmtime_component_map_type_key( + const wasmtime_component_map_type_t *ty, + struct wasmtime_component_valtype_t *type_ret); + +/// \brief Returns the value type of a component map type. +/// +/// The returned type must be deallocated with +/// `wasmtime_component_valtype_delete`. +WASM_API_EXTERN void wasmtime_component_map_type_value( + const wasmtime_component_map_type_t *ty, + struct wasmtime_component_valtype_t *type_ret); + // ----------- valtype --------------------------------------------------------- /// \brief Value of #wasmtime_component_valtype_kind_t meaning that @@ -415,6 +452,9 @@ WASM_API_EXTERN bool wasmtime_component_stream_type_ty( /// \brief Value of #wasmtime_component_valtype_kind_t meaning that /// #wasmtime_component_valtype_t is an `error context` WIT type. #define WASMTIME_COMPONENT_VALTYPE_ERROR_CONTEXT 25 +/// \brief Value of #wasmtime_component_valtype_kind_t meaning that +/// #wasmtime_component_valtype_t is a `map` WIT type. +#define WASMTIME_COMPONENT_VALTYPE_MAP 26 /// \brief Discriminant used in #wasmtime_component_valtype_t::kind typedef uint8_t wasmtime_component_valtype_kind_t; @@ -457,6 +497,9 @@ typedef union wasmtime_component_valtype_union { /// Field used if #wasmtime_component_valtype_t::kind is /// #WASMTIME_COMPONENT_VALTYPE_STREAM wasmtime_component_stream_type_t *stream; + /// Field used if #wasmtime_component_valtype_t::kind is + /// #WASMTIME_COMPONENT_VALTYPE_MAP + wasmtime_component_map_type_t *map; } wasmtime_component_valtype_union_t; /// \brief Represents a single value type in the component model. diff --git a/crates/c-api/include/wasmtime/component/types/val.hh b/crates/c-api/include/wasmtime/component/types/val.hh index 8cf31b62f1c4..6a93b3de5c3a 100644 --- a/crates/c-api/include/wasmtime/component/types/val.hh +++ b/crates/c-api/include/wasmtime/component/types/val.hh @@ -178,6 +178,19 @@ class StreamType { std::optional ty() const; }; +/** + * \brief Represents a component map type. + */ +class MapType { + WASMTIME_CLONE_EQUAL_WRAPPER(MapType, wasmtime_component_map_type); + + /// Returns the key type of this map type. + ValType key() const; + + /// Returns the value type of this map type. + ValType value() const; +}; + /** * \brief Represents a component value type. */ @@ -382,6 +395,12 @@ public: ty.of.stream = stream.capi_release(); } + /// Creates a map value type. + ValType(MapType map) { + ty.kind = WASMTIME_COMPONENT_VALTYPE_MAP; + ty.of.map = map.capi_release(); + } + /// Returns the kind of this value type. wasmtime_component_valtype_kind_t kind() const { return ty.kind; } @@ -481,6 +500,9 @@ public: return ty.kind == WASMTIME_COMPONENT_VALTYPE_ERROR_CONTEXT; } + /// Returns true if this is a map type. + bool is_map() const { return ty.kind == WASMTIME_COMPONENT_VALTYPE_MAP; } + /// Returns the list type, asserting that this is indeed a list. const ListType &list() const { assert(is_list()); @@ -553,6 +575,12 @@ public: return *StreamType::from_capi(&ty.of.stream); } + /// Returns the map type, asserting that this is indeed a map. + const MapType &map() const { + assert(is_map()); + return *MapType::from_capi(&ty.of.map); + } + /// \brief Returns the underlying C API pointer. const wasmtime_component_valtype_t *capi() const { return &ty; } /// \brief Returns the underlying C API pointer. @@ -640,6 +668,18 @@ inline std::optional StreamType::ty() const { return std::nullopt; } +inline ValType MapType::key() const { + wasmtime_component_valtype_t type_ret; + wasmtime_component_map_type_key(ptr.get(), &type_ret); + return ValType(std::move(type_ret)); +} + +inline ValType MapType::value() const { + wasmtime_component_valtype_t type_ret; + wasmtime_component_map_type_value(ptr.get(), &type_ret); + return ValType(std::move(type_ret)); +} + } // namespace component } // namespace wasmtime diff --git a/crates/c-api/include/wasmtime/component/val.h b/crates/c-api/include/wasmtime/component/val.h index 2021651273f9..f0c4c0f69fb2 100644 --- a/crates/c-api/include/wasmtime/component/val.h +++ b/crates/c-api/include/wasmtime/component/val.h @@ -266,9 +266,13 @@ typedef uint8_t wasmtime_component_valkind_t; /// \brief Value of #wasmtime_component_valkind_t meaning that /// #wasmtime_component_val_t is a resource #define WASMTIME_COMPONENT_RESOURCE 21 +/// \brief Value of #wasmtime_component_valkind_t meaning that +/// #wasmtime_component_val_t is a map +#define WASMTIME_COMPONENT_MAP 22 struct wasmtime_component_val; struct wasmtime_component_valrecord_entry; +struct wasmtime_component_valmap_entry; #define DECLARE_VEC(name, type) \ /** \brief A vec of a type */ \ @@ -296,6 +300,8 @@ DECLARE_VEC(wasmtime_component_valrecord, struct wasmtime_component_valrecord_entry) DECLARE_VEC(wasmtime_component_valtuple, struct wasmtime_component_val) DECLARE_VEC(wasmtime_component_valflags, wasm_name_t) +DECLARE_VEC(wasmtime_component_valmap, + struct wasmtime_component_valmap_entry) #undef DECLARE_VEC @@ -366,6 +372,8 @@ typedef union { wasmtime_component_valresult_t result; /// Field used if #wasmtime_component_val_t::kind is #WASMTIME_COMPONENT_FLAGS wasmtime_component_valflags_t flags; + /// Field used if #wasmtime_component_val_t::kind is #WASMTIME_COMPONENT_MAP + wasmtime_component_valmap_t map; /// Field used if #wasmtime_component_val_t::kind is /// #WASMTIME_COMPONENT_RESOURCE wasmtime_component_resource_any_t *resource; @@ -389,6 +397,15 @@ typedef struct wasmtime_component_valrecord_entry { wasmtime_component_val_t val; } wasmtime_component_valrecord_entry_t; +/// \brief A pair of a key and a value that represents one entry in a value +/// with kind #WASMTIME_COMPONENT_MAP +typedef struct wasmtime_component_valmap_entry { + /// The key of this entry + wasmtime_component_val_t key; + /// The value of this entry + wasmtime_component_val_t value; +} wasmtime_component_valmap_entry_t; + /// \brief Allocates a new `wasmtime_component_val_t` on the heap, initializing /// it with the contents of `val`. /// diff --git a/crates/c-api/src/component/types/val.rs b/crates/c-api/src/component/types/val.rs index b705ada33031..c3e4f1630bb0 100644 --- a/crates/c-api/src/component/types/val.rs +++ b/crates/c-api/src/component/types/val.rs @@ -31,6 +31,7 @@ pub enum wasmtime_component_valtype_t { Future(Box), Stream(Box), ErrorContext, + Map(Box), } impl From for wasmtime_component_valtype_t { @@ -61,6 +62,7 @@ impl From for wasmtime_component_valtype_t { Type::Borrow(ty) => Self::Borrow(Box::new(ty.into())), Type::Future(ty) => Self::Future(Box::new(ty.into())), Type::Stream(ty) => Self::Stream(Box::new(ty.into())), + Type::Map(ty) => Self::Map(Box::new(ty.into())), Type::ErrorContext => Self::ErrorContext, } } @@ -108,6 +110,33 @@ pub extern "C" fn wasmtime_component_list_type_element( type_ret.write(ty.ty.ty().into()); } +type_wrapper! { + #[derive(PartialEq)] + pub struct wasmtime_component_map_type_t { + pub(crate) ty: Map, + } + + clone: wasmtime_component_map_type_clone, + delete: wasmtime_component_map_type_delete, + equal: wasmtime_component_map_type_equal, +} + +#[unsafe(no_mangle)] +pub extern "C" fn wasmtime_component_map_type_key( + ty: &wasmtime_component_map_type_t, + type_ret: &mut MaybeUninit, +) { + type_ret.write(ty.ty.key().into()); +} + +#[unsafe(no_mangle)] +pub extern "C" fn wasmtime_component_map_type_value( + ty: &wasmtime_component_map_type_t, + type_ret: &mut MaybeUninit, +) { + type_ret.write(ty.ty.value().into()); +} + type_wrapper! { #[derive(PartialEq)] pub struct wasmtime_component_record_type_t { diff --git a/crates/c-api/src/component/val.rs b/crates/c-api/src/component/val.rs index 00c2c6a63963..274de0a8f35d 100644 --- a/crates/c-api/src/component/val.rs +++ b/crates/c-api/src/component/val.rs @@ -45,6 +45,15 @@ crate::declare_vecs! { copy: wasmtime_component_valflags_copy, delete: wasmtime_component_valflags_delete, ) + ( + name: wasmtime_component_valmap_t, + ty: wasmtime_component_valmap_entry_t, + new: wasmtime_component_valmap_new, + empty: wasmtime_component_valmap_new_empty, + uninit: wasmtime_component_valmap_new_uninit, + copy: wasmtime_component_valmap_copy, + delete: wasmtime_component_valmap_delete, + ) } impl From<&wasmtime_component_vallist_t> for Vec { @@ -63,6 +72,29 @@ impl From<&[Val]> for wasmtime_component_vallist_t { } } +impl From<&wasmtime_component_valmap_t> for Vec<(Val, Val)> { + fn from(value: &wasmtime_component_valmap_t) -> Self { + value + .as_slice() + .iter() + .map(|entry| (Val::from(&entry.key), Val::from(&entry.value))) + .collect() + } +} + +impl From<&[(Val, Val)]> for wasmtime_component_valmap_t { + fn from(value: &[(Val, Val)]) -> Self { + value + .iter() + .map(|(k, v)| wasmtime_component_valmap_entry_t { + key: wasmtime_component_val_t::from(k), + value: wasmtime_component_val_t::from(v), + }) + .collect::>() + .into() + } +} + #[derive(Clone)] #[repr(C)] pub struct wasmtime_component_valrecord_entry_t { @@ -70,6 +102,13 @@ pub struct wasmtime_component_valrecord_entry_t { val: wasmtime_component_val_t, } +#[derive(Clone, Default)] +#[repr(C)] +pub struct wasmtime_component_valmap_entry_t { + key: wasmtime_component_val_t, + value: wasmtime_component_val_t, +} + impl Default for wasmtime_component_valrecord_entry_t { fn default() -> Self { Self { @@ -233,6 +272,7 @@ pub enum wasmtime_component_val_t { Option(Option>), Result(wasmtime_component_valresult_t), Flags(wasmtime_component_valflags_t), + Map(wasmtime_component_valmap_t), Resource(Box), } @@ -275,6 +315,7 @@ impl From<&wasmtime_component_val_t> for Val { } wasmtime_component_val_t::Result(x) => Val::Result(x.into()), wasmtime_component_val_t::Flags(x) => Val::Flags(x.into()), + wasmtime_component_val_t::Map(x) => Val::Map(x.into()), wasmtime_component_val_t::Resource(x) => Val::Resource(x.resource), } } @@ -309,6 +350,7 @@ impl From<&Val> for wasmtime_component_val_t { ), Val::Result(x) => wasmtime_component_val_t::Result(x.into()), Val::Flags(x) => wasmtime_component_val_t::Flags(x.as_slice().into()), + Val::Map(x) => wasmtime_component_val_t::Map(x.as_slice().into()), Val::Resource(resource_any) => { wasmtime_component_val_t::Resource(Box::new(wasmtime_component_resource_any_t { resource: *resource_any, diff --git a/crates/c-api/tests/component/types.cc b/crates/c-api/tests/component/types.cc index dcef68dfd8b0..5fc5dc25e578 100644 --- a/crates/c-api/tests/component/types.cc +++ b/crates/c-api/tests/component/types.cc @@ -187,6 +187,15 @@ TEST(types, valtype_list) { EXPECT_TRUE(elem.is_u8()); } +TEST(types, valtype_map) { + auto ty = + result("(component (import \"f\" (func (result (map u32 string)))))"); + EXPECT_TRUE(ty.is_map()); + auto map_ty = ty.map(); + EXPECT_TRUE(map_ty.key().is_u32()); + EXPECT_TRUE(map_ty.value().is_string()); +} + TEST(types, valtype_record) { auto ty = result(R"( (component diff --git a/crates/environ/src/compile/module_environ.rs b/crates/environ/src/compile/module_environ.rs index a2c6640f74e6..b932e0c4dc34 100644 --- a/crates/environ/src/compile/module_environ.rs +++ b/crates/environ/src/compile/module_environ.rs @@ -331,10 +331,7 @@ impl<'a, 'data> ModuleEnvironment<'a, 'data> { Payload::ImportSection(imports) => { self.validator.import_section(&imports)?; - let cnt = usize::try_from(imports.count()).unwrap(); - self.result.module.initializers.reserve(cnt); - - for entry in imports { + for entry in imports.into_imports() { let import = entry?; let ty = match import.ty { TypeRef::Func(index) => { diff --git a/crates/environ/src/component/translate.rs b/crates/environ/src/component/translate.rs index 841c90a87e0b..b1c09ad454bf 100644 --- a/crates/environ/src/component/translate.rs +++ b/crates/environ/src/component/translate.rs @@ -867,9 +867,6 @@ impl<'a, 'data> Translator<'a, 'data> { | wasmparser::CanonicalFunction::ThreadAvailableParallelism => { bail!("unsupported intrinsic") } - wasmparser::CanonicalFunction::BackpressureSet => { - bail!("unsupported intrinsic") - } wasmparser::CanonicalFunction::BackpressureInc => { let core_type = self.core_func_signature(core_func_index)?; core_func_index += 1; diff --git a/crates/environ/src/component/types.rs b/crates/environ/src/component/types.rs index 8db6b800c4fe..c8654adf5a62 100644 --- a/crates/environ/src/component/types.rs +++ b/crates/environ/src/component/types.rs @@ -89,6 +89,8 @@ indices! { pub struct TypeResultIndex(u32); /// Index pointing to a list type in the component model. pub struct TypeListIndex(u32); + /// Index pointing to a map type in the component model. + pub struct TypeMapIndex(u32); /// Index pointing to a future type in the component model. pub struct TypeFutureIndex(u32); @@ -281,6 +283,7 @@ pub struct ComponentTypes { pub(super) component_instances: PrimaryMap, pub(super) functions: PrimaryMap, pub(super) lists: PrimaryMap, + pub(super) maps: PrimaryMap, pub(super) records: PrimaryMap, pub(super) variants: PrimaryMap, pub(super) tuples: PrimaryMap, @@ -360,7 +363,9 @@ impl ComponentTypes { &CanonicalAbiInfo::SCALAR8 } - InterfaceType::String | InterfaceType::List(_) => &CanonicalAbiInfo::POINTER_PAIR, + InterfaceType::String | InterfaceType::List(_) | InterfaceType::Map(_) => { + &CanonicalAbiInfo::POINTER_PAIR + } InterfaceType::Record(i) => &self[*i].abi, InterfaceType::Variant(i) => &self[*i].abi, @@ -412,6 +417,7 @@ impl_index! { impl Index for ComponentTypes { TypeOption => options } impl Index for ComponentTypes { TypeResult => results } impl Index for ComponentTypes { TypeList => lists } + impl Index for ComponentTypes { TypeMap => maps } impl Index for ComponentTypes { TypeResourceTable => resource_tables } impl Index for ComponentTypes { TypeFuture => futures } impl Index for ComponentTypes { TypeStream => streams } @@ -586,6 +592,7 @@ pub enum InterfaceType { Variant(TypeVariantIndex), List(TypeListIndex), Tuple(TypeTupleIndex), + Map(TypeMapIndex), Flags(TypeFlagsIndex), Enum(TypeEnumIndex), Option(TypeOptionIndex), @@ -1175,6 +1182,15 @@ pub struct TypeList { pub element: InterfaceType, } +/// Shape of a "map" interface type. +#[derive(Serialize, Deserialize, Clone, Hash, Eq, PartialEq, Debug)] +pub struct TypeMap { + /// The key type of the map. + pub key: InterfaceType, + /// The value type of the map. + pub value: InterfaceType, +} + /// Maximum number of flat types, for either params or results. pub const MAX_FLAT_TYPES: usize = if MAX_FLAT_PARAMS > MAX_FLAT_RESULTS { MAX_FLAT_PARAMS diff --git a/crates/environ/src/component/types_builder.rs b/crates/environ/src/component/types_builder.rs index 3d5897ff4b9a..ace26eef87ce 100644 --- a/crates/environ/src/component/types_builder.rs +++ b/crates/environ/src/component/types_builder.rs @@ -38,6 +38,7 @@ const MAX_TYPE_DEPTH: u32 = 100; pub struct ComponentTypesBuilder { functions: HashMap, lists: HashMap, + maps: HashMap, records: HashMap, variants: HashMap, tuples: HashMap, @@ -102,6 +103,7 @@ impl ComponentTypesBuilder { functions: HashMap::default(), lists: HashMap::default(), + maps: HashMap::default(), records: HashMap::default(), variants: HashMap::default(), tuples: HashMap::default(), @@ -439,6 +441,9 @@ impl ComponentTypesBuilder { InterfaceType::Variant(self.variant_type(types, e)?) } ComponentDefinedType::List(e) => InterfaceType::List(self.list_type(types, e)?), + ComponentDefinedType::Map(key, value) => { + InterfaceType::Map(self.map_type(types, key, value)?) + } ComponentDefinedType::Tuple(e) => InterfaceType::Tuple(self.tuple_type(types, e)?), ComponentDefinedType::Flags(e) => InterfaceType::Flags(self.flags_type(e)), ComponentDefinedType::Enum(e) => InterfaceType::Enum(self.enum_type(e)), @@ -662,6 +667,21 @@ impl ComponentTypesBuilder { Ok(self.add_list_type(TypeList { element })) } + fn map_type( + &mut self, + types: TypesRef<'_>, + key: &ComponentValType, + value: &ComponentValType, + ) -> Result { + assert_eq!(types.id(), self.module_types.validator_id()); + let key_ty = self.valtype(types, key)?; + let value_ty = self.valtype(types, value)?; + Ok(self.add_map_type(TypeMap { + key: key_ty, + value: value_ty, + })) + } + /// Converts a wasmparser `id`, which must point to a resource, to its /// corresponding `TypeResourceTableIndex`. pub fn resource_id(&mut self, id: ResourceId) -> TypeResourceTableIndex { @@ -713,6 +733,11 @@ impl ComponentTypesBuilder { intern_and_fill_flat_types!(self, lists, ty) } + /// Interns a new map type within this type information. + pub fn add_map_type(&mut self, ty: TypeMap) -> TypeMapIndex { + intern_and_fill_flat_types!(self, maps, ty) + } + /// Interns a new future type within this type information. pub fn add_future_type(&mut self, ty: TypeFuture) -> TypeFutureIndex { intern(&mut self.futures, &mut self.component_types.futures, ty) @@ -816,6 +841,7 @@ impl ComponentTypesBuilder { } InterfaceType::List(i) => &self.type_info.lists[*i], + InterfaceType::Map(i) => &self.type_info.maps[*i], InterfaceType::Record(i) => &self.type_info.records[*i], InterfaceType::Variant(i) => &self.type_info.variants[*i], InterfaceType::Tuple(i) => &self.type_info.tuples[*i], @@ -932,6 +958,7 @@ struct TypeInformationCache { options: PrimaryMap, results: PrimaryMap, lists: PrimaryMap, + maps: PrimaryMap, } struct TypeInformation { @@ -1126,4 +1153,15 @@ impl TypeInformation { self.depth += info.depth; self.has_borrow = info.has_borrow; } + + fn maps(&mut self, types: &ComponentTypesBuilder, ty: &TypeMap) { + // Maps are represented as list> in canonical ABI + // So we use POINTER_PAIR like lists, and calculate depth/borrow from key and value + *self = TypeInformation::string(); + let key_info = types.type_information(&ty.key); + let value_info = types.type_information(&ty.value); + // Depth is max of key/value depths, plus 1 for tuple, plus 1 for list + self.depth = key_info.depth.max(value_info.depth) + 2; + self.has_borrow = key_info.has_borrow || value_info.has_borrow; + } } diff --git a/crates/environ/src/fact/trampoline.rs b/crates/environ/src/fact/trampoline.rs index 0411e67f78d5..da8106bd743c 100644 --- a/crates/environ/src/fact/trampoline.rs +++ b/crates/environ/src/fact/trampoline.rs @@ -20,8 +20,8 @@ use crate::component::{ FlatType, InterfaceType, MAX_FLAT_ASYNC_PARAMS, MAX_FLAT_PARAMS, PREPARE_ASYNC_NO_RESULT, PREPARE_ASYNC_WITH_RESULT, START_FLAG_ASYNC_CALLEE, StringEncoding, Transcode, TypeComponentLocalErrorContextTableIndex, TypeEnumIndex, TypeFlagsIndex, TypeFutureTableIndex, - TypeListIndex, TypeOptionIndex, TypeRecordIndex, TypeResourceTableIndex, TypeResultIndex, - TypeStreamTableIndex, TypeTupleIndex, TypeVariantIndex, VariantInfo, + TypeListIndex, TypeMapIndex, TypeOptionIndex, TypeRecordIndex, TypeResourceTableIndex, + TypeResultIndex, TypeStreamTableIndex, TypeTupleIndex, TypeVariantIndex, VariantInfo, }; use crate::fact::signature::Signature; use crate::fact::transcode::Transcoder; @@ -1083,6 +1083,8 @@ impl<'a, 'b> Compiler<'a, 'b> { // Iteration of a loop is along the lines of the cost of a string // so give it the same cost InterfaceType::List(_) => 40, + // Maps are similar to lists in terms of iteration cost + InterfaceType::Map(_) => 40, InterfaceType::Flags(i) => { let count = self.module.types[*i].names.len(); @@ -1132,6 +1134,7 @@ impl<'a, 'b> Compiler<'a, 'b> { InterfaceType::Char => self.translate_char(src, dst_ty, dst), InterfaceType::String => self.translate_string(src, dst_ty, dst), InterfaceType::List(t) => self.translate_list(*t, src, dst_ty, dst), + InterfaceType::Map(t) => self.translate_map(*t, src, dst_ty, dst), InterfaceType::Record(t) => self.translate_record(*t, src, dst_ty, dst), InterfaceType::Flags(f) => self.translate_flags(*f, src, dst_ty, dst), InterfaceType::Tuple(t) => self.translate_tuple(*t, src, dst_ty, dst), @@ -2609,6 +2612,274 @@ impl<'a, 'b> Compiler<'a, 'b> { self.free_temp_local(dst_mem.addr); } + /// Translates a map from one component's memory to another. + /// + /// In the Component Model, a `map` is stored in memory as `list>`. + /// The memory layout is: + /// ```text + /// [pointer to data, length] + /// | + /// v + /// [key1, value1, key2, value2, key3, value3, ...] + /// ``` + /// + /// This function copies each key-value pair from source to destination, + /// potentially converting types along the way. + fn translate_map( + &mut self, + src_ty: TypeMapIndex, + src: &Source<'_>, + dst_ty: &InterfaceType, + dst: &Destination, + ) { + // Extract memory configuration for source and destination + // Get linear memory options (32-bit vs 64-bit pointers, which memory, etc.) + let src_mem_opts = match &src.opts().data_model { + DataModel::Gc {} => todo!("CM+GC"), + DataModel::LinearMemory(opts) => opts, + }; + let dst_mem_opts = match &dst.opts().data_model { + DataModel::Gc {} => todo!("CM+GC"), + DataModel::LinearMemory(opts) => opts, + }; + + // Get type information for source and destination maps + // Look up the TypeMap structs which contain the key and value InterfaceTypes + let src_map_ty = &self.types[src_ty]; + let dst_map_ty = match dst_ty { + InterfaceType::Map(r) => &self.types[*r], + _ => panic!("expected a map"), + }; + + // Load the map's pointer and length into temporary locals + // A map is represented as (ptr, len) - we need both values in locals + // for later use in the translation loop. + match src { + Source::Stack(s) => { + // If map descriptor is passed on the stack (as 2 locals: ptr, len) + assert_eq!(s.locals.len(), 2); + self.stack_get(&s.slice(0..1), src_mem_opts.ptr()); // Push ptr to wasm stack + self.stack_get(&s.slice(1..2), src_mem_opts.ptr()); // Push len to wasm stack + } + Source::Memory(mem) => { + // If map descriptor is stored in memory, load ptr and len from there + self.ptr_load(mem); // Load ptr + self.ptr_load(&mem.bump(src_mem_opts.ptr_size().into())); // Load len (next field) + } + Source::Struct(_) | Source::Array(_) => todo!("CM+GC"), + } + // Pop values from wasm stack into named locals (note: len is on top, then ptr) + let src_len = self.local_set_new_tmp(src_mem_opts.ptr()); + let src_ptr = self.local_set_new_tmp(src_mem_opts.ptr()); + + // Calculate tuple sizes with proper alignment + // Each map entry is a (key, value) tuple. We need to know: + // - Size of key and value in bytes + // - Alignment requirements + // - Total tuple size including any padding + let src_opts = src.opts(); + let dst_opts = dst.opts(); + + // Source tuple layout + let (src_key_size, src_key_align) = self.types.size_align(src_mem_opts, &src_map_ty.key); + let (src_value_size, _) = self.types.size_align(src_mem_opts, &src_map_ty.value); + // Total tuple size = key + value + padding to alignment + // e.g., if key is 4 bytes, value is 8 bytes, align is 4: + // tuple_size = (4 + 8 + 3) & ~3 = 12 bytes + let src_tuple_size = + (src_key_size + src_value_size + src_key_align - 1) & !(src_key_align - 1); + + // Destination tuple layout (may differ if types are converted) + let (dst_key_size, dst_key_align) = self.types.size_align(dst_mem_opts, &dst_map_ty.key); + let (dst_value_size, _) = self.types.size_align(dst_mem_opts, &dst_map_ty.value); + let dst_tuple_size = + (dst_key_size + dst_value_size + dst_key_align - 1) & !(dst_key_align - 1); + + // Create source memory operand and verify alignment + // This creates a Memory operand and verifies the source pointer is properly aligned + let src_mem = self.memory_operand(src_opts, src_ptr, src_key_align); + + // Calculate total byte lengths for source and destination + // total_bytes = count * tuple_size + let src_byte_len = self.local_set_new_tmp(src_mem_opts.ptr()); + self.instruction(LocalGet(src_len.idx)); // Push len + self.ptr_uconst(src_mem_opts, src_tuple_size); // Push tuple_size + self.ptr_mul(src_mem_opts); // len * tuple_size + self.instruction(LocalSet(src_byte_len.idx)); // Save to local + + let dst_byte_len = self.local_set_new_tmp(dst_mem_opts.ptr()); + self.instruction(LocalGet(src_len.idx)); // Push len (same count) + self.ptr_uconst(dst_mem_opts, dst_tuple_size); // Push dst tuple_size + self.ptr_mul(dst_mem_opts); // len * tuple_size + self.instruction(LocalTee(dst_byte_len.idx)); // Save AND keep on stack for malloc + + // Allocate destination buffer + // Call realloc in the destination component to allocate space. + // dst_byte_len is still on the stack from LocalTee above. + let dst_mem = self.malloc(dst_opts, MallocSize::Local(dst_byte_len.idx), dst_key_align); + + // Validate memory bounds + // Verify that ptr + byte_len doesn't overflow or exceed memory bounds. + // Trap if invalid. + self.validate_memory_inbounds( + src_mem_opts, + src_mem.addr.idx, + src_byte_len.idx, + Trap::ListByteLengthOverflow, + ); + self.validate_memory_inbounds( + dst_mem_opts, + dst_mem.addr.idx, + dst_byte_len.idx, + Trap::ListByteLengthOverflow, + ); + + // Done with byte length locals + self.free_temp_local(src_byte_len); + self.free_temp_local(dst_byte_len); + + // Main translation loop - copy each (key, value) tuple + // Skip loop entirely if tuples are zero-sized (nothing to copy) + if src_tuple_size > 0 || dst_tuple_size > 0 { + // Loop setup + // Create counter for remaining elements + let remaining = self.local_set_new_tmp(src_mem_opts.ptr()); + self.instruction(LocalGet(src_len.idx)); + self.instruction(LocalSet(remaining.idx)); + + // Create pointer to current position in source + let cur_src_ptr = self.local_set_new_tmp(src_mem_opts.ptr()); + self.instruction(LocalGet(src_mem.addr.idx)); + self.instruction(LocalSet(cur_src_ptr.idx)); + + // Create pointer to current position in destination + let cur_dst_ptr = self.local_set_new_tmp(dst_mem_opts.ptr()); + self.instruction(LocalGet(dst_mem.addr.idx)); + self.instruction(LocalSet(cur_dst_ptr.idx)); + + // WebAssembly loop structure + // Block is the outer container (to break out of loop) + // Loop is what we branch back to for iteration + self.instruction(Block(BlockType::Empty)); + self.instruction(Loop(BlockType::Empty)); + + // Translate the key + // Create Source pointing to current key location + let key_src = Source::Memory(self.memory_operand( + src_opts, + TempLocal { + idx: cur_src_ptr.idx, + ty: src_mem_opts.ptr(), + needs_free: false, + }, + src_key_align, + )); + // Create Destination pointing to where key should go + let key_dst = Destination::Memory(self.memory_operand( + dst_opts, + TempLocal { + idx: cur_dst_ptr.idx, + ty: dst_mem_opts.ptr(), + needs_free: false, + }, + dst_key_align, + )); + // Recursively translate the key (handles any type: primitives, strings, etc.) + self.translate(&src_map_ty.key, &key_src, &dst_map_ty.key, &key_dst); + + // Advance pointers past the key to point at value + if src_key_size > 0 { + self.instruction(LocalGet(cur_src_ptr.idx)); + self.ptr_uconst(src_mem_opts, src_key_size); + self.ptr_add(src_mem_opts); + self.instruction(LocalSet(cur_src_ptr.idx)); + } + if dst_key_size > 0 { + self.instruction(LocalGet(cur_dst_ptr.idx)); + self.ptr_uconst(dst_mem_opts, dst_key_size); + self.ptr_add(dst_mem_opts); + self.instruction(LocalSet(cur_dst_ptr.idx)); + } + + // Translate the value + let value_src = Source::Memory(self.memory_operand( + src_opts, + TempLocal { + idx: cur_src_ptr.idx, + ty: src_mem_opts.ptr(), + needs_free: false, + }, + src_key_align, + )); + let value_dst = Destination::Memory(self.memory_operand( + dst_opts, + TempLocal { + idx: cur_dst_ptr.idx, + ty: dst_mem_opts.ptr(), + needs_free: false, + }, + dst_key_align, + )); + // Recursively translate the value + self.translate(&src_map_ty.value, &value_src, &dst_map_ty.value, &value_dst); + + // Advance pointers past the value (including any alignment padding) + // If tuple_size > key_size + value_size, there's padding we need to skip + if src_tuple_size > src_key_size + src_value_size { + self.instruction(LocalGet(cur_src_ptr.idx)); + self.ptr_uconst(src_mem_opts, src_tuple_size - src_key_size - src_value_size); + self.ptr_add(src_mem_opts); + self.instruction(LocalSet(cur_src_ptr.idx)); + } + if dst_tuple_size > dst_key_size + dst_value_size { + self.instruction(LocalGet(cur_dst_ptr.idx)); + self.ptr_uconst(dst_mem_opts, dst_tuple_size - dst_key_size - dst_value_size); + self.ptr_add(dst_mem_opts); + self.instruction(LocalSet(cur_dst_ptr.idx)); + } + + // Loop continuation: decrement counter and branch if not done + self.instruction(LocalGet(remaining.idx)); + self.ptr_iconst(src_mem_opts, -1); // Push -1 + self.ptr_add(src_mem_opts); // remaining - 1 + self.instruction(LocalTee(remaining.idx)); // Save back AND keep on stack + self.ptr_br_if(src_mem_opts, 0); // If remaining != 0, branch back to Loop + self.instruction(End); // End Loop + self.instruction(End); // End Block + + // Release loop locals + self.free_temp_local(cur_dst_ptr); + self.free_temp_local(cur_src_ptr); + self.free_temp_local(remaining); + } + + // Store the result (ptr, len) to the destination + match dst { + Destination::Stack(s, _) => { + // Put ptr and len on the wasm stack for return + self.instruction(LocalGet(dst_mem.addr.idx)); + self.stack_set(&s[..1], dst_mem_opts.ptr()); + self.convert_src_len_to_dst(src_len.idx, src_mem_opts.ptr(), dst_mem_opts.ptr()); + self.stack_set(&s[1..], dst_mem_opts.ptr()); + } + Destination::Memory(mem) => { + // Store ptr and len to destination memory location + self.instruction(LocalGet(mem.addr.idx)); + self.instruction(LocalGet(dst_mem.addr.idx)); + self.ptr_store(mem); + self.instruction(LocalGet(mem.addr.idx)); + self.convert_src_len_to_dst(src_len.idx, src_mem_opts.ptr(), dst_mem_opts.ptr()); + self.ptr_store(&mem.bump(dst_mem_opts.ptr_size().into())); + } + Destination::Struct(_) | Destination::Array(_) => todo!("CM+GC"), + } + + // Cleanup - release all temporary locals + self.free_temp_local(src_len); + self.free_temp_local(src_mem.addr); + self.free_temp_local(dst_mem.addr); + } + fn calculate_list_byte_len( &mut self, opts: &LinearMemoryOptions, diff --git a/crates/test-util/src/component.rs b/crates/test-util/src/component.rs index aa921af1f201..7054878bf9f2 100644 --- a/crates/test-util/src/component.rs +++ b/crates/test-util/src/component.rs @@ -54,6 +54,7 @@ pub fn config() -> Config { let mut config = Config::new(); config.wasm_component_model(true); + config.wasm_features(wasmtime::WasmFeatures::CM_MAP, true); // When `WASMTIME_TEST_NO_HOG_MEMORY` is set it means we're in qemu. The // component model tests create a disproportionate number of instances so diff --git a/crates/test-util/src/component_fuzz.rs b/crates/test-util/src/component_fuzz.rs index 162b7075fbfe..9efbb9e123c7 100644 --- a/crates/test-util/src/component_fuzz.rs +++ b/crates/test-util/src/component_fuzz.rs @@ -125,6 +125,7 @@ pub enum Type { Char, String, List(Box), + Map(Box, Box), // Give records the ability to generate a generous amount of fields but // don't let the fuzzer go too wild since `wasmparser`'s validator currently @@ -158,7 +159,7 @@ impl Type { fuel: &mut u32, ) -> arbitrary::Result { *fuel = fuel.saturating_sub(1); - let max = if depth == 0 || *fuel == 0 { 12 } else { 20 }; + let max = if depth == 0 || *fuel == 0 { 12 } else { 21 }; Ok(match u.int_in_range(0..=max)? { 0 => Type::Bool, 1 => Type::S8, @@ -195,6 +196,10 @@ impl Type { *fuel -= amt; Type::Flags(amt) } + 21 => Type::Map( + Box::new(Type::generate(u, depth - 1, fuel)?), + Box::new(Type::generate(u, depth - 1, fuel)?), + ), // ^-- if you add something here update the `depth != 0` case above _ => unreachable!(), }) @@ -247,7 +252,7 @@ impl Type { Type::S64 | Type::U64 => Kind::Primitive("i64.store"), Type::Float32 => Kind::Primitive("f32.store"), Type::Float64 => Kind::Primitive("f64.store"), - Type::String | Type::List(_) => Kind::PointerPair, + Type::String | Type::List(_) | Type::Map(_, _) => Kind::PointerPair, Type::Enum(n) if *n <= (1 << 8) => Kind::Primitive("i32.store8"), Type::Enum(n) if *n <= (1 << 16) => Kind::Primitive("i32.store16"), Type::Enum(_) => Kind::Primitive("i32.store"), @@ -414,7 +419,7 @@ impl Type { Type::U64 | Type::S64 => Kind::Primitive("i64.load"), Type::Float32 => Kind::Primitive("f32.load"), Type::Float64 => Kind::Primitive("f64.load"), - Type::String | Type::List(_) => Kind::PointerPair, + Type::String | Type::List(_) | Type::Map(_, _) => Kind::PointerPair, Type::Enum(n) if *n <= (1 << 8) => Kind::Primitive("i32.load8_u"), Type::Enum(n) if *n <= (1 << 16) => Kind::Primitive("i32.load16_u"), Type::Enum(_) => Kind::Primitive("i32.load"), @@ -667,7 +672,7 @@ impl Type { Type::S64 | Type::U64 => vec.push(CoreType::I64), Type::Float32 => vec.push(CoreType::F32), Type::Float64 => vec.push(CoreType::F64), - Type::String | Type::List(_) => { + Type::String | Type::List(_) | Type::Map(_, _) => { vec.push(CoreType::I32); vec.push(CoreType::I32); } @@ -706,7 +711,7 @@ impl Type { alignment: 8, }, - Type::String | Type::List(_) => SizeAndAlignment { + Type::String | Type::List(_) | Type::Map(_, _) => SizeAndAlignment { size: 8, alignment: 4, }, @@ -1161,6 +1166,11 @@ pub fn rust_type(ty: &Type, name_counter: &mut u32, declarations: &mut TokenStre let ty = rust_type(ty, name_counter, declarations); quote!(Vec<#ty>) } + Type::Map(key_ty, value_ty) => { + let key_ty = rust_type(key_ty, name_counter, declarations); + let value_ty = rust_type(value_ty, name_counter, declarations); + quote!(std::collections::HashMap<#key_ty, #value_ty>) + } Type::Record(types) => { let fields = types .iter() @@ -1330,6 +1340,7 @@ impl<'a> TypesBuilder<'a> { // Otherwise emit a reference to the type and remember to generate // the corresponding type alias later. Type::List(_) + | Type::Map(_, _) | Type::Record(_) | Type::Tuple(_) | Type::Variant(_) @@ -1367,6 +1378,13 @@ impl<'a> TypesBuilder<'a> { self.write_ref(ty, &mut decl); decl.push_str(")"); } + Type::Map(key_ty, value_ty) => { + decl.push_str("(map "); + self.write_ref(key_ty, &mut decl); + decl.push_str(" "); + self.write_ref(value_ty, &mut decl); + decl.push_str(")"); + } Type::Record(types) => { decl.push_str("(record"); for (index, ty) in types.iter().enumerate() { diff --git a/crates/test-util/src/wasmtime_wast.rs b/crates/test-util/src/wasmtime_wast.rs index a20f011b1261..a0a82d512593 100644 --- a/crates/test-util/src/wasmtime_wast.rs +++ b/crates/test-util/src/wasmtime_wast.rs @@ -43,6 +43,7 @@ pub fn apply_test_config(config: &mut Config, test_config: &wast::TestConfig) { component_model_threading, component_model_error_context, component_model_gc, + component_model_map, nan_canonicalization, simd, exceptions, @@ -72,6 +73,7 @@ pub fn apply_test_config(config: &mut Config, test_config: &wast::TestConfig) { let component_model_threading = component_model_threading.unwrap_or(false); let component_model_error_context = component_model_error_context.unwrap_or(false); let component_model_gc = component_model_gc.unwrap_or(false); + let component_model_map = component_model_map.unwrap_or(false); let nan_canonicalization = nan_canonicalization.unwrap_or(false); let relaxed_simd = relaxed_simd.unwrap_or(false); let legacy_exceptions = legacy_exceptions.unwrap_or(false); @@ -111,6 +113,7 @@ pub fn apply_test_config(config: &mut Config, test_config: &wast::TestConfig) { .wasm_component_model_threading(component_model_threading) .wasm_component_model_error_context(component_model_error_context) .wasm_component_model_gc(component_model_gc) + .wasm_component_model_map(component_model_map) .wasm_exceptions(exceptions) .wasm_stack_switching(stack_switching) .cranelift_nan_canonicalization(nan_canonicalization); diff --git a/crates/test-util/src/wast.rs b/crates/test-util/src/wast.rs index 69a7192cdcfd..9d68b2e660e0 100644 --- a/crates/test-util/src/wast.rs +++ b/crates/test-util/src/wast.rs @@ -268,6 +268,7 @@ macro_rules! foreach_config_option { component_model_threading component_model_error_context component_model_gc + component_model_map simd gc_types exceptions @@ -708,6 +709,8 @@ impl WastTest { // https://github.com/bytecodealliance/wasm-tools/pull/2406 is // merged and released, and Wasmtime has been updated to use it: "component-model/test/async/same-component-stream-future.wast", + // FIXME(#12129) + "component-model/test/async/trap-if-block-and-sync.wast", ]; if failing_component_model_tests .iter() diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rs index 49e4b537c91a..bf35139916ce 100644 --- a/crates/wasmtime/src/config.rs +++ b/crates/wasmtime/src/config.rs @@ -1296,6 +1296,16 @@ impl Config { self } + /// Configures whether the component model map type is enabled or not. + /// + /// This is part of the component model specification and enables the + /// `map` type in WIT and the component binary format. + #[cfg(feature = "component-model")] + pub fn wasm_component_model_map(&mut self, enable: bool) -> &mut Self { + self.wasm_features(WasmFeatures::CM_MAP, enable); + self + } + /// Configures whether the [Exception-handling proposal][proposal] is enabled or not. /// /// [proposal]: https://github.com/WebAssembly/exception-handling @@ -2264,7 +2274,8 @@ impl Config { | WasmFeatures::CM_ASYNC_BUILTINS | WasmFeatures::CM_THREADING | WasmFeatures::CM_ERROR_CONTEXT - | WasmFeatures::CM_GC; + | WasmFeatures::CM_GC + | WasmFeatures::CM_MAP; #[allow(unused_mut, reason = "easier to avoid #[cfg]")] let mut unsupported = !features_known_to_wasmtime; diff --git a/crates/wasmtime/src/runtime/component/func/typed.rs b/crates/wasmtime/src/runtime/component/func/typed.rs index dceddd3285b5..f2264a1ec407 100644 --- a/crates/wasmtime/src/runtime/component/func/typed.rs +++ b/crates/wasmtime/src/runtime/component/func/typed.rs @@ -2895,6 +2895,7 @@ pub fn desc(ty: &InterfaceType) -> &'static str { InterfaceType::Future(_) => "future", InterfaceType::Stream(_) => "stream", InterfaceType::ErrorContext(_) => "error-context", + InterfaceType::Map(_) => "map", } } diff --git a/crates/wasmtime/src/runtime/component/types.rs b/crates/wasmtime/src/runtime/component/types.rs index 54434005a24d..f18044f86ecb 100644 --- a/crates/wasmtime/src/runtime/component/types.rs +++ b/crates/wasmtime/src/runtime/component/types.rs @@ -11,9 +11,9 @@ use wasmtime_environ::PrimaryMap; use wasmtime_environ::component::{ ComponentTypes, Export, InterfaceType, ResourceIndex, TypeComponentIndex, TypeComponentInstanceIndex, TypeDef, TypeEnumIndex, TypeFlagsIndex, TypeFuncIndex, - TypeFutureIndex, TypeFutureTableIndex, TypeListIndex, TypeModuleIndex, TypeOptionIndex, - TypeRecordIndex, TypeResourceTable, TypeResourceTableIndex, TypeResultIndex, TypeStreamIndex, - TypeStreamTableIndex, TypeTupleIndex, TypeVariantIndex, + TypeFutureIndex, TypeFutureTableIndex, TypeListIndex, TypeMapIndex, TypeModuleIndex, + TypeOptionIndex, TypeRecordIndex, TypeResourceTable, TypeResourceTableIndex, TypeResultIndex, + TypeStreamIndex, TypeStreamTableIndex, TypeTupleIndex, TypeVariantIndex, }; pub use crate::component::resources::ResourceType; @@ -108,6 +108,8 @@ impl TypeChecker<'_> { (InterfaceType::Borrow(_), _) => false, (InterfaceType::List(l1), InterfaceType::List(l2)) => self.lists_equal(l1, l2), (InterfaceType::List(_), _) => false, + (InterfaceType::Map(m1), InterfaceType::Map(m2)) => self.maps_equal(m1, m2), + (InterfaceType::Map(_), _) => false, (InterfaceType::Record(r1), InterfaceType::Record(r2)) => self.records_equal(r1, r2), (InterfaceType::Record(_), _) => false, (InterfaceType::Variant(v1), InterfaceType::Variant(v2)) => self.variants_equal(v1, v2), @@ -167,6 +169,12 @@ impl TypeChecker<'_> { self.interface_types_equal(a.element, b.element) } + fn maps_equal(&self, m1: TypeMapIndex, m2: TypeMapIndex) -> bool { + let a = &self.a_types[m1]; + let b = &self.b_types[m2]; + self.interface_types_equal(a.key, b.key) && self.interface_types_equal(a.value, b.value) + } + fn resources_equal(&self, o1: TypeResourceTableIndex, o2: TypeResourceTableIndex) -> bool { match (&self.a_types[o1], &self.b_types[o2]) { // Concrete resource types are the same if they map back to the @@ -324,6 +332,34 @@ impl List { } } +/// A `map` interface type +#[derive(Clone, Debug)] +pub struct Map(Handle); + +impl PartialEq for Map { + fn eq(&self, other: &Self) -> bool { + self.0.equivalent(&other.0, TypeChecker::maps_equal) + } +} + +impl Eq for Map {} + +impl Map { + pub(crate) fn from(index: TypeMapIndex, ty: &InstanceType<'_>) -> Self { + Map(Handle::new(index, ty)) + } + + /// Retrieve the key type of this `map`. + pub fn key(&self) -> Type { + Type::from(&self.0.types[self.0.index].key, &self.0.instance()) + } + + /// Retrieve the value type of this `map`. + pub fn value(&self) -> Type { + Type::from(&self.0.types[self.0.index].value, &self.0.instance()) + } +} + /// A field declaration belonging to a `record` #[derive(Debug)] pub struct Field<'a> { @@ -683,6 +719,7 @@ pub enum Type { Char, String, List(List), + Map(Map), Record(Record), Tuple(Tuple), Variant(Variant), @@ -843,6 +880,7 @@ impl Type { InterfaceType::Char => Type::Char, InterfaceType::String => Type::String, InterfaceType::List(index) => Type::List(List::from(*index, instance)), + InterfaceType::Map(index) => Type::Map(Map::from(*index, instance)), InterfaceType::Record(index) => Type::Record(Record::from(*index, instance)), InterfaceType::Tuple(index) => Type::Tuple(Tuple::from(*index, instance)), InterfaceType::Variant(index) => Type::Variant(Variant::from(*index, instance)), @@ -874,6 +912,7 @@ impl Type { Type::Char => "char", Type::String => "string", Type::List(_) => "list", + Type::Map(_) => "map", Type::Record(_) => "record", Type::Tuple(_) => "tuple", Type::Variant(_) => "variant", diff --git a/crates/wasmtime/src/runtime/component/values.rs b/crates/wasmtime/src/runtime/component/values.rs index 0215ea504e25..c5337d710383 100644 --- a/crates/wasmtime/src/runtime/component/values.rs +++ b/crates/wasmtime/src/runtime/component/values.rs @@ -7,8 +7,8 @@ use core::mem::MaybeUninit; use core::slice::{Iter, IterMut}; use wasmtime_component_util::{DiscriminantSize, FlagsSize}; use wasmtime_environ::component::{ - CanonicalAbiInfo, InterfaceType, TypeEnum, TypeFlags, TypeListIndex, TypeOption, TypeResult, - TypeVariant, VariantInfo, + CanonicalAbiInfo, InterfaceType, TypeEnum, TypeFlags, TypeListIndex, TypeMapIndex, TypeOption, + TypeResult, TypeVariant, VariantInfo, }; /// Represents possible runtime values which a component function can either @@ -79,6 +79,9 @@ pub enum Val { Char(char), String(String), List(Vec), + /// A map type represented as a list of key-value pairs. + /// Duplicate keys are allowed and follow "last value wins" semantics. + Map(Vec<(Val, Val)>), Record(Vec<(String, Val)>), Tuple(Vec), Variant(String, Option>), @@ -126,6 +129,13 @@ impl Val { let len = u32::linear_lift_from_flat(cx, InterfaceType::U32, next(src))? as usize; load_list(cx, i, ptr, len)? } + InterfaceType::Map(i) => { + // FIXME(#4311): needs memory64 treatment + // Maps are represented as list> in canonical ABI + let ptr = u32::linear_lift_from_flat(cx, InterfaceType::U32, next(src))? as usize; + let len = u32::linear_lift_from_flat(cx, InterfaceType::U32, next(src))? as usize; + load_map(cx, i, ptr, len)? + } InterfaceType::Record(i) => Val::Record( cx.types[i] .fields @@ -243,6 +253,12 @@ impl Val { let len = u32::from_le_bytes(bytes[4..].try_into().unwrap()) as usize; load_list(cx, i, ptr, len)? } + InterfaceType::Map(i) => { + // FIXME(#4311): needs memory64 treatment + let ptr = u32::from_le_bytes(bytes[..4].try_into().unwrap()) as usize; + let len = u32::from_le_bytes(bytes[4..].try_into().unwrap()) as usize; + load_map(cx, i, ptr, len)? + } InterfaceType::Record(i) => { let mut offset = 0; @@ -423,6 +439,18 @@ impl Val { Ok(()) } (InterfaceType::List(_), _) => unexpected(ty, self), + (InterfaceType::Map(ty), Val::Map(map)) => { + // Maps are stored as list> in canonical ABI + let map_ty = &cx.types[ty]; + // Convert HashMap to Vec<(Val, Val)> for lowering + let pairs: Vec<(Val, Val)> = + map.iter().map(|(k, v)| (k.clone(), v.clone())).collect(); + let (ptr, len) = lower_map(cx, map_ty.key, map_ty.value, &pairs)?; + next_mut(dst).write(ValRaw::i64(ptr as i64)); + next_mut(dst).write(ValRaw::i64(len as i64)); + Ok(()) + } + (InterfaceType::Map(_), _) => unexpected(ty, self), (InterfaceType::Record(ty), Val::Record(values)) => { let ty = &cx.types[ty]; if ty.fields.len() != values.len() { @@ -551,6 +579,15 @@ impl Val { Ok(()) } (InterfaceType::List(_), _) => unexpected(ty, self), + (InterfaceType::Map(ty_idx), Val::Map(values)) => { + let map_ty = &cx.types[ty_idx]; + let (ptr, len) = lower_map(cx, map_ty.key, map_ty.value, values)?; + // FIXME(#4311): needs memory64 handling + *cx.get(offset + 0) = u32::try_from(ptr).unwrap().to_le_bytes(); + *cx.get(offset + 4) = u32::try_from(len).unwrap().to_le_bytes(); + Ok(()) + } + (InterfaceType::Map(_), _) => unexpected(ty, self), (InterfaceType::Record(ty), Val::Record(values)) => { let ty = &cx.types[ty]; if ty.fields.len() != values.len() { @@ -662,6 +699,7 @@ impl Val { Val::Float64(_) => "f64", Val::Char(_) => "char", Val::List(_) => "list", + Val::Map(_) => "map", Val::String(_) => "string", Val::Record(_) => "record", Val::Enum(_) => "enum", @@ -736,6 +774,8 @@ impl PartialEq for Val { (Self::String(_), _) => false, (Self::List(l), Self::List(r)) => l == r, (Self::List(_), _) => false, + (Self::Map(l), Self::Map(r)) => l == r, + (Self::Map(_), _) => false, (Self::Record(l), Self::Record(r)) => l == r, (Self::Record(_), _) => false, (Self::Tuple(l), Self::Tuple(r)) => l == r, @@ -935,6 +975,57 @@ fn load_list(cx: &mut LiftContext<'_>, ty: TypeListIndex, ptr: usize, len: usize )) } +fn load_map(cx: &mut LiftContext<'_>, ty: TypeMapIndex, ptr: usize, len: usize) -> Result { + // Maps are stored as list> in canonical ABI + let map_ty = &cx.types[ty]; + let key_ty = map_ty.key; + let value_ty = map_ty.value; + + // Calculate tuple layout using canonical ABI alignment rules + let key_abi = cx.types.canonical_abi(&key_ty); + let value_abi = cx.types.canonical_abi(&value_ty); + let key_size = usize::try_from(key_abi.size32).unwrap(); + let value_size = usize::try_from(value_abi.size32).unwrap(); + + // Calculate value offset: align key_size to value alignment + let mut offset = u32::try_from(key_size).unwrap(); + let value_offset = value_abi.next_field32(&mut offset); + let value_offset = usize::try_from(value_offset).unwrap(); + + // Tuple size is the final offset aligned to max alignment + let tuple_alignment = key_abi.align32.max(value_abi.align32); + let tuple_size = usize::try_from(offset).unwrap(); + let tuple_size = (tuple_size + usize::try_from(tuple_alignment)? - 1) + & !(usize::try_from(tuple_alignment)? - 1); + + // Bounds check + match len + .checked_mul(tuple_size) + .and_then(|len| ptr.checked_add(len)) + { + Some(n) if n <= cx.memory().len() => {} + _ => bail!("map pointer/length out of bounds of memory"), + } + if ptr % usize::try_from(tuple_alignment)? != 0 { + bail!("map pointer is not aligned") + } + + // Load each tuple (key, value) into a Vec + let mut map = Vec::with_capacity(len); + for index in 0..len { + let tuple_ptr = ptr + (index * tuple_size); + let key = Val::load(cx, key_ty, &cx.memory()[tuple_ptr..][..key_size])?; + let value = Val::load( + cx, + value_ty, + &cx.memory()[tuple_ptr + value_offset..][..value_size], + )?; + map.push((key, value)); + } + + Ok(Val::Map(map)) +} + fn load_variant( cx: &mut LiftContext<'_>, info: &VariantInfo, @@ -1025,6 +1116,47 @@ fn lower_list( Ok((ptr, items.len())) } +/// Lower a map as list> with the specified key and value types. +fn lower_map( + cx: &mut LowerContext<'_, T>, + key_type: InterfaceType, + value_type: InterfaceType, + pairs: &[(Val, Val)], +) -> Result<(usize, usize)> { + // Calculate tuple layout using canonical ABI alignment rules + let key_abi = cx.types.canonical_abi(&key_type); + let value_abi = cx.types.canonical_abi(&value_type); + let key_size = usize::try_from(key_abi.size32)?; + + // Calculate value offset: align key_size to value alignment + let mut offset = u32::try_from(key_size).unwrap(); + let value_offset = value_abi.next_field32(&mut offset); + let value_offset = usize::try_from(value_offset).unwrap(); + + // Tuple size is the final offset aligned to max alignment + let tuple_align = key_abi.align32.max(value_abi.align32); + let tuple_size = usize::try_from(offset).unwrap(); + let tuple_size = + (tuple_size + usize::try_from(tuple_align)? - 1) & !(usize::try_from(tuple_align)? - 1); + + let size = pairs + .len() + .checked_mul(tuple_size) + .ok_or_else(|| anyhow::anyhow!("size overflow copying a map"))?; + let ptr = cx.realloc(0, 0, tuple_align, size)?; + + let mut tuple_ptr = ptr; + for (key, value) in pairs { + // Store key at tuple_ptr + key.store(cx, key_type, tuple_ptr)?; + // Store value at tuple_ptr + value_offset (properly aligned) + value.store(cx, value_type, tuple_ptr + value_offset)?; + tuple_ptr += tuple_size; + } + + Ok((ptr, pairs.len())) +} + fn push_flags(ty: &TypeFlags, flags: &mut Vec, mut offset: u32, mut bits: u32) { while bits > 0 { if bits & 1 != 0 { diff --git a/crates/wasmtime/src/runtime/wave/component.rs b/crates/wasmtime/src/runtime/wave/component.rs index 9849bb455bf6..cc3e8c1b7c2a 100644 --- a/crates/wasmtime/src/runtime/wave/component.rs +++ b/crates/wasmtime/src/runtime/wave/component.rs @@ -45,7 +45,8 @@ impl WasmType for component::Type { | Self::Borrow(_) | Self::Stream(_) | Self::Future(_) - | Self::ErrorContext => WasmTypeKind::Unsupported, + | Self::ErrorContext + | Self::Map(_) => WasmTypeKind::Unsupported, } } @@ -138,9 +139,11 @@ impl WasmValue for component::Val { Self::Option(_) => WasmTypeKind::Option, Self::Result(_) => WasmTypeKind::Result, Self::Flags(_) => WasmTypeKind::Flags, - Self::Resource(_) | Self::Stream(_) | Self::Future(_) | Self::ErrorContext(_) => { - WasmTypeKind::Unsupported - } + Self::Resource(_) + | Self::Stream(_) + | Self::Future(_) + | Self::ErrorContext(_) + | Self::Map(_) => WasmTypeKind::Unsupported, } } diff --git a/crates/wast/src/component.rs b/crates/wast/src/component.rs index c2fcc932f8b0..0e3052f0c0cf 100644 --- a/crates/wast/src/component.rs +++ b/crates/wast/src/component.rs @@ -290,6 +290,7 @@ fn mismatch(expected: &ComponentConst<'_>, actual: &Val) -> Result<()> { Val::Future(..) => "future", Val::Stream(..) => "stream", Val::ErrorContext(..) => "error-context", + Val::Map(..) => "map", }; bail!("expected `{expected}` got `{actual}`") } diff --git a/crates/wit-bindgen/src/lib.rs b/crates/wit-bindgen/src/lib.rs index 621a089fde80..4a6b1a46dbb4 100644 --- a/crates/wit-bindgen/src/lib.rs +++ b/crates/wit-bindgen/src/lib.rs @@ -1625,6 +1625,7 @@ impl<'a> InterfaceGenerator<'a> { TypeDefKind::Stream(t) => self.type_stream(id, name, t.as_ref(), &ty.docs), TypeDefKind::Handle(handle) => self.type_handle(id, name, handle, &ty.docs), TypeDefKind::Resource => self.type_resource(id, name, ty, &ty.docs), + TypeDefKind::Map(k, v) => self.type_map(id, name, k, v, &ty.docs), TypeDefKind::Unknown => unreachable!(), TypeDefKind::FixedSizeList(..) => todo!(), } @@ -2195,6 +2196,22 @@ impl<'a> InterfaceGenerator<'a> { } } + fn type_map(&mut self, id: TypeId, _name: &str, key: &Type, value: &Type, docs: &Docs) { + let info = self.info(id); + for (name, mode) in self.modes_of(id) { + let lt = self.lifetime_for(&info, mode); + self.rustdoc(docs); + self.push_str(&format!("pub type {name}")); + self.print_generics(lt); + self.push_str(" = "); + let key_ty = self.ty(key, mode); + let value_ty = self.ty(value, mode); + self.push_str(&format!("std::collections::HashMap<{key_ty}, {value_ty}>")); + self.push_str(";\n"); + self.assert_type(id, &name); + } + } + fn type_stream(&mut self, id: TypeId, name: &str, ty: Option<&Type>, docs: &Docs) { self.rustdoc(docs); self.push_str(&format!("pub type {name}")); @@ -3415,6 +3432,9 @@ fn type_contains_lists(ty: Type, resolve: &Resolve) -> bool { .any(|case| option_type_contains_lists(case.ty, resolve)), TypeDefKind::Type(ty) => type_contains_lists(*ty, resolve), TypeDefKind::List(_) => true, + TypeDefKind::Map(k, v) => { + type_contains_lists(*k, resolve) || type_contains_lists(*v, resolve) + } TypeDefKind::FixedSizeList(..) => todo!(), }, diff --git a/crates/wit-bindgen/src/rust.rs b/crates/wit-bindgen/src/rust.rs index e2b6383379bd..48e9a4a2ddf6 100644 --- a/crates/wit-bindgen/src/rust.rs +++ b/crates/wit-bindgen/src/rust.rs @@ -121,6 +121,7 @@ pub trait RustGenerator<'a> { | TypeDefKind::Future(_) | TypeDefKind::Stream(_) | TypeDefKind::List(_) + | TypeDefKind::Map(_, _) | TypeDefKind::Flags(_) | TypeDefKind::Enum(_) | TypeDefKind::Tuple(_) @@ -187,6 +188,11 @@ pub trait RustGenerator<'a> { TypeDefKind::Resource => unreachable!(), TypeDefKind::Type(t) => self.ty(t, mode), + TypeDefKind::Map(k, v) => { + let key = self.ty(k, mode); + let value = self.ty(v, mode); + format!("std::collections::HashMap<{key}, {value}>") + } TypeDefKind::Unknown => unreachable!(), TypeDefKind::FixedSizeList(..) => todo!(), } diff --git a/crates/wit-bindgen/src/types.rs b/crates/wit-bindgen/src/types.rs index a1f6920ff435..d96357cec26d 100644 --- a/crates/wit-bindgen/src/types.rs +++ b/crates/wit-bindgen/src/types.rs @@ -144,6 +144,11 @@ impl Types { info = self.type_info(resolve, ty); info.has_list = true; } + TypeDefKind::Map(k, v) => { + info = self.type_info(resolve, k); + info |= self.type_info(resolve, v); + info.has_list = true; + } TypeDefKind::Type(ty) | TypeDefKind::Option(ty) => { info = self.type_info(resolve, ty); } diff --git a/crates/wizer/src/parse.rs b/crates/wizer/src/parse.rs index 1e84b8d12339..bc255b5be0a8 100644 --- a/crates/wizer/src/parse.rs +++ b/crates/wizer/src/parse.rs @@ -50,7 +50,7 @@ fn import_section<'a>( imports: wasmparser::ImportSectionReader<'a>, ) -> anyhow::Result<()> { // Check that we can properly handle all imports. - for imp in imports { + for imp in imports.into_imports() { let imp = imp?; if imp.module.starts_with("__wizer_") || imp.name.starts_with("__wizer_") { diff --git a/tests/all/component_model.rs b/tests/all/component_model.rs index 87d85aaf015e..b8c3d0e037ae 100644 --- a/tests/all/component_model.rs +++ b/tests/all/component_model.rs @@ -3,7 +3,7 @@ use std::fmt::Write; use std::iter; use wasmtime::component::Component; use wasmtime_component_util::REALLOC_AND_FREE; -use wasmtime_test_util::component::{TypedFuncExt, async_engine, engine}; +use wasmtime_test_util::component::{FuncExt, TypedFuncExt, async_engine, engine}; mod aot; mod r#async; diff --git a/tests/all/component_model/dynamic.rs b/tests/all/component_model/dynamic.rs index 8ca9cd273c48..5adc6ef7d39c 100644 --- a/tests/all/component_model/dynamic.rs +++ b/tests/all/component_model/dynamic.rs @@ -143,6 +143,347 @@ fn lists() -> Result<()> { Ok(()) } +#[test] +fn maps() -> Result<()> { + let engine = super::engine(); + let mut store = Store::new(&engine, ()); + + let component = Component::new(&engine, make_echo_component("(map u32 string)", 8))?; + let instance = Linker::new(&engine).instantiate(&mut store, &component)?; + let func = instance.get_func(&mut store, "echo").unwrap(); + + let input_map = vec![ + (Val::U32(1), Val::String("one".into())), + (Val::U32(2), Val::String("two".into())), + (Val::U32(3), Val::String("three".into())), + ]; + let input = Val::Map(input_map); + + let mut output = [Val::Bool(false)]; + func.call_and_post_return(&mut store, &[input.clone()], &mut output)?; + + // Maps should round-trip correctly + match &output[0] { + Val::Map(output_map) => { + assert_eq!(output_map.len(), 3); + assert!( + output_map + .iter() + .any(|(k, v)| *k == Val::U32(1) && *v == Val::String("one".into())) + ); + assert!( + output_map + .iter() + .any(|(k, v)| *k == Val::U32(2) && *v == Val::String("two".into())) + ); + assert!( + output_map + .iter() + .any(|(k, v)| *k == Val::U32(3) && *v == Val::String("three".into())) + ); + } + _ => panic!("expected map"), + } + + // Sad path: type mismatch (wrong key type) + // Need to create a fresh instance because errors can leave the instance in a bad state + let mut store2 = Store::new(&engine, ()); + let instance2 = Linker::new(&engine).instantiate(&mut store2, &component)?; + let func2 = instance2.get_func(&mut store2, "echo").unwrap(); + + let err_map = vec![(Val::String("key".into()), Val::String("value".into()))]; + let err = Val::Map(err_map); + let err = func2 + .call_and_post_return(&mut store2, &[err], &mut output) + .unwrap_err(); + assert!(err.to_string().contains("type mismatch"), "{err}"); + + // Sad path: type mismatch (wrong value type) + let mut store3 = Store::new(&engine, ()); + let instance3 = Linker::new(&engine).instantiate(&mut store3, &component)?; + let func3 = instance3.get_func(&mut store3, "echo").unwrap(); + + let err_map2 = vec![(Val::U32(1), Val::U32(42))]; + let err = Val::Map(err_map2); + let err = func3 + .call_and_post_return(&mut store3, &[err], &mut output) + .unwrap_err(); + assert!(err.to_string().contains("type mismatch"), "{err}"); + + // Test empty map + let empty_map = vec![]; + let input = Val::Map(empty_map); + func.call_and_post_return(&mut store, &[input.clone()], &mut output)?; + match &output[0] { + Val::Map(output_map) => assert_eq!(output_map.len(), 0), + _ => panic!("expected map"), + } + + Ok(()) +} + +#[test] +fn maps_complex_types() -> Result<()> { + let engine = super::engine(); + let mut store = Store::new(&engine, ()); + + // Test map> + let component = Component::new(&engine, make_echo_component("(map string (list u32))", 8))?; + let instance = Linker::new(&engine).instantiate(&mut store, &component)?; + let func = instance.get_func(&mut store, "echo").unwrap(); + + let input_map = vec![ + ( + Val::String("first".into()), + Val::List(vec![Val::U32(1), Val::U32(2), Val::U32(3)]), + ), + ( + Val::String("second".into()), + Val::List(vec![Val::U32(4), Val::U32(5)]), + ), + ]; + let input = Val::Map(input_map); + + let mut output = [Val::Bool(false)]; + func.call_and_post_return(&mut store, &[input.clone()], &mut output)?; + + // Verify round-trip + match &output[0] { + Val::Map(output_map) => { + assert_eq!(output_map.len(), 2); + // Check first entry + let first_entry = output_map + .iter() + .find(|(k, _)| *k == Val::String("first".into())); + match first_entry { + Some((_, Val::List(list))) => { + assert_eq!(list.len(), 3); + assert_eq!(list[0], Val::U32(1)); + assert_eq!(list[1], Val::U32(2)); + assert_eq!(list[2], Val::U32(3)); + } + _ => panic!("expected list"), + } + // Check second entry + let second_entry = output_map + .iter() + .find(|(k, _)| *k == Val::String("second".into())); + match second_entry { + Some((_, Val::List(list))) => { + assert_eq!(list.len(), 2); + assert_eq!(list[0], Val::U32(4)); + assert_eq!(list[1], Val::U32(5)); + } + _ => panic!("expected list"), + } + } + _ => panic!("expected map"), + } + + Ok(()) +} + +#[test] +fn maps_equality() -> Result<()> { + let map1 = vec![ + (Val::U32(1), Val::String("one".into())), + (Val::U32(2), Val::String("two".into())), + ]; + + let map2 = vec![ + (Val::U32(1), Val::String("one".into())), + (Val::U32(2), Val::String("two".into())), + ]; + + // Maps with same content in same order should be equal + assert_eq!(Val::Map(map1.clone()), Val::Map(map2)); + + // Different values should not be equal + let map3 = vec![ + (Val::U32(1), Val::String("different".into())), + (Val::U32(2), Val::String("two".into())), + ]; + assert_ne!(Val::Map(map1.clone()), Val::Map(map3)); + + // Different keys should not be equal + let map4 = vec![ + (Val::U32(3), Val::String("one".into())), + (Val::U32(2), Val::String("two".into())), + ]; + assert_ne!(Val::Map(map1), Val::Map(map4)); + + // Empty maps should be equal + let empty1: Vec<(Val, Val)> = vec![]; + let empty2: Vec<(Val, Val)> = vec![]; + assert_eq!(Val::Map(empty1), Val::Map(empty2)); + + Ok(()) +} + +#[test] +fn maps_duplicate_keys() -> Result<()> { + let engine = super::engine(); + let mut store = Store::new(&engine, ()); + + let component = Component::new(&engine, make_echo_component("(map u32 string)", 8))?; + let instance = Linker::new(&engine).instantiate(&mut store, &component)?; + let func = instance.get_func(&mut store, "echo").unwrap(); + + // Create a map with duplicate keys - Vec preserves all entries + let input_map = vec![ + (Val::U32(1), Val::String("first".into())), + (Val::U32(1), Val::String("last".into())), // Duplicate key + (Val::U32(2), Val::String("two".into())), + ]; + let input = Val::Map(input_map); + + let mut output = [Val::Bool(false)]; + func.call_and_post_return(&mut store, &[input.clone()], &mut output)?; + + // Verify all entries are preserved (Vec doesn't deduplicate) + match &output[0] { + Val::Map(output_map) => { + // Should have 3 entries (Vec preserves duplicates) + assert_eq!(output_map.len(), 3); + } + _ => panic!("expected map"), + } + + Ok(()) +} + +#[test] +fn maps_all_primitive_types() -> Result<()> { + let engine = super::engine(); + let mut store = Store::new(&engine, ()); + + // Test map + let component = Component::new(&engine, make_echo_component("(map u32 u32)", 8))?; + let instance = Linker::new(&engine).instantiate(&mut store, &component)?; + let func = instance.get_func(&mut store, "echo").unwrap(); + + let input_map = vec![(Val::U32(1), Val::U32(100)), (Val::U32(2), Val::U32(200))]; + let input = Val::Map(input_map); + + let mut output = [Val::Bool(false)]; + func.call_and_post_return(&mut store, &[input.clone()], &mut output)?; + assert_eq!(input, output[0]); + + // Test map + let component = Component::new(&engine, make_echo_component("(map string u32)", 8))?; + let instance = Linker::new(&engine).instantiate(&mut store, &component)?; + let func = instance.get_func(&mut store, "echo").unwrap(); + + let input_map = vec![ + (Val::String("one".into()), Val::U32(1)), + (Val::String("two".into()), Val::U32(2)), + ]; + let input = Val::Map(input_map); + + func.call_and_post_return(&mut store, &[input.clone()], &mut output)?; + assert_eq!(input, output[0]); + + Ok(()) +} + +#[test] +fn maps_alignment() -> Result<()> { + let engine = super::engine(); + let mut store = Store::new(&engine, ()); + + // Test map - key_size=1, value_align=8 + // This would fail with the alignment bug because value would be at offset 1 instead of 8 + let component = Component::new(&engine, make_echo_component("(map u8 u64)", 8))?; + let instance = Linker::new(&engine).instantiate(&mut store, &component)?; + let func = instance.get_func(&mut store, "echo").unwrap(); + + let input_map = vec![ + (Val::U8(1), Val::U64(100)), + (Val::U8(2), Val::U64(200)), + (Val::U8(3), Val::U64(300)), + ]; + let input = Val::Map(input_map); + + let mut output = [Val::Bool(false)]; + func.call_and_post_return(&mut store, &[input.clone()], &mut output)?; + assert_eq!(input, output[0]); + + // Test map - key_size=4, value_align=8 + // This would fail with the alignment bug because value would be at offset 4 instead of 8 + let component = Component::new(&engine, make_echo_component("(map u32 u64)", 8))?; + let instance = Linker::new(&engine).instantiate(&mut store, &component)?; + let func = instance.get_func(&mut store, "echo").unwrap(); + + let input_map = vec![(Val::U32(1), Val::U64(1000)), (Val::U32(2), Val::U64(2000))]; + let input = Val::Map(input_map); + + func.call_and_post_return(&mut store, &[input.clone()], &mut output)?; + assert_eq!(input, output[0]); + + // Test map - key_size=1, value_align=4 + // This would fail with the alignment bug because value would be at offset 1 instead of 4 + let component = Component::new(&engine, make_echo_component("(map u8 u32)", 8))?; + let instance = Linker::new(&engine).instantiate(&mut store, &component)?; + let func = instance.get_func(&mut store, "echo").unwrap(); + + let input_map = vec![(Val::U8(10), Val::U32(100)), (Val::U8(20), Val::U32(200))]; + let input = Val::Map(input_map); + + func.call_and_post_return(&mut store, &[input.clone()], &mut output)?; + assert_eq!(input, output[0]); + + // Test map - key_size=2, value_align=8 + // This would fail with the alignment bug because value would be at offset 2 instead of 8 + let component = Component::new(&engine, make_echo_component("(map u16 u64)", 8))?; + let instance = Linker::new(&engine).instantiate(&mut store, &component)?; + let func = instance.get_func(&mut store, "echo").unwrap(); + + let input_map = vec![ + (Val::U16(1), Val::U64(10000)), + (Val::U16(2), Val::U64(20000)), + ]; + let input = Val::Map(input_map); + + func.call_and_post_return(&mut store, &[input.clone()], &mut output)?; + assert_eq!(input, output[0]); + + Ok(()) +} + +#[test] +fn maps_large() -> Result<()> { + let engine = super::engine(); + let mut store = Store::new(&engine, ()); + + let component = Component::new(&engine, make_echo_component("(map u32 string)", 8))?; + let instance = Linker::new(&engine).instantiate(&mut store, &component)?; + let func = instance.get_func(&mut store, "echo").unwrap(); + + // Create a map with many entries + let input_map: Vec<(Val, Val)> = (0..100) + .map(|i| (Val::U32(i), Val::String(format!("value_{i}")))) + .collect(); + let input = Val::Map(input_map); + + let mut output = [Val::Bool(false)]; + func.call_and_post_return(&mut store, &[input.clone()], &mut output)?; + + // Verify all entries are present + match &output[0] { + Val::Map(output_map) => { + assert_eq!(output_map.len(), 100); + for i in 0..100 { + assert!(output_map.iter().any(|(k, v)| { + *k == Val::U32(i) && *v == Val::String(format!("value_{i}")) + })); + } + } + _ => panic!("expected map"), + } + + Ok(()) +} + #[test] fn records() -> Result<()> { let engine = super::engine(); diff --git a/tests/all/component_model/func.rs b/tests/all/component_model/func.rs index 3e3d6f964edc..e65d250ed728 100644 --- a/tests/all/component_model/func.rs +++ b/tests/all/component_model/func.rs @@ -1,6 +1,6 @@ #![cfg(not(miri))] -use super::{REALLOC_AND_FREE, TypedFuncExt}; +use super::{FuncExt, REALLOC_AND_FREE, TypedFuncExt}; use anyhow::Result; use std::sync::Arc; use wasmtime::component::*; @@ -3316,3 +3316,288 @@ fn run_export_with_internal_adapter() -> Result<()> { assert_eq!(run.call(&mut store, ())?, (5,)); Ok(()) } + +/// Tests map types with misaligned key/value combinations through the adapter +/// trampoline (component-to-component translation). +/// +/// This specifically tests the alignment bug where the value offset was +/// calculated as `key_size` instead of `align(key_size, value_align)`. +/// For map, the value should be at offset 8 (not 1). +/// +/// NOTE: This test currently demonstrates that the adapter trampoline +/// compilation fails for map types with certain key/value combinations. +/// This is a known issue that needs to be fixed in trampoline.rs. +#[test] +#[ignore] // TODO: Fix trampoline alignment bug first +fn map_trampoline_alignment() -> Result<()> { + // Test map - key_size=1, value_align=8 + // With the alignment bug, value would be read/written at offset 1 instead of 8 + let component = format!( + r#" +(component + (import "host" (func $host (param "m" (map u8 u64)) (result (map u8 u64)))) + + ;; Component A: the "destination" that receives and echoes back + (component $dst + (import "echo" (func $echo (param "m" (map u8 u64)) (result (map u8 u64)))) + (core module $libc + (memory (export "memory") 1) + {REALLOC_AND_FREE} + ) + (core module $echo_mod + (import "" "echo" (func $echo (param i32 i32 i32))) + (import "libc" "memory" (memory 0)) + (import "libc" "realloc" (func $realloc (param i32 i32 i32 i32) (result i32))) + + (func (export "echo") (param i32 i32) (result i32) + (local $retptr i32) + (local.set $retptr + (call $realloc (i32.const 0) (i32.const 0) (i32.const 4) (i32.const 8))) + (call $echo (local.get 0) (local.get 1) (local.get $retptr)) + local.get $retptr + ) + ) + (core instance $libc (instantiate $libc)) + (core func $echo_lower (canon lower (func $echo) + (memory $libc "memory") + (realloc (func $libc "realloc")) + )) + (core instance $echo_inst (instantiate $echo_mod + (with "libc" (instance $libc)) + (with "" (instance (export "echo" (func $echo_lower)))) + )) + (func (export "echo2") (param "m" (map u8 u64)) (result (map u8 u64)) + (canon lift + (core func $echo_inst "echo") + (memory $libc "memory") + (realloc (func $libc "realloc")) + ) + ) + ) + + ;; Component B: the "source" that calls dst + (component $src + (import "echo" (func $echo (param "m" (map u8 u64)) (result (map u8 u64)))) + (core module $libc + (memory (export "memory") 1) + {REALLOC_AND_FREE} + ) + (core module $echo_mod + (import "" "echo" (func $echo (param i32 i32 i32))) + (import "libc" "memory" (memory 0)) + (import "libc" "realloc" (func $realloc (param i32 i32 i32 i32) (result i32))) + + (func (export "echo") (param i32 i32) (result i32) + (local $retptr i32) + (local.set $retptr + (call $realloc (i32.const 0) (i32.const 0) (i32.const 4) (i32.const 8))) + (call $echo (local.get 0) (local.get 1) (local.get $retptr)) + local.get $retptr + ) + ) + (core instance $libc (instantiate $libc)) + (core func $echo_lower (canon lower (func $echo) + (memory $libc "memory") + (realloc (func $libc "realloc")) + )) + (core instance $echo_inst (instantiate $echo_mod + (with "libc" (instance $libc)) + (with "" (instance (export "echo" (func $echo_lower)))) + )) + (func (export "echo2") (param "m" (map u8 u64)) (result (map u8 u64)) + (canon lift + (core func $echo_inst "echo") + (memory $libc "memory") + (realloc (func $libc "realloc")) + ) + ) + ) + + ;; Wire: host -> dst -> src creates adapter trampolines between components + (instance $dst (instantiate $dst (with "echo" (func $host)))) + (instance $src (instantiate $src (with "echo" (func $dst "echo2")))) + (export "echo" (func $src "echo2")) +) +"# + ); + + let mut config = Config::new(); + config.wasm_component_model(true); + config.wasm_component_model_map(true); + let engine = Engine::new(&config)?; + let component = Component::new(&engine, component)?; + + let mut store = Store::new(&engine, ()); + let mut linker = Linker::new(&engine); + + // Use dynamic API since typed API doesn't support map types yet + linker.root().func_new("host", |_cx, _ty, args, results| { + // Echo the map back + results[0] = args[0].clone(); + Ok(()) + })?; + + let instance = linker.instantiate(&mut store, &component)?; + let func = instance.get_func(&mut store, "echo").unwrap(); + + // Test with distinctive values that would be corrupted by misaligned reads + let test_data = vec![ + (Val::U8(1), Val::U64(0x0102030405060708)), + (Val::U8(2), Val::U64(0x1112131415161718)), + (Val::U8(255), Val::U64(0xFFFFFFFFFFFFFFFF)), + ]; + let input = Val::Map(test_data.clone()); + + let mut results = [Val::Bool(false)]; + func.call_and_post_return(&mut store, &[input], &mut results)?; + + // Verify the data round-tripped correctly + match &results[0] { + Val::Map(output) => { + assert_eq!(output.len(), 3); + for (key, value) in &test_data { + assert!( + output.iter().any(|(k, v)| k == key && v == value), + "Missing or corrupted entry" + ); + } + } + _ => panic!("expected map"), + } + + Ok(()) +} + +/// Tests map alignment through trampoline +#[test] +#[ignore] // TODO: Fix trampoline alignment bug first +fn map_trampoline_alignment_u32_u64() -> Result<()> { + // Test map - key_size=4, value_align=8 + // With the alignment bug, value would be read/written at offset 4 instead of 8 + let component = format!( + r#" +(component + (import "host" (func $host (param "m" (map u32 u64)) (result (map u32 u64)))) + + (component $dst + (import "echo" (func $echo (param "m" (map u32 u64)) (result (map u32 u64)))) + (core module $libc + (memory (export "memory") 1) + {REALLOC_AND_FREE} + ) + (core module $echo_mod + (import "" "echo" (func $echo (param i32 i32 i32))) + (import "libc" "memory" (memory 0)) + (import "libc" "realloc" (func $realloc (param i32 i32 i32 i32) (result i32))) + + (func (export "echo") (param i32 i32) (result i32) + (local $retptr i32) + (local.set $retptr + (call $realloc (i32.const 0) (i32.const 0) (i32.const 4) (i32.const 8))) + (call $echo (local.get 0) (local.get 1) (local.get $retptr)) + local.get $retptr + ) + ) + (core instance $libc (instantiate $libc)) + (core func $echo_lower (canon lower (func $echo) + (memory $libc "memory") + (realloc (func $libc "realloc")) + )) + (core instance $echo_inst (instantiate $echo_mod + (with "libc" (instance $libc)) + (with "" (instance (export "echo" (func $echo_lower)))) + )) + (func (export "echo2") (param "m" (map u32 u64)) (result (map u32 u64)) + (canon lift + (core func $echo_inst "echo") + (memory $libc "memory") + (realloc (func $libc "realloc")) + ) + ) + ) + + (component $src + (import "echo" (func $echo (param "m" (map u32 u64)) (result (map u32 u64)))) + (core module $libc + (memory (export "memory") 1) + {REALLOC_AND_FREE} + ) + (core module $echo_mod + (import "" "echo" (func $echo (param i32 i32 i32))) + (import "libc" "memory" (memory 0)) + (import "libc" "realloc" (func $realloc (param i32 i32 i32 i32) (result i32))) + + (func (export "echo") (param i32 i32) (result i32) + (local $retptr i32) + (local.set $retptr + (call $realloc (i32.const 0) (i32.const 0) (i32.const 4) (i32.const 8))) + (call $echo (local.get 0) (local.get 1) (local.get $retptr)) + local.get $retptr + ) + ) + (core instance $libc (instantiate $libc)) + (core func $echo_lower (canon lower (func $echo) + (memory $libc "memory") + (realloc (func $libc "realloc")) + )) + (core instance $echo_inst (instantiate $echo_mod + (with "libc" (instance $libc)) + (with "" (instance (export "echo" (func $echo_lower)))) + )) + (func (export "echo2") (param "m" (map u32 u64)) (result (map u32 u64)) + (canon lift + (core func $echo_inst "echo") + (memory $libc "memory") + (realloc (func $libc "realloc")) + ) + ) + ) + + (instance $dst (instantiate $dst (with "echo" (func $host)))) + (instance $src (instantiate $src (with "echo" (func $dst "echo2")))) + (export "echo" (func $src "echo2")) +) +"# + ); + + let mut config = Config::new(); + config.wasm_component_model(true); + config.wasm_component_model_map(true); + let engine = Engine::new(&config)?; + let component = Component::new(&engine, component)?; + + let mut store = Store::new(&engine, ()); + let mut linker = Linker::new(&engine); + + linker.root().func_new("host", |_cx, _ty, args, results| { + results[0] = args[0].clone(); + Ok(()) + })?; + + let instance = linker.instantiate(&mut store, &component)?; + let func = instance.get_func(&mut store, "echo").unwrap(); + + let test_data = vec![ + (Val::U32(1), Val::U64(0x0102030405060708)), + (Val::U32(2), Val::U64(0x1112131415161718)), + ]; + let input = Val::Map(test_data.clone()); + + let mut results = [Val::Bool(false)]; + func.call_and_post_return(&mut store, &[input], &mut results)?; + + match &results[0] { + Val::Map(output) => { + assert_eq!(output.len(), 2); + for (key, value) in &test_data { + assert!( + output.iter().any(|(k, v)| k == key && v == value), + "Missing or corrupted entry" + ); + } + } + _ => panic!("expected map"), + } + + Ok(()) +} diff --git a/tests/misc_testsuite/component-model/types.wast b/tests/misc_testsuite/component-model/types.wast index 9596ebe6eece..701f13d5a3c8 100644 --- a/tests/misc_testsuite/component-model/types.wast +++ b/tests/misc_testsuite/component-model/types.wast @@ -1,3 +1,5 @@ +;;! component_model_map = true + (component (type string) (type (func (param "a" string))) @@ -19,6 +21,10 @@ (type $errno (enum "a" "b" "e")) (type (list $errno)) + (type (map u32 string)) + (type (map string u32)) + (type (map u32 u32)) + (type (map string (map u32 string))) (type $oflags (flags "read" "write" "exclusive")) (type (tuple $oflags $errno $r))