diff --git a/Cargo.lock b/Cargo.lock index 2186c29..23c1b47 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,15 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" -dependencies = [ - "gimli 0.29.0", -] +version = 4 [[package]] name = "addr2line" @@ -17,7 +8,7 @@ version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ - "gimli 0.31.1", + "gimli", ] [[package]] @@ -26,18 +17,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - [[package]] name = "aho-corasick" version = "1.1.3" @@ -47,6 +26,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + [[package]] name = "ambient-authority" version = "0.0.2" @@ -113,18 +98,18 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.91" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" +checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" dependencies = [ "backtrace", ] [[package]] name = "arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" [[package]] name = "assert_cmd" @@ -153,6 +138,18 @@ dependencies = [ "syn", ] +[[package]] +name = "auditable-serde" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7bf8143dfc3c0258df908843e169b5cc5fcf76c7718bd66135ef4a9cd558c5" +dependencies = [ + "semver", + "serde", + "serde_json", + "topological-sort", +] + [[package]] name = "autocfg" version = "1.4.0" @@ -165,7 +162,7 @@ version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ - "addr2line 0.24.2", + "addr2line", "cfg-if", "libc", "miniz_oxide", @@ -244,6 +241,9 @@ name = "bumpalo" version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +dependencies = [ + "allocator-api2", +] [[package]] name = "byteorder" @@ -259,21 +259,21 @@ checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" [[package]] name = "cap-fs-ext" -version = "3.3.0" +version = "3.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712695628f77a28acd7c9135b9f05f9c1563f8eb91b317f63876bac550032403" +checksum = "7f78efdd7378980d79c0f36b519e51191742d2c9f91ffa5e228fba9f3806d2e1" dependencies = [ "cap-primitives", "cap-std", "io-lifetimes", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "cap-net-ext" -version = "3.3.0" +version = "3.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d609980992759cef960324ccece956ee87929cc05a75d6546168192063dd8b1" +checksum = "4ac68674a6042af2bcee1adad9f6abd432642cf03444ce3a5b36c3f39f23baf8" dependencies = [ "cap-primitives", "cap-std", @@ -283,9 +283,9 @@ dependencies = [ [[package]] name = "cap-primitives" -version = "3.3.0" +version = "3.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff5bcbaf57897c8f14098cc9ad48a78052930a9948119eea01b80ca224070fa6" +checksum = "8fc15faeed2223d8b8e8cc1857f5861935a06d06713c4ac106b722ae9ce3c369" dependencies = [ "ambient-authority", "fs-set-times", @@ -294,15 +294,15 @@ dependencies = [ "ipnet", "maybe-owned", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", "winx", ] [[package]] name = "cap-rand" -version = "3.3.0" +version = "3.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c780812948b31f362c3bab82d23b902529c26705d0e094888bc7fdb9656908" +checksum = "dea13372b49df066d1ae654e5c6e41799c1efd9f6b36794b921e877ea4037977" dependencies = [ "ambient-authority", "rand", @@ -310,9 +310,9 @@ dependencies = [ [[package]] name = "cap-std" -version = "3.3.0" +version = "3.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6cf1a22e6eab501e025a9953532b1e95efb8a18d6364bf8a4a7547b30c49186" +checksum = "c3dbd3e8e8d093d6ccb4b512264869e1281cdb032f7940bd50b2894f96f25609" dependencies = [ "cap-primitives", "io-extras", @@ -322,9 +322,9 @@ dependencies = [ [[package]] name = "cap-time-ext" -version = "3.3.0" +version = "3.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e1547a95cd071db92382c649260bcc6721879ef5d1f0f442af33bff75003dd7" +checksum = "bd736b20fc033f564a1995fb82fc349146de43aabba19c7368b4cb17d8f9ea53" dependencies = [ "ambient-authority", "cap-primitives", @@ -379,7 +379,7 @@ version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "syn", @@ -406,14 +406,14 @@ checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "component-init" version = "0.1.0" -source = "git+https://github.com/dicej/component-init?rev=6964d14#6964d14deeda3f60865f085f3806abfd5ddd501f" +source = "git+https://github.com/dicej/component-init?rev=2db53ece#2db53ecea9b398849bbb8cde5469aebd6be22c0d" dependencies = [ "anyhow", "async-trait", "futures", "wasm-convert", - "wasm-encoder 0.219.1", - "wasmparser 0.219.1", + "wasm-encoder 0.227.1", + "wasmparser 0.227.1", ] [[package]] @@ -431,7 +431,7 @@ dependencies = [ "componentize-py-shared", "fs_extra", "futures", - "heck 0.5.0", + "heck", "hex", "im-rc", "indexmap", @@ -449,12 +449,12 @@ dependencies = [ "toml", "wasi-common", "wasm-convert", - "wasm-encoder 0.219.1", - "wasmparser 0.219.1", + "wasm-encoder 0.227.1", + "wasmparser 0.227.1", "wasmtime", "wasmtime-wasi", "wit-component", - "wit-parser 0.219.1", + "wit-parser 0.227.1", "zstd", ] @@ -468,6 +468,7 @@ dependencies = [ "once_cell", "pyo3", "wit-bindgen", + "wit-bindgen-rt", ] [[package]] @@ -498,20 +499,35 @@ dependencies = [ "libc", ] +[[package]] +name = "cranelift-assembler-x64" +version = "0.117.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2b83fcf2fc1c8954561490d02079b496fd0c757da88129981e15bfe3a548229" +dependencies = [ + "cranelift-assembler-x64-meta", +] + +[[package]] +name = "cranelift-assembler-x64-meta" +version = "0.117.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7496a6e92b5cee48c5d772b0443df58816dee30fed6ba19b2a28e78037ecedf" + [[package]] name = "cranelift-bforest" -version = "0.112.2" +version = "0.117.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b765ed4349e66bedd9b88c7691da42e24c7f62067a6be17ddffa949367b6e17" +checksum = "73a9dc0a8d3d49ee772101924968830f1c1937d650c571d3c2dd69dc36a68f41" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-bitset" -version = "0.112.2" +version = "0.117.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eaa2aece6237198afd32bff57699e08d4dccb8d3902c214fc1e6ba907247ca4" +checksum = "573c641174c40ef31021ae4a5a3ad78974e280633502d0dfc6e362385e0c100f" dependencies = [ "serde", "serde_derive", @@ -519,11 +535,12 @@ dependencies = [ [[package]] name = "cranelift-codegen" -version = "0.112.2" +version = "0.117.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "351824439e59d42f0e4fa5aac1d13deded155120043565769e55cd4ad3ca8ed9" +checksum = "2d7c94d572615156f2db682181cadbd96342892c31e08cc26a757344319a9220" dependencies = [ "bumpalo", + "cranelift-assembler-x64", "cranelift-bforest", "cranelift-bitset", "cranelift-codegen-meta", @@ -531,44 +548,48 @@ dependencies = [ "cranelift-control", "cranelift-entity", "cranelift-isle", - "gimli 0.29.0", - "hashbrown 0.14.5", + "gimli", + "hashbrown", "log", + "pulley-interpreter", "regalloc2", "rustc-hash", + "serde", "smallvec", - "target-lexicon", + "target-lexicon 0.13.2", ] [[package]] name = "cranelift-codegen-meta" -version = "0.112.2" +version = "0.117.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a0ce0273d7a493ef8f31f606849a4e931c19187a4923f5f87fc1f2b13109981" +checksum = "beecd9fcf2c3e06da436d565de61a42676097ea6eb6b4499346ac6264b6bb9ce" dependencies = [ + "cranelift-assembler-x64", "cranelift-codegen-shared", + "pulley-interpreter", ] [[package]] name = "cranelift-codegen-shared" -version = "0.112.2" +version = "0.117.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f72016ac35579051913f4f07f6b36c509ed69412d852fd44c8e1d7b7fa6d92a" +checksum = "0f4ff8d2e1235f2d6e7fc3c6738be6954ba972cd295f09079ebffeca2f864e22" [[package]] name = "cranelift-control" -version = "0.112.2" +version = "0.117.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db28951d21512c4fd0554ef179bfb11e4eb6815062957a9173824eee5de0c46c" +checksum = "001312e9fbc7d9ca9517474d6fe71e29d07e52997fd7efe18f19e8836446ceb2" dependencies = [ "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.112.2" +version = "0.117.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14ebe592a2f81af9237cf9be29dd3854ecb72108cfffa59e85ef12389bf939e3" +checksum = "eb0fd6d4aae680275fcbceb08683416b744e65c8b607352043d3f0951d72b3b2" dependencies = [ "cranelift-bitset", "serde", @@ -577,47 +598,31 @@ dependencies = [ [[package]] name = "cranelift-frontend" -version = "0.112.2" +version = "0.117.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4437db9d60c7053ac91ded0802740c2ccf123ee6d6898dd906c34f8c530cd119" +checksum = "9fd44e7e5dcea20ca104d45894748205c51365ce4cdb18f4418e3ba955971d1b" dependencies = [ "cranelift-codegen", "log", "smallvec", - "target-lexicon", + "target-lexicon 0.13.2", ] [[package]] name = "cranelift-isle" -version = "0.112.2" +version = "0.117.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "230cb33572b9926e210f2ca28145f2bc87f389e1456560932168e2591feb65c1" +checksum = "f900e0a3847d51eed0321f0777947fb852ccfce0da7fb070100357f69a2f37fc" [[package]] name = "cranelift-native" -version = "0.112.2" +version = "0.117.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "364524ac7aef7070b1141478724abebeec297d4ea1e87ad8b8986465e91146d9" +checksum = "7617f13f392ebb63c5126258aca8b8eca739636ca7e4eeee301d3eff68489a6a" dependencies = [ "cranelift-codegen", "libc", - "target-lexicon", -] - -[[package]] -name = "cranelift-wasm" -version = "0.112.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0572cbd9d136a62c0f39837b6bce3b0978b96b8586794042bec0c214668fd6f5" -dependencies = [ - "cranelift-codegen", - "cranelift-entity", - "cranelift-frontend", - "itertools", - "log", - "smallvec", - "wasmparser 0.217.0", - "wasmtime-types", + "target-lexicon 0.13.2", ] [[package]] @@ -784,12 +789,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -827,6 +832,16 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "flate2" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11faaf5a5236997af9848be0bef4db95824b1d534ebc64d0f0c6cf3e67bd38dc" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + [[package]] name = "float-cmp" version = "0.9.0" @@ -1008,46 +1023,25 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" dependencies = [ "fallible-iterator", "indexmap", "stable_deref_trait", ] -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", - "serde", -] - [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" dependencies = [ "foldhash", + "serde", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" @@ -1133,12 +1127,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.6.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown", "serde", ] @@ -1150,12 +1144,12 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "io-extras" -version = "0.18.2" +version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9f046b9af244f13b3bd939f55d16830ac3a201e8a9ba9661bfcb03e2be72b9b" +checksum = "2285ddfe3054097ef4b2fe909ef8c3bcd1ea52a8f0d274416caebeef39f04a65" dependencies = [ "io-lifetimes", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1198,9 +1192,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "ittapi" @@ -1252,6 +1246,12 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + [[package]] name = "libc" version = "0.2.161" @@ -1328,9 +1328,9 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.8.0" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" dependencies = [ "adler2", ] @@ -1389,7 +1389,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "crc32fast", - "hashbrown 0.15.0", + "hashbrown", "indexmap", "memchr", ] @@ -1499,9 +1499,9 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.25" +version = "0.2.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +checksum = "f1ccf34da56fc294e7d4ccf69a85992b7dfb826b7cf57bac6a70bba3494cc08a" dependencies = [ "proc-macro2", "syn", @@ -1509,9 +1509,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.89" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" +checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" dependencies = [ "unicode-ident", ] @@ -1545,6 +1545,17 @@ dependencies = [ "cc", ] +[[package]] +name = "pulley-interpreter" +version = "30.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0ecb9823083f71df8735f21f6c44f2f2b55986d674802831df20f27e26c907" +dependencies = [ + "cranelift-bitset", + "log", + "wasmtime-math", +] + [[package]] name = "pyo3" version = "0.22.5" @@ -1571,7 +1582,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc38c5feeb496c8321091edf3d63e9a6829eab4b863b4a6a65f26f3e9cc6b179" dependencies = [ "once_cell", - "target-lexicon", + "target-lexicon 0.12.16", ] [[package]] @@ -1602,7 +1613,7 @@ version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae1e3f09eecd94618f60a455a23def79f79eba4dc561a97324bf9ac8c6df30ce" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "pyo3-build-config", "quote", @@ -1714,14 +1725,15 @@ dependencies = [ [[package]] name = "regalloc2" -version = "0.10.2" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12908dbeb234370af84d0579b9f68258a0f67e201412dd9a2814e6f45b2fc0f0" +checksum = "145c1c267e14f20fb0f88aa76a1c5ffec42d592c1d28b3cd9148ae35916158d3" dependencies = [ - "hashbrown 0.14.5", + "allocator-api2", + "bumpalo", + "hashbrown", "log", "rustc-hash", - "slice-group-by", "smallvec", ] @@ -1768,9 +1780,9 @@ checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ "bitflags", "errno", @@ -1778,7 +1790,7 @@ dependencies = [ "libc", "linux-raw-sys", "once_cell", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1810,18 +1822,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.213" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.213" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", @@ -1894,12 +1906,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "slice-group-by" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" - [[package]] name = "smallvec" version = "1.13.2" @@ -1948,9 +1954,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" -version = "2.0.85" +version = "2.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" +checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" dependencies = [ "proc-macro2", "quote", @@ -1990,6 +1996,12 @@ version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" +[[package]] +name = "target-lexicon" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a" + [[package]] name = "tempfile" version = "3.13.0" @@ -2124,6 +2136,12 @@ dependencies = [ "winnow", ] +[[package]] +name = "topological-sort" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea68304e134ecd095ac6c3574494fc62b909f416c4fca77e440530221e549d3d" + [[package]] name = "tracing" version = "0.1.40" @@ -2156,6 +2174,17 @@ dependencies = [ "once_cell", ] +[[package]] +name = "trait-variant" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70977707304198400eb4835a78f6a9f928bf41bba420deb8fdb175cd965d77a7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "typenum" version = "1.17.0" @@ -2191,9 +2220,9 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.14" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" [[package]] name = "unicode-xid" @@ -2253,9 +2282,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasi-common" -version = "25.0.2" +version = "30.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f1e63f999ecfdd96d64d35b39d0577318d9d2eae2d41603d4befda3b3dfe252" +checksum = "7f6fd843e80e63252198c08122b0a5889e384f5b0a0c172f3436017bc27c1915" dependencies = [ "anyhow", "bitflags", @@ -2267,14 +2296,13 @@ dependencies = [ "io-extras", "io-lifetimes", "log", - "once_cell", "rustix", "system-interface", "thiserror", "tracing", "wasmtime", "wiggle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2335,56 +2363,59 @@ checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-convert" version = "0.1.0" -source = "git+https://github.com/dicej/wasm-convert?rev=a42b419#a42b419ecee68ed24b06b77cee95d55183846e37" +source = "git+https://github.com/dicej/wasm-convert?rev=713e2d6a#713e2d6a724f33d94c2f3b88b759ad993608f12e" dependencies = [ - "wasm-encoder 0.219.1", - "wasmparser 0.219.1", + "wasm-encoder 0.227.1", + "wasmparser 0.227.1", ] [[package]] name = "wasm-encoder" -version = "0.217.0" +version = "0.224.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b88b0814c9a2b323a9b46c687e726996c255ac8b64aa237dd11c81ed4854760" +checksum = "1ab7a13a23790fe91ea4eb7526a1f3131001d874e3e00c2976c48861f2e82920" dependencies = [ "leb128", + "wasmparser 0.224.1", ] [[package]] name = "wasm-encoder" -version = "0.219.1" +version = "0.227.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29cbbd772edcb8e7d524a82ee8cef8dd046fc14033796a754c3ad246d019fa54" +checksum = "80bb72f02e7fbf07183443b27b0f3d4144abf8c114189f2e088ed95b696a7822" dependencies = [ - "leb128", - "wasmparser 0.219.1", + "leb128fmt", + "wasmparser 0.227.1", ] [[package]] name = "wasm-metadata" -version = "0.219.1" +version = "0.227.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2af5a8e37a5e996861e1813f8de30911c47609c9ff51a7284f7dbd754dc3a9f3" +checksum = "ce1ef0faabbbba6674e97a56bee857ccddf942785a336c8b47b42373c922a91d" dependencies = [ "anyhow", + "auditable-serde", + "flate2", "indexmap", "serde", "serde_derive", "serde_json", "spdx", - "wasm-encoder 0.219.1", - "wasmparser 0.219.1", + "url", + "wasm-encoder 0.227.1", + "wasmparser 0.227.1", ] [[package]] name = "wasmparser" -version = "0.217.0" +version = "0.224.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca917a21307d3adf2b9857b94dd05ebf8496bdcff4437a9b9fb3899d3e6c74e7" +checksum = "04f17a5917c2ddd3819e84c661fae0d6ba29d7b9c1f0e96c708c65a9c4188e11" dependencies = [ - "ahash", "bitflags", - "hashbrown 0.14.5", + "hashbrown", "indexmap", "semver", "serde", @@ -2392,13 +2423,12 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.219.1" +version = "0.227.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c771866898879073c53b565a6c7b49953795159836714ac56a5befb581227c5" +checksum = "0f51cad774fb3c9461ab9bccc9c62dfb7388397b5deda31bf40e8108ccd678b2" dependencies = [ - "ahash", "bitflags", - "hashbrown 0.14.5", + "hashbrown", "indexmap", "semver", "serde", @@ -2406,22 +2436,22 @@ dependencies = [ [[package]] name = "wasmprinter" -version = "0.217.0" +version = "0.224.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dc568b3e0d47e8f96ea547c90790cfa783f0205160c40de894a427114185ce" +checksum = "0095b53a3b09cbc2f90f789ea44aa1b17ecc2dad8b267e657c7391f3ded6293d" dependencies = [ "anyhow", "termcolor", - "wasmparser 0.217.0", + "wasmparser 0.224.1", ] [[package]] name = "wasmtime" -version = "25.0.2" +version = "30.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef01f9cb9636ed42a7ec5a09d785c0643590199dc7372dc22c7e2ba7a31a97d4" +checksum = "809cc8780708f1deed0a7c3fcab46954f0e8c08a6fe0252772481fbc88fcf946" dependencies = [ - "addr2line 0.22.0", + "addr2line", "anyhow", "async-trait", "bitflags", @@ -2430,12 +2460,11 @@ dependencies = [ "cfg-if", "encoding_rs", "fxprof-processed-profile", - "gimli 0.29.0", - "hashbrown 0.14.5", + "gimli", + "hashbrown", "indexmap", "ittapi", "libc", - "libm", "log", "mach2", "memfd", @@ -2444,6 +2473,7 @@ dependencies = [ "paste", "postcard", "psm", + "pulley-interpreter", "rayon", "rustix", "semver", @@ -2452,9 +2482,10 @@ dependencies = [ "serde_json", "smallvec", "sptr", - "target-lexicon", - "wasm-encoder 0.217.0", - "wasmparser 0.217.0", + "target-lexicon 0.13.2", + "trait-variant", + "wasm-encoder 0.224.1", + "wasmparser 0.224.1", "wasmtime-asm-macros", "wasmtime-cache", "wasmtime-component-macro", @@ -2464,27 +2495,28 @@ dependencies = [ "wasmtime-fiber", "wasmtime-jit-debug", "wasmtime-jit-icache-coherence", + "wasmtime-math", "wasmtime-slab", "wasmtime-versioned-export-macros", "wasmtime-winch", "wat", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "wasmtime-asm-macros" -version = "25.0.2" +version = "30.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba5b20797419d6baf2296db2354f864e8bb3447cacca9d151ce7700ae08b4460" +checksum = "236964b6b35af0f08879c9c56dbfbc5adc12e8d624672341a0121df31adaa3fa" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "25.0.2" +version = "30.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "272d5939e989c5b54e3fa83ef420e4a6dba3995c3065626066428b2f73ad1e06" +checksum = "7a5d75ac36ee28647f6d871a93eefc7edcb729c3096590031ba50857fac44fa8" dependencies = [ "anyhow", "base64", @@ -2496,15 +2528,15 @@ dependencies = [ "serde_derive", "sha2", "toml", - "windows-sys 0.52.0", + "windows-sys 0.59.0", "zstd", ] [[package]] name = "wasmtime-component-macro" -version = "25.0.2" +version = "30.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26593c4b18c76ca3c3fbdd813d6692256537b639b851d8a6fe827e3d6966fc01" +checksum = "2581ef04bf33904db9a902ffb558e7b2de534d6a4881ee985ea833f187a78fdf" dependencies = [ "anyhow", "proc-macro2", @@ -2512,20 +2544,20 @@ dependencies = [ "syn", "wasmtime-component-util", "wasmtime-wit-bindgen", - "wit-parser 0.217.0", + "wit-parser 0.224.1", ] [[package]] name = "wasmtime-component-util" -version = "25.0.2" +version = "30.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ed562fbb0cbed20a56c369c8de146c1de06a48c19e26ed9aa45f073514ee60" +checksum = "9a7108498a8a0afc81c7d2d81b96cdc509cd631d7bbaa271b7db5137026f10e3" [[package]] name = "wasmtime-cranelift" -version = "25.0.2" +version = "30.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f389b789cbcb53a8499131182135dea21d7d97ad77e7fb66830f69479ef0e68c" +checksum = "abcc9179097235c91f299a8ff56b358ee921266b61adff7d14d6e48428954dd2" dependencies = [ "anyhow", "cfg-if", @@ -2534,29 +2566,30 @@ dependencies = [ "cranelift-entity", "cranelift-frontend", "cranelift-native", - "cranelift-wasm", - "gimli 0.29.0", + "gimli", + "itertools", "log", "object", + "pulley-interpreter", "smallvec", - "target-lexicon", + "target-lexicon 0.13.2", "thiserror", - "wasmparser 0.217.0", + "wasmparser 0.224.1", "wasmtime-environ", "wasmtime-versioned-export-macros", ] [[package]] name = "wasmtime-environ" -version = "25.0.2" +version = "30.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b72debe8899f19bedf66f7071310f06ef62de943a1369ba9b373613e77dd3d" +checksum = "8e90f6cba665939381839bbf2ddf12d732fca03278867910348ef1281b700954" dependencies = [ "anyhow", "cpp_demangle", "cranelift-bitset", "cranelift-entity", - "gimli 0.29.0", + "gimli", "indexmap", "log", "object", @@ -2565,19 +2598,19 @@ dependencies = [ "semver", "serde", "serde_derive", - "target-lexicon", - "wasm-encoder 0.217.0", - "wasmparser 0.217.0", + "smallvec", + "target-lexicon 0.13.2", + "wasm-encoder 0.224.1", + "wasmparser 0.224.1", "wasmprinter", "wasmtime-component-util", - "wasmtime-types", ] [[package]] name = "wasmtime-fiber" -version = "25.0.2" +version = "30.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92b8d4d504266ee598204f9e69cea8714499cc7c5aeddaa9b3f76aaace8b0680" +checksum = "ba5c2ac21f0b39d72d2dac198218a12b3ddeb4ab388a8fa0d2e429855876783c" dependencies = [ "anyhow", "cc", @@ -2585,58 +2618,53 @@ dependencies = [ "rustix", "wasmtime-asm-macros", "wasmtime-versioned-export-macros", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "wasmtime-jit-debug" -version = "25.0.2" +version = "30.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ed7f0bbb9da3252c252b05fcd5fd42672db161e6276aa96e92059500247d8c" +checksum = "74812989369947f4f5a33f4ae8ff551eb6c8a97ff55e0269a9f5f0fac93cd755" dependencies = [ + "cc", "object", - "once_cell", "rustix", "wasmtime-versioned-export-macros", ] [[package]] name = "wasmtime-jit-icache-coherence" -version = "25.0.2" +version = "30.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d930bc1325bc0448be6a11754156d770f56f6c3a61f440e9567f36cd2ea3065" +checksum = "3f180cc0d2745e3a5df5d02231cd3046f49c75512eaa987b8202363b112e125d" dependencies = [ "anyhow", "cfg-if", "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] -name = "wasmtime-slab" -version = "25.0.2" +name = "wasmtime-math" +version = "30.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "055a181b8d03998511294faea14798df436503f14d7fd20edcf7370ec583e80a" +checksum = "f5f04c5dcf5b2f88f81cfb8d390294b2f67109dc4d0197ea7303c60a092df27c" +dependencies = [ + "libm", +] [[package]] -name = "wasmtime-types" -version = "25.0.2" +name = "wasmtime-slab" +version = "30.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8340d976673ac3fdacac781f2afdc4933920c1adc738c3409e825dab3955399" -dependencies = [ - "anyhow", - "cranelift-entity", - "serde", - "serde_derive", - "smallvec", - "wasmparser 0.217.0", -] +checksum = "fe9681707f1ae9a4708ca22058722fca5c135775c495ba9b9624fe3732b94c97" [[package]] name = "wasmtime-versioned-export-macros" -version = "25.0.2" +version = "30.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4b0c1f76891f778db9602ee3fbb4eb7e9a3f511847d1fb1b69eddbcea28303c" +checksum = "dd2fe69d04986a12fc759d2e79494100d600adcb3bb79e63dedfc8e6bb2ab03e" dependencies = [ "proc-macro2", "quote", @@ -2645,9 +2673,9 @@ dependencies = [ [[package]] name = "wasmtime-wasi" -version = "25.0.2" +version = "30.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba1497b38341acc97308d6ce784598419fe0131bf6ddc5cda16a91033ef7c66e" +checksum = "4ce639c7d398586bc539ae9bba752084c1db7a49ab0f391a3230dcbcc6a64cfd" dependencies = [ "anyhow", "async-trait", @@ -2662,7 +2690,6 @@ dependencies = [ "futures", "io-extras", "io-lifetimes", - "once_cell", "rustix", "system-interface", "thiserror", @@ -2670,22 +2697,36 @@ dependencies = [ "tracing", "url", "wasmtime", + "wasmtime-wasi-io", "wiggle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", +] + +[[package]] +name = "wasmtime-wasi-io" +version = "30.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdcad7178fddaa07786abe8ff5e043acb4bc8c8f737eb117f11e028b48d92792" +dependencies = [ + "anyhow", + "async-trait", + "bytes", + "futures", + "wasmtime", ] [[package]] name = "wasmtime-winch" -version = "25.0.2" +version = "30.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a702ff5eff3b37c11453ec8b54ec444bb9f2c689c7a7af382766c52df86b1e9b" +checksum = "5a9c8eae8395d530bb00a388030de9f543528674c382326f601de47524376975" dependencies = [ "anyhow", "cranelift-codegen", - "gimli 0.29.0", + "gimli", "object", - "target-lexicon", - "wasmparser 0.217.0", + "target-lexicon 0.13.2", + "wasmparser 0.224.1", "wasmtime-cranelift", "wasmtime-environ", "winch-codegen", @@ -2693,14 +2734,14 @@ dependencies = [ [[package]] name = "wasmtime-wit-bindgen" -version = "25.0.2" +version = "30.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2fca2cbb5bb390f65d4434c19bf8d9873dfc60f10802918ebcd6f819a38d703" +checksum = "9a5531455e2c55994a1540355140369bb7ec0e46d2699731c5ee9f4cf9c3f7d4" dependencies = [ "anyhow", - "heck 0.4.1", + "heck", "indexmap", - "wit-parser 0.217.0", + "wit-parser 0.224.1", ] [[package]] @@ -2714,31 +2755,31 @@ dependencies = [ [[package]] name = "wast" -version = "219.0.1" +version = "227.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f79a9d9df79986a68689a6b40bcc8d5d40d807487b235bebc2ac69a242b54a1" +checksum = "85c14e5042b16c9d267da3b9b0f4529870455178415286312c25c34dfc1b2816" dependencies = [ "bumpalo", - "leb128", + "leb128fmt", "memchr", "unicode-width", - "wasm-encoder 0.219.1", + "wasm-encoder 0.227.1", ] [[package]] name = "wat" -version = "1.219.1" +version = "1.227.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bc3cf014fb336883a411cd662f987abf6a1d2a27f2f0008616a0070bbf6bd0d" +checksum = "b3d394d5bef7006ff63338d481ca10f1af76601e65ebdf5ed33d29302994e9cc" dependencies = [ - "wast 219.0.1", + "wast 227.0.1", ] [[package]] name = "wiggle" -version = "25.0.2" +version = "30.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ebee2be6b561d1fe91b37e960c02baa94cdee29af863f5f26a0637f344f27a" +checksum = "c5a4ea7722c042a659dc70caab0b56d7f45220e8bae1241cf5ebc7ab7efb0dfb" dependencies = [ "anyhow", "async-trait", @@ -2751,12 +2792,12 @@ dependencies = [ [[package]] name = "wiggle-generate" -version = "25.0.2" +version = "30.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97c4a32959189041ccb260e6dfa7fcf907e665166e755a6a681c32423c90e45f" +checksum = "3f786d9d3e006152a360f1145bdc18e56ea22fd5d2356f1ddc2ecfcf7529a77b" dependencies = [ "anyhow", - "heck 0.4.1", + "heck", "proc-macro2", "quote", "shellexpand", @@ -2766,9 +2807,9 @@ dependencies = [ [[package]] name = "wiggle-macro" -version = "25.0.2" +version = "30.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e1c266e16c4b24a29e055ec651e27fce1389c886bb00fbe78b8924a253a439b" +checksum = "ceac9f94f22ccc0485aeab08187b9f211d1993aaf0ed6eeb8aed43314f6e717c" dependencies = [ "proc-macro2", "quote", @@ -2809,17 +2850,18 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winch-codegen" -version = "0.23.2" +version = "30.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d716f7c87db8ea79f1dc69f7344354b6256451bccca422ac4c3e0d607d144532" +checksum = "7dbd4e07bd92c7ddace2f3267bdd31d4197b5ec58c315751325d45c19bfb56df" dependencies = [ "anyhow", "cranelift-codegen", - "gimli 0.29.0", + "gimli", "regalloc2", "smallvec", - "target-lexicon", - "wasmparser 0.217.0", + "target-lexicon 0.13.2", + "thiserror", + "wasmparser 0.224.1", "wasmtime-cranelift", "wasmtime-environ", ] @@ -2936,9 +2978,9 @@ dependencies = [ [[package]] name = "wit-bindgen" -version = "0.34.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e11ad55616555605a60a8b2d1d89e006c2076f46c465c892cc2c153b20d4b30" +checksum = "8e7091ed6c9abfa4e0a2ef3b39d0539da992d841fcf32c255f64fb98764ffee5" dependencies = [ "wit-bindgen-rt", "wit-bindgen-rust-macro", @@ -2946,32 +2988,32 @@ dependencies = [ [[package]] name = "wit-bindgen-core" -version = "0.34.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "163cee59d3d5ceec0b256735f3ab0dccac434afb0ec38c406276de9c5a11e906" +checksum = "398c650cec1278cfb72e214ba26ef3440ab726e66401bd39c04f465ee3979e6b" dependencies = [ "anyhow", - "heck 0.5.0", - "wit-parser 0.219.1", + "heck", + "wit-parser 0.227.1", ] [[package]] name = "wit-bindgen-rt" -version = "0.34.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744845cde309b8fa32408d6fb67456449278c66ea4dcd96de29797b302721f02" +checksum = "68faed92ae696b93ea9a7b67ba6c37bf09d72c6d9a70fa824a743c3020212f11" dependencies = [ "bitflags", ] [[package]] name = "wit-bindgen-rust" -version = "0.34.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6919521fc7807f927a739181db93100ca7ed03c29509b84d5f96b27b2e49a9a" +checksum = "83903c8dcd8084a8a67ae08190122cf0e25dc37bdc239070a00f47e22d3f0aae" dependencies = [ "anyhow", - "heck 0.5.0", + "heck", "indexmap", "prettyplease", "syn", @@ -2982,9 +3024,9 @@ dependencies = [ [[package]] name = "wit-bindgen-rust-macro" -version = "0.34.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c967731fc5d50244d7241ecfc9302a8929db508eea3c601fbc5371b196ba38a5" +checksum = "a7bf7f20495bcc7dc9f24c5fbcac9e919ca5ebdb7a1b1841d74447d3c8dd0c60" dependencies = [ "anyhow", "prettyplease", @@ -2997,9 +3039,9 @@ dependencies = [ [[package]] name = "wit-component" -version = "0.219.1" +version = "0.227.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1673163c0cb14a6a19ddbf44dd4efe6f015ec1ebb8156710ac32501f19fba2" +checksum = "635c3adc595422cbf2341a17fb73a319669cc8d33deed3a48368a841df86b676" dependencies = [ "anyhow", "bitflags", @@ -3008,17 +3050,17 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder 0.219.1", + "wasm-encoder 0.227.1", "wasm-metadata", - "wasmparser 0.219.1", - "wit-parser 0.219.1", + "wasmparser 0.227.1", + "wit-parser 0.227.1", ] [[package]] name = "wit-parser" -version = "0.217.0" +version = "0.224.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb893dcd6d370cfdf19a0d9adfcd403efb8e544e1a0ea3a8b81a21fe392eaa78" +checksum = "e3477d8d0acb530d76beaa8becbdb1e3face08929db275f39934963eb4f716f8" dependencies = [ "anyhow", "id-arena", @@ -3029,14 +3071,14 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser 0.217.0", + "wasmparser 0.224.1", ] [[package]] name = "wit-parser" -version = "0.219.1" +version = "0.227.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a86f669283257e8e424b9a4fc3518e3ade0b95deb9fbc0f93a1876be3eda598" +checksum = "ddf445ed5157046e4baf56f9138c124a0824d4d1657e7204d71886ad8ce2fc11" dependencies = [ "anyhow", "id-arena", @@ -3047,7 +3089,7 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser 0.219.1", + "wasmparser 0.227.1", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 9326b0f..0371764 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,10 +15,10 @@ tar = "0.4.42" tempfile = "3.13.0" zstd = "0.13.2" componentize-py-shared = { path = "shared" } -wasm-encoder = "0.219.0" -wit-parser = "0.219.0" -wit-component = "0.219.0" -wasmparser = "0.219.0" +wasm-encoder = "0.227.0" +wit-parser = "0.227.0" +wit-component = "0.227.0" +wasmparser = "0.227.0" indexmap = "2.6.0" bincode = "1.3.3" heck = "0.5.0" @@ -26,12 +26,12 @@ pyo3 = { version = "0.22.5", features = [ "abi3-py39", "extension-module", ], optional = true } -wasmtime = "25.0.2" -wasmtime-wasi = "25.0.2" -wasi-common = "25.0.2" +wasmtime = "30.0.2" +wasmtime-wasi = "30.0.2" +wasi-common = "30.0.2" once_cell = "1.20.2" -component-init = { git = "https://github.com/dicej/component-init", rev = "6964d14" } -wasm-convert = { git = "https://github.com/dicej/wasm-convert", rev = "a42b419" } +component-init = { git = "https://github.com/dicej/component-init", rev = "2db53ece" } +wasm-convert = { git = "https://github.com/dicej/wasm-convert", rev = "713e2d6a" } async-trait = "0.1.83" futures = "0.3.31" tokio = { version = "1.41.0", features = [ diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 5ea009e..9c69317 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -12,4 +12,5 @@ once_cell = "1.20.2" pyo3 = { version = "0.22.5", features = ["abi3-py312", "num-bigint"] } componentize-py-shared = { path = "../shared" } num-bigint = "0.4.6" -wit-bindgen = "0.34.0" +wit-bindgen = { version = "0.40.0", default-features = false, features = ["macros", "realloc"] } +wit-bindgen-rt = { version = "0.40.0" } diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 4749287..c509fae 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -1,4 +1,9 @@ #![deny(warnings)] +#![allow( + clippy::useless_conversion, + reason = "some pyo3 macros produce code that does this" +)] +#![allow(static_mut_refs, reason = "wit-bindgen produces code that does this")] use { anyhow::{Error, Result}, diff --git a/src/abi.rs b/src/abi.rs index 0519f0e..3fb7053 100644 --- a/src/abi.rs +++ b/src/abi.rs @@ -120,7 +120,8 @@ pub fn has_pointer(resolve: &Resolve, ty: Type) -> bool { | Type::U64 | Type::S64 | Type::F32 - | Type::F64 => false, + | Type::F64 + | Type::ErrorContext => false, Type::String => true, Type::Id(id) => match &resolve.types[id].kind { TypeDefKind::Record(record) => record @@ -164,7 +165,7 @@ pub fn abi(resolve: &Resolve, ty: Type) -> Abi { align: 2, flattened: vec![ValType::I32], }, - Type::U32 | Type::S32 | Type::Char => Abi { + Type::U32 | Type::S32 | Type::Char | Type::ErrorContext => Abi { size: 4, align: 4, flattened: vec![ValType::I32], diff --git a/src/bindgen.rs b/src/bindgen.rs index 093e5e1..b953375 100644 --- a/src/bindgen.rs +++ b/src/bindgen.rs @@ -9,7 +9,7 @@ use { once_cell::sync::Lazy, std::collections::HashMap, wasm_encoder::{BlockType, Instruction as Ins, MemArg, ValType}, - wit_parser::{Handle, Resolve, Results, Type, TypeDefKind, TypeId}, + wit_parser::{Handle, Resolve, Type, TypeDefKind, TypeId}, }; // Assume Wasm32 @@ -184,7 +184,7 @@ pub struct FunctionBindgen<'a> { stack_pointer: u32, types: &'a IndexSet, params: &'a [(String, Type)], - results: &'a Results, + result: &'a Option, params_abi: Abi, results_abi: Abi, local_stack: Vec, @@ -204,9 +204,9 @@ impl<'a> FunctionBindgen<'a> { stack_pointer, types: &summary.types, params: function.params, - results: function.results, + result: function.result, params_abi: abi::record_abi(summary.resolve, function.params.types()), - results_abi: abi::record_abi(summary.resolve, function.results.types()), + results_abi: abi::record_abi(summary.resolve, function.result.types()), local_types: Vec::new(), local_stack: Vec::new(), instructions: Vec::new(), @@ -332,7 +332,7 @@ impl<'a> FunctionBindgen<'a> { }) .collect::>(); - self.from_canon_record(self.results.types(), context, &locals, output); + self.from_canon_record(self.result.types(), context, &locals, output); for (local, ty) in locals.iter().zip(&self.results_abi.flattened.clone()).rev() { self.pop_local(*local, *ty); @@ -343,7 +343,7 @@ impl<'a> FunctionBindgen<'a> { self.get_stack(); self.push(Ins::LocalSet(source)); - self.load_record(self.results.types(), context, source, output); + self.load_record(self.result.types(), context, source, output); self.pop_local(source, ValType::I32); self.pop_stack(self.results_abi.size); @@ -369,7 +369,7 @@ impl<'a> FunctionBindgen<'a> { } pub fn compile_export(&mut self, index: i32, from_canon: i32, to_canon: i32) { - let return_style = match self.results.types().collect::>().as_slice() { + let return_style = match self.result.types().collect::>().as_slice() { [Type::Id(id)] if matches!(&self.resolve.types[*id].kind, TypeDefKind::Result(_)) => { ReturnStyle::Result } @@ -429,7 +429,7 @@ impl<'a> FunctionBindgen<'a> { self.get_stack(); self.push(Ins::LocalSet(source)); - self.load_copy_record(self.results.types(), source); + self.load_copy_record(self.result.types(), source); self.pop_local(source, ValType::I32); @@ -462,7 +462,7 @@ impl<'a> FunctionBindgen<'a> { let mut store_offset = 0; let mut load_offset = 0; - for ty in self.results.types() { + for ty in self.result.types() { let abi = abi::abi(self.resolve, ty); store_offset = abi::align(store_offset, abi.align); @@ -496,7 +496,7 @@ impl<'a> FunctionBindgen<'a> { // Arg 0: *mut MyResults let value = 0; - self.free_stored_record(self.results.types(), value); + self.free_stored_record(self.result.types(), value); self.push(Ins::LocalGet(value)); self.push(Ins::I32Const(self.results_abi.size.try_into().unwrap())); @@ -619,7 +619,7 @@ impl<'a> FunctionBindgen<'a> { *IMPORTS.get("componentize-py#ToCanonI32").unwrap(), )); } - Type::U8 | Type::U16 | Type::U32 => { + Type::U8 | Type::U16 | Type::U32 | Type::ErrorContext => { self.push(Ins::LocalGet(context)); self.push(Ins::LocalGet(value)); self.push(Ins::Call( @@ -920,7 +920,7 @@ impl<'a> FunctionBindgen<'a> { self.to_canon(ty, context, value); self.push(Ins::I32Store16(mem_arg(0, 1))); } - Type::U32 | Type::S32 => { + Type::U32 | Type::S32 | Type::ErrorContext => { self.push(Ins::LocalGet(destination)); self.to_canon(ty, context, value); self.push(Ins::I32Store(mem_arg(0, 2))); @@ -1212,7 +1212,7 @@ impl<'a> FunctionBindgen<'a> { self.push(Ins::LocalGet(source[0])); self.push(Ins::I32Store16(mem_arg(0, 1))); } - Type::U32 | Type::S32 | Type::Char => { + Type::U32 | Type::S32 | Type::Char | Type::ErrorContext => { self.push(Ins::LocalGet(destination)); self.push(Ins::LocalGet(source[0])); self.push(Ins::I32Store(mem_arg(0, 2))); @@ -1458,7 +1458,7 @@ impl<'a> FunctionBindgen<'a> { *IMPORTS.get("componentize-py#FromCanonI32").unwrap(), )); } - Type::U8 | Type::U16 | Type::U32 => { + Type::U8 | Type::U16 | Type::U32 | Type::ErrorContext => { self.push(Ins::LocalGet(context)); self.push(Ins::LocalGet(value[0])); self.push(Ins::Call( @@ -1793,7 +1793,7 @@ impl<'a> FunctionBindgen<'a> { self.from_canon(ty, context, &[value]); self.pop_local(value, ValType::I32); } - Type::U32 | Type::S32 | Type::Char => { + Type::U32 | Type::S32 | Type::Char | Type::ErrorContext => { let value = self.push_local(ValType::I32); self.push(Ins::LocalGet(source)); self.push(Ins::I32Load(mem_arg(0, 2))); @@ -2091,7 +2091,7 @@ impl<'a> FunctionBindgen<'a> { self.push(Ins::LocalGet(source)); self.push(Ins::I32Load16S(mem_arg(0, 1))); } - Type::U32 | Type::S32 | Type::Char => { + Type::U32 | Type::S32 | Type::Char | Type::ErrorContext => { self.push(Ins::LocalGet(source)); self.push(Ins::I32Load(mem_arg(0, 2))); } @@ -2307,7 +2307,8 @@ impl<'a> FunctionBindgen<'a> { | Type::U64 | Type::S64 | Type::F32 - | Type::F64 => {} + | Type::F64 + | Type::ErrorContext => {} Type::String => { self.push(Ins::LocalGet(value[0])); @@ -2466,7 +2467,8 @@ impl<'a> FunctionBindgen<'a> { | Type::U64 | Type::S64 | Type::F32 - | Type::F64 => {} + | Type::F64 + | Type::ErrorContext => {} Type::String => { self.push(Ins::LocalGet(value)); diff --git a/src/lib.rs b/src/lib.rs index 5c30d6b..8c1608a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -23,7 +23,7 @@ use { }, wasmtime_wasi::{ pipe::{MemoryInputPipe, MemoryOutputPipe}, - DirPerms, FilePerms, WasiCtx, WasiCtxBuilder, WasiView, + DirPerms, FilePerms, IoView, WasiCtx, WasiCtxBuilder, WasiView, }, wit_parser::{Resolve, TypeDefKind, UnresolvedPackageGroup, WorldId, WorldItem, WorldKey}, }; @@ -63,6 +63,9 @@ impl WasiView for Ctx { fn ctx(&mut self) -> &mut WasiCtx { &mut self.wasi } +} + +impl IoView for Ctx { fn table(&mut self) -> &mut ResourceTable { &mut self.table } diff --git a/src/python.rs b/src/python.rs index 9d9c085..791993b 100644 --- a/src/python.rs +++ b/src/python.rs @@ -1,3 +1,8 @@ +#![allow( + clippy::useless_conversion, + reason = "some pyo3 macros produce code that does this" +)] + use { pyo3::{ exceptions::PyAssertionError, diff --git a/src/summary.rs b/src/summary.rs index 75fede3..da6e7da 100644 --- a/src/summary.rs +++ b/src/summary.rs @@ -25,8 +25,8 @@ use { }, wasm_encoder::ValType, wit_parser::{ - Handle, InterfaceId, Resolve, Result_, Results, Type, TypeDefKind, TypeId, TypeOwner, - WorldId, WorldItem, WorldKey, + Handle, InterfaceId, Resolve, Result_, Type, TypeDefKind, TypeId, TypeOwner, WorldId, + WorldItem, WorldKey, }, }; @@ -84,7 +84,7 @@ pub struct MyFunction<'a> { pub name: &'a str, pub docs: Option<&'a str>, pub params: &'a [(String, Type)], - pub results: &'a Results, + pub result: &'a Option, pub wit_kind: wit_parser::FunctionKind, } @@ -128,7 +128,7 @@ impl MyFunction<'_> { let mut params = abi::record_abi_limit(resolve, self.params.types(), MAX_FLAT_PARAMS).flattened; - let mut results = abi::record_abi(resolve, self.results.types()).flattened; + let mut results = abi::record_abi(resolve, self.result.types()).flattened; if results.len() > MAX_FLAT_RESULTS { params.push(ValType::I32); @@ -142,7 +142,7 @@ impl MyFunction<'_> { match self.kind { FunctionKind::Export => ( abi::record_abi_limit(resolve, self.params.types(), MAX_FLAT_PARAMS).flattened, - abi::record_abi_limit(resolve, self.results.types(), MAX_FLAT_RESULTS).flattened, + abi::record_abi_limit(resolve, self.result.types(), MAX_FLAT_RESULTS).flattened, ), FunctionKind::Import | FunctionKind::ResourceNew @@ -310,7 +310,8 @@ impl<'a> Summary<'a> { | Type::S64 | Type::F32 | Type::F64 - | Type::String => (), + | Type::String + | Type::ErrorContext => (), Type::Id(id) => { self.world_types.entry(world).or_default().insert(id); @@ -380,13 +381,13 @@ impl<'a> Summary<'a> { self.resource_directions.insert(id, state.direction); let info = self.resource_info.entry(id).or_default(); - let make = |kind, params, results| MyFunction { + let make = |kind, params, result| MyFunction { kind, interface: state.interface.clone(), name: ty.name.as_deref().unwrap(), docs: None, params, - results, + result, wit_kind: wit_parser::FunctionKind::Freestanding, }; @@ -397,8 +398,8 @@ impl<'a> Summary<'a> { static DROP_PARAMS: sync::Lazy<[(String, Type); 1]> = sync::Lazy::new(|| [("handle".to_string(), Type::U32)]); - static DROP_RESULTS: sync::Lazy = - sync::Lazy::new(Results::empty); + static DROP_RESULTS: sync::Lazy> = + sync::Lazy::new(|| None); self.push_function(make( FunctionKind::ResourceDropRemote, @@ -417,7 +418,7 @@ impl<'a> Summary<'a> { static NEW_PARAMS: sync::Lazy<[(String, Type); 1]> = sync::Lazy::new(|| [("rep".to_string(), Type::U32)]); - static NEW_RESULTS: Results = Results::Anon(Type::U32); + static NEW_RESULTS: Option = Some(Type::U32); self.push_function(make( FunctionKind::ResourceNew, @@ -428,7 +429,7 @@ impl<'a> Summary<'a> { static REP_PARAMS: sync::Lazy<[(String, Type); 1]> = sync::Lazy::new(|| [("handle".to_string(), Type::U32)]); - static REP_RESULTS: Results = Results::Anon(Type::U32); + static REP_RESULTS: Option = Some(Type::U32); self.push_function(make( FunctionKind::ResourceRep, @@ -439,8 +440,8 @@ impl<'a> Summary<'a> { static DROP_PARAMS: sync::Lazy<[(String, Type); 1]> = sync::Lazy::new(|| [("handle".to_string(), Type::U32)]); - static DROP_RESULTS: sync::Lazy = - sync::Lazy::new(Results::empty); + static DROP_RESULTS: sync::Lazy> = + sync::Lazy::new(|| None); self.push_function(make( FunctionKind::ResourceDropLocal, @@ -465,7 +466,7 @@ impl<'a> Summary<'a> { name: &'a str, docs: Option<&'a str>, params: &'a [(String, Type)], - results: &'a Results, + result: &'a Option, direction: Direction, wit_kind: wit_parser::FunctionKind, world: WorldId, @@ -474,7 +475,7 @@ impl<'a> Summary<'a> { self.visit_type(ty, world); } - for ty in results.types() { + for ty in result.types() { self.visit_type(ty, world); } @@ -484,7 +485,7 @@ impl<'a> Summary<'a> { name, docs, params, - results, + result, wit_kind: wit_kind.clone(), }; @@ -498,7 +499,7 @@ impl<'a> Summary<'a> { self.push_function(make(FunctionKind::Export)); self.push_function(make(FunctionKind::ExportFromCanon)); self.push_function(make(FunctionKind::ExportToCanon)); - if abi::record_abi(self.resolve, results.types()) + if abi::record_abi(self.resolve, result.types()) .flattened .len() > MAX_FLAT_RESULTS @@ -595,7 +596,7 @@ impl<'a> Summary<'a> { func_name, func.docs.contents.as_deref(), &func.params, - &func.results, + &func.result, direction, func.kind.clone(), world, @@ -609,7 +610,7 @@ impl<'a> Summary<'a> { &func.name, func.docs.contents.as_deref(), &func.params, - &func.results, + &func.result, direction, func.kind.clone(), world, @@ -746,6 +747,7 @@ impl<'a> Summary<'a> { .escape(), name: self.function_name(function), }), + _ => todo!("handle async functions"), }); } } @@ -786,6 +788,7 @@ impl<'a> Summary<'a> { .unwrap() .to_snake_case() .escape(), + _ => todo!("support async functions"), } } @@ -822,6 +825,7 @@ impl<'a> Summary<'a> { wit_parser::FunctionKind::Constructor(_) => (0, Some("self")), wit_parser::FunctionKind::Method(_) => (1, Some("self")), wit_parser::FunctionKind::Static(_) => (0, Some("cls")), + _ => todo!("support async functions"), }; let mut type_name = |ty| names.type_name(ty, seen, resource); @@ -864,7 +868,7 @@ impl<'a> Summary<'a> { .collect::>() .join(", "); - let result_types = function.results.types().collect::>(); + let result_types = function.result.types().collect::>(); let (return_statement, return_type, error) = if let wit_parser::FunctionKind::Constructor(_) = function.wit_kind { @@ -950,7 +954,8 @@ impl<'a> Summary<'a> { | Type::S64 | Type::F32 | Type::F64 - | Type::String => (), + | Type::String + | Type::ErrorContext => (), Type::Id(id) => { let ty = &self.resolve.types[id]; match &ty.kind { @@ -1009,7 +1014,7 @@ impl<'a> Summary<'a> { self.sort(*ty, &mut *sorted, &mut *visited); } - for ty in function.results.types() { + for ty in function.result.types() { self.sort(ty, &mut *sorted, &mut *visited); } }; @@ -2034,7 +2039,8 @@ from .types import Result, Ok, Err, Some | Type::S64 | Type::F32 | Type::F64 - | Type::String => false, + | Type::String + | Type::ErrorContext => false, Type::Id(id) => match &self.resolve.types[id].kind { TypeDefKind::Record(record) => record .fields @@ -2102,7 +2108,8 @@ impl<'a> TypeNames<'a> { | Type::S8 | Type::S16 | Type::S32 - | Type::S64 => "int".into(), + | Type::S64 + | Type::ErrorContext => "int".into(), Type::F32 | Type::F64 => "float".into(), Type::Char | Type::String => "str".into(), Type::Id(id) => { @@ -2221,6 +2228,7 @@ fn matches_resource(function: &MyFunction, resource: TypeId, direction: Directio wit_parser::FunctionKind::Method(id) | wit_parser::FunctionKind::Static(id) | wit_parser::FunctionKind::Constructor(id) => *id == resource, + _ => todo!("support async functions"), } } _ => false, diff --git a/src/test.rs b/src/test.rs index b87abf4..b8c2ab5 100644 --- a/src/test.rs +++ b/src/test.rs @@ -3,7 +3,6 @@ use { crate::Ctx, anyhow::{anyhow, Result}, - async_trait::async_trait, once_cell::sync::Lazy, proptest::{ prelude::Strategy, @@ -103,7 +102,6 @@ impl PartialEq for MyF64 { } } -#[async_trait] trait Host { type World; diff --git a/src/test/echoes.rs b/src/test/echoes.rs index 397deed..6fc5386 100644 --- a/src/test/echoes.rs +++ b/src/test/echoes.rs @@ -1,7 +1,6 @@ use { super::{Ctx, MyF32, MyF64, Tester, SEED}, anyhow::Result, - async_trait::async_trait, once_cell::sync::Lazy, proptest::strategy::{Just, Strategy}, wasmtime::{ @@ -17,7 +16,6 @@ wasmtime::component::bindgen!({ trappable_imports: true, }); -#[async_trait] impl componentize_py::test::echoes::Host for Ctx { async fn echo_nothing(&mut self) -> Result<()> { Ok(()) @@ -187,7 +185,6 @@ impl componentize_py::test::echoes::Host for Ctx { struct Host; -#[async_trait] impl super::Host for Host { type World = EchoesTest; @@ -198,7 +195,7 @@ impl super::Host for Host { } async fn instantiate_pre(store: &mut Store, pre: InstancePre) -> Result { - Ok(EchoesTestPre::new(pre)?.instantiate_async(store).await?) + EchoesTestPre::new(pre)?.instantiate_async(store).await } } diff --git a/src/test/tests.rs b/src/test/tests.rs index c64c04b..691551e 100644 --- a/src/test/tests.rs +++ b/src/test/tests.rs @@ -3,14 +3,13 @@ use { super::{Ctx, Tester, SEED}, anyhow::{anyhow, Error, Result}, - async_trait::async_trait, once_cell::sync::Lazy, std::str, wasmtime::{ component::{InstancePre, Linker, Resource, ResourceAny}, Store, }, - wasmtime_wasi::{DirPerms, FilePerms, WasiCtxBuilder, WasiView}, + wasmtime_wasi::{DirPerms, FilePerms, IoView, WasiCtxBuilder}, }; wasmtime::component::bindgen!({ @@ -57,7 +56,6 @@ pub struct ThingList(Vec); pub struct ThingString(String); pub struct MyFloat(f64); -#[async_trait] impl TestsImports for Ctx { async fn output(&mut self, _: Frame) -> Result<()> { unreachable!() @@ -87,7 +85,6 @@ const GUEST_CODE: &[(&str, &str)] = load_guest_code!( struct Host; -#[async_trait] impl super::Host for Host { type World = Tests; @@ -99,13 +96,12 @@ impl super::Host for Host { } async fn instantiate_pre(store: &mut Store, pre: InstancePre) -> Result { - Ok(TestsPre::new(pre)?.instantiate_async(store).await?) + TestsPre::new(pre)?.instantiate_async(store).await } } struct FooHost; -#[async_trait] impl super::Host for FooHost { type World = foo_sdk::FooWorld; @@ -114,15 +110,14 @@ impl super::Host for FooHost { } async fn instantiate_pre(store: &mut Store, pre: InstancePre) -> Result { - Ok(foo_sdk::FooWorldPre::new(pre)? + foo_sdk::FooWorldPre::new(pre)? .instantiate_async(store) - .await?) + .await } } struct BarHost; -#[async_trait] impl super::Host for BarHost { type World = bar_sdk::BarWorld; @@ -131,9 +126,9 @@ impl super::Host for BarHost { } async fn instantiate_pre(store: &mut Store, pre: InstancePre) -> Result { - Ok(bar_sdk::BarWorldPre::new(pre)? + bar_sdk::BarWorldPre::new(pre)? .instantiate_async(store) - .await?) + .await } } @@ -166,7 +161,6 @@ fn simple_export() -> Result<()> { #[test] fn simple_import_and_export() -> Result<()> { - #[async_trait] impl componentize_py::test::simple_import_and_export::Host for Ctx { async fn foo(&mut self, v: u32) -> Result { Ok(v + 2) @@ -191,7 +185,6 @@ fn simple_import_and_export() -> Result<()> { fn resource_import_and_export() -> Result<()> { use componentize_py::test::resource_import_and_export::{Host, HostThing}; - #[async_trait] impl HostThing for Ctx { async fn new(&mut self, v: u32) -> Result> { Ok(self.table().push(ThingU32(v + 8))?) @@ -260,7 +253,6 @@ fn resource_import_and_export() -> Result<()> { fn resource_borrow_import() -> Result<()> { use componentize_py::test::resource_borrow_import::{Host, HostThing}; - #[async_trait] impl HostThing for Ctx { async fn new(&mut self, v: u32) -> Result> { Ok(self.table().push(ThingU32(v + 2))?) @@ -271,7 +263,6 @@ fn resource_borrow_import() -> Result<()> { } } - #[async_trait] impl Host for Ctx { async fn foo(&mut self, this: Resource) -> Result { Ok(self.table().get(&this)?.0 + 3) @@ -307,7 +298,6 @@ fn resource_borrow_export() -> Result<()> { fn resource_with_lists() -> Result<()> { use componentize_py::test::resource_with_lists::{Host, HostThing}; - #[async_trait] impl HostThing for Ctx { async fn new(&mut self, mut v: Vec) -> Result> { v.extend(b" HostThing.new"); @@ -373,7 +363,6 @@ fn resource_aggregates() -> Result<()> { Host, HostThing, L1, L2, R1, R2, R3, T1, T2, V1, V2, }; - #[async_trait] impl HostThing for Ctx { async fn new(&mut self, v: u32) -> Result> { Ok(self.table().push(ThingU32(v + 2))?) @@ -384,7 +373,6 @@ fn resource_aggregates() -> Result<()> { } } - #[async_trait] impl Host for Ctx { async fn foo( &mut self, @@ -479,7 +467,6 @@ fn resource_alias() -> Result<()> { { use componentize_py::test::resource_alias1::{Foo, Host, HostThing}; - #[async_trait] impl HostThing for Ctx { async fn new(&mut self, s: String) -> Result> { Ok(self.table().push(ThingString(s + " HostThing::new"))?) @@ -494,7 +481,6 @@ fn resource_alias() -> Result<()> { } } - #[async_trait] impl Host for Ctx { async fn a(&mut self, f: Foo) -> Result>> { Ok(vec![f.thing]) @@ -505,7 +491,6 @@ fn resource_alias() -> Result<()> { { use componentize_py::test::resource_alias2::{Bar, Foo, Host, Thing}; - #[async_trait] impl Host for Ctx { async fn b(&mut self, f: Foo, g: Bar) -> Result>> { Ok(vec![f.thing, g.thing]) @@ -599,7 +584,6 @@ fn resource_floats() -> Result<()> { { use resource_floats_imports::{Host, HostFloat}; - #[async_trait] impl HostFloat for Ctx { async fn new(&mut self, v: f64) -> Result> { Ok(self.table().push(MyFloat(v + 2_f64))?) @@ -625,7 +609,6 @@ fn resource_floats() -> Result<()> { { use componentize_py::test::resource_floats::{Host, HostFloat}; - #[async_trait] impl HostFloat for Ctx { async fn new(&mut self, v: f64) -> Result> { Ok(self.table().push(MyFloat(v + 1_f64))?) @@ -690,7 +673,6 @@ fn resource_borrow_in_record() -> Result<()> { { use componentize_py::test::resource_borrow_in_record::{Foo, Host, HostThing}; - #[async_trait] impl HostThing for Ctx { async fn new(&mut self, v: String) -> Result> { Ok(self.table().push(ThingString(v + " HostThing::new"))?) @@ -705,7 +687,6 @@ fn resource_borrow_in_record() -> Result<()> { } } - #[async_trait] impl Host for Ctx { async fn test(&mut self, list: Vec) -> Result>> { list.into_iter() diff --git a/src/util.rs b/src/util.rs index 9877689..6523881 100644 --- a/src/util.rs +++ b/src/util.rs @@ -1,6 +1,6 @@ use { - std::{iter, ops::Deref}, - wit_parser::{Flags, FlagsRepr, Results, Type}, + std::iter, + wit_parser::{Flags, FlagsRepr, Type}, }; pub trait Types { @@ -18,12 +18,9 @@ impl Types for &[(String, Type)] { } } -impl Types for Results { +impl Types for Option { fn types(&self) -> Box> { - match self { - Self::Named(params) => params.deref().types(), - Self::Anon(ty) => Box::new(iter::once(*ty)), - } + Box::new((*self).into_iter()) } } diff --git a/test-generator/src/lib.rs b/test-generator/src/lib.rs index d1a4dfc..e9bbd2c 100644 --- a/test-generator/src/lib.rs +++ b/test-generator/src/lib.rs @@ -799,7 +799,6 @@ world echoes-generated-test {{ use {{ super::{{Ctx, Tester, SEED}}, anyhow::Result, - async_trait::async_trait, once_cell::sync::Lazy, proptest::strategy::{{Just, Strategy}}, wasmtime::{{ @@ -819,14 +818,12 @@ pub struct Exports {{ {typed_function_fields} }} -#[async_trait] impl {PREFIX}::Host for Ctx {{ {host_functions} }} pub struct Host; -#[async_trait] impl super::Host for Host {{ type World = Exports;