diff --git a/Cargo.lock b/Cargo.lock index b9f7b180..f1bc61c4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -26,18 +26,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[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" @@ -133,9 +121,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.95" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" +checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" [[package]] name = "arbitrary" @@ -263,9 +251,9 @@ dependencies = [ [[package]] name = "cap-primitives" -version = "3.4.2" +version = "3.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc15faeed2223d8b8e8cc1857f5861935a06d06713c4ac106b722ae9ce3c369" +checksum = "50ad0183a9659850877cefe8f5b87d564b2dd1fe78b18945813687f29c0a6878" dependencies = [ "ambient-authority", "fs-set-times", @@ -290,9 +278,9 @@ dependencies = [ [[package]] name = "cap-std" -version = "3.4.2" +version = "3.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3dbd3e8e8d093d6ccb4b512264869e1281cdb032f7940bd50b2894f96f25609" +checksum = "1c41814365b796ed12688026cb90a1e03236a84ccf009628f9c43c8aa3af250a" dependencies = [ "cap-primitives", "io-extras", @@ -439,20 +427,35 @@ dependencies = [ "libc", ] +[[package]] +name = "cranelift-assembler-x64" +version = "0.118.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e4b56ebe316895d3fa37775d0a87b0c889cc933f5c8b253dbcc7c7bcb7fe7e4" +dependencies = [ + "cranelift-assembler-x64-meta", +] + +[[package]] +name = "cranelift-assembler-x64-meta" +version = "0.118.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95cabbc01dfbd7dcd6c329ca44f0212910309c221797ac736a67a5bc8857fe1b" + [[package]] name = "cranelift-bforest" -version = "0.116.1" +version = "0.118.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e15d04a0ce86cb36ead88ad68cf693ffd6cda47052b9e0ac114bc47fd9cd23c4" +checksum = "76ffe46df300a45f1dc6f609dc808ce963f0e3a2e971682c479a2d13e3b9b8ef" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-bitset" -version = "0.116.1" +version = "0.118.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c6e3969a7ce267259ce244b7867c5d3bc9e65b0a87e81039588dfdeaede9f34" +checksum = "b265bed7c51e1921fdae6419791d31af77d33662ee56d7b0fa0704dc8d231cab" dependencies = [ "serde", "serde_derive", @@ -460,11 +463,12 @@ dependencies = [ [[package]] name = "cranelift-codegen" -version = "0.116.1" +version = "0.118.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c22032c4cb42558371cf516bb47f26cdad1819d3475c133e93c49f50ebf304e" +checksum = "e606230a7e3a6897d603761baee0d19f88d077f17b996bb5089488a29ae96e41" dependencies = [ "bumpalo", + "cranelift-assembler-x64", "cranelift-bforest", "cranelift-bitset", "cranelift-codegen-meta", @@ -473,8 +477,9 @@ dependencies = [ "cranelift-entity", "cranelift-isle", "gimli 0.31.1", - "hashbrown 0.14.3", + "hashbrown", "log", + "pulley-interpreter", "regalloc2", "rustc-hash", "serde", @@ -484,33 +489,35 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.116.1" +version = "0.118.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c904bc71c61b27fc57827f4a1379f29de64fe95653b620a3db77d59655eee0b8" +checksum = "8a63bffafc23bc60969ad528e138788495999d935f0adcfd6543cb151ca8637d" dependencies = [ + "cranelift-assembler-x64", "cranelift-codegen-shared", + "pulley-interpreter", ] [[package]] name = "cranelift-codegen-shared" -version = "0.116.1" +version = "0.118.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40180f5497572f644ce88c255480981ae2ec1d7bb4d8e0c0136a13b87a2f2ceb" +checksum = "af50281b67324b58e843170a6a5943cf6d387c06f7eeacc9f5696e4ab7ae7d7e" [[package]] name = "cranelift-control" -version = "0.116.1" +version = "0.118.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d132c6d0bd8a489563472afc171759da0707804a65ece7ceb15a8c6d7dd5ef" +checksum = "8c20c1b38d1abfbcebb0032e497e71156c0e3b8dcb3f0a92b9863b7bcaec290c" dependencies = [ "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.116.1" +version = "0.118.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d0d9618275474fbf679dd018ac6e009acbd6ae6850f6a67be33fb3b00b323" +checksum = "0c2c67d95507c51b4a1ff3f3555fe4bfec36b9e13c1b684ccc602736f5d5f4a2" dependencies = [ "cranelift-bitset", "serde", @@ -519,9 +526,9 @@ dependencies = [ [[package]] name = "cranelift-frontend" -version = "0.116.1" +version = "0.118.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fac41e16729107393174b0c9e3730fb072866100e1e64e80a1a963b2e484d57" +checksum = "4e002691cc69c38b54fc7ec93e5be5b744f627d027031d991cc845d1d512d0ce" dependencies = [ "cranelift-codegen", "log", @@ -531,15 +538,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.116.1" +version = "0.118.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ca20d576e5070044d0a72a9effc2deacf4d6aa650403189d8ea50126483944d" +checksum = "e93588ed1796cbcb0e2ad160403509e2c5d330d80dd6e0014ac6774c7ebac496" [[package]] name = "cranelift-native" -version = "0.116.1" +version = "0.118.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8dee82f3f1f2c4cba9177f1cc5e350fe98764379bcd29340caa7b01f85076c7" +checksum = "e5b09bdd6407bf5d89661b80cf926ce731c9e8cc184bf49102267a2369a8358e" dependencies = [ "cranelift-codegen", "libc", @@ -736,14 +743,14 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.3" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" +checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f" dependencies = [ "anstream", "anstyle", "env_filter", - "humantime", + "jiff", "log", ] @@ -943,15 +950,6 @@ dependencies = [ "crunchy", ] -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" -dependencies = [ - "ahash", -] - [[package]] name = "hashbrown" version = "0.15.2" @@ -992,12 +990,6 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - [[package]] name = "iana-time-zone" version = "0.1.60" @@ -1044,7 +1036,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" dependencies = [ "equivalent", - "hashbrown 0.15.2", + "hashbrown", "serde", ] @@ -1125,6 +1117,30 @@ dependencies = [ "cc", ] +[[package]] +name = "jiff" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f33145a5cbea837164362c7bd596106eb7c5198f97d1ba6f6ebb3223952e488" +dependencies = [ + "jiff-static", + "log", + "portable-atomic", + "portable-atomic-util", + "serde", +] + +[[package]] +name = "jiff-static" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43ce13c40ec6956157a3635d97a1ee2df323b263f09ea14165131289cb0f5c19" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", +] + [[package]] name = "jobserver" version = "0.1.28" @@ -1202,9 +1218,9 @@ checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "log" -version = "0.4.21" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] name = "mach2" @@ -1282,7 +1298,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "crc32fast", - "hashbrown 0.15.2", + "hashbrown", "indexmap", "memchr", ] @@ -1357,6 +1373,21 @@ dependencies = [ "plotters-backend", ] +[[package]] +name = "portable-atomic" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" + +[[package]] +name = "portable-atomic-util" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +dependencies = [ + "portable-atomic", +] + [[package]] name = "postcard" version = "1.0.8" @@ -1421,21 +1452,20 @@ dependencies = [ [[package]] name = "pulley-interpreter" -version = "29.0.1" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62d95f8575df49a2708398182f49a888cf9dc30210fb1fd2df87c889edcee75d" +checksum = "0c3325791708ad50580aeacfcce06cb5e462c9ba7a2368e109cb2012b944b70e" dependencies = [ "cranelift-bitset", "log", - "sptr", "wasmtime-math", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] @@ -1509,7 +1539,7 @@ checksum = "145c1c267e14f20fb0f88aa76a1c5ffec42d592c1d28b3cd9148ae35916158d3" dependencies = [ "allocator-api2", "bumpalo", - "hashbrown 0.15.2", + "hashbrown", "log", "rustc-hash", "smallvec", @@ -2123,22 +2153,22 @@ dependencies = [ [[package]] name = "wasm-encoder" -version = "0.221.3" +version = "0.226.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc8444fe4920de80a4fe5ab564fff2ae58b6b73166b89751f8c6c93509da32e5" +checksum = "f7d81b727619aec227dce83e7f7420d4e56c79acd044642a356ea045b98d4e13" dependencies = [ - "leb128", - "wasmparser 0.221.3", + "leb128fmt", + "wasmparser 0.226.0", ] [[package]] name = "wasm-encoder" -version = "0.225.0" +version = "0.228.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f7eac0445cac73bcf09e6a97f83248d64356dccf9f2b100199769b6b42464e5" +checksum = "05d30290541f2d4242a162bbda76b8f2d8b1ac59eab3568ed6f2327d52c9b2c4" dependencies = [ "leb128fmt", - "wasmparser 0.225.0", + "wasmparser 0.228.0", ] [[package]] @@ -2157,23 +2187,12 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.202.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6998515d3cf3f8b980ef7c11b29a9b1017d4cf86b99ae93b546992df9931413" -dependencies = [ - "bitflags 2.5.0", - "indexmap", - "semver", -] - -[[package]] -name = "wasmparser" -version = "0.221.3" +version = "0.226.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d06bfa36ab3ac2be0dee563380147a5b81ba10dd8885d7fbbc9eb574be67d185" +checksum = "bc28600dcb2ba68d7e5f1c3ba4195c2bddc918c0243fd702d0b6dbd05689b681" dependencies = [ "bitflags 2.5.0", - "hashbrown 0.15.2", + "hashbrown", "indexmap", "semver", "serde", @@ -2181,41 +2200,44 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.225.0" +version = "0.228.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36e5456165f81e64cb9908a0fe9b9d852c2c74582aa3fe2be3c2da57f937d3ae" +checksum = "4abf1132c1fdf747d56bbc1bb52152400c70f336870f968b85e89ea422198ae3" dependencies = [ "bitflags 2.5.0", + "hashbrown", "indexmap", "semver", + "serde", ] [[package]] name = "wasmprinter" -version = "0.202.0" +version = "0.226.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab1cc9508685eef9502e787f4d4123745f5651a1e29aec047645d3cac1e2da7a" +checksum = "753a0516fa6c01756ee861f36878dfd9875f273aea9409d9ea390a333c5bcdc2" dependencies = [ "anyhow", - "wasmparser 0.202.0", + "termcolor", + "wasmparser 0.226.0", ] [[package]] name = "wasmprinter" -version = "0.221.3" +version = "0.228.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7343c42a97f2926c7819ff81b64012092ae954c5d83ddd30c9fcdefd97d0b283" +checksum = "0df64bd38c14db359d02ce2024c64eb161aa2618ccee5f3bc5acbbd65c9a875c" dependencies = [ "anyhow", "termcolor", - "wasmparser 0.221.3", + "wasmparser 0.228.0", ] [[package]] name = "wasmtime" -version = "29.0.1" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11976a250672556d1c4c04c6d5d7656ac9192ac9edc42a4587d6c21460010e69" +checksum = "b9fe78033c72da8741e724d763daf1375c93a38bfcea99c873ee4415f6098c3f" dependencies = [ "addr2line 0.24.2", "anyhow", @@ -2227,7 +2249,7 @@ dependencies = [ "encoding_rs", "fxprof-processed-profile", "gimli 0.31.1", - "hashbrown 0.14.3", + "hashbrown", "indexmap", "ittapi", "libc", @@ -2250,8 +2272,8 @@ dependencies = [ "sptr", "target-lexicon", "trait-variant", - "wasm-encoder 0.221.3", - "wasmparser 0.221.3", + "wasm-encoder 0.226.0", + "wasmparser 0.226.0", "wasmtime-asm-macros", "wasmtime-cache", "wasmtime-component-macro", @@ -2271,18 +2293,18 @@ dependencies = [ [[package]] name = "wasmtime-asm-macros" -version = "29.0.1" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f178b0d125201fbe9f75beaf849bd3e511891f9e45ba216a5b620802ccf64f2" +checksum = "47f3d44ae977d70ccf80938b371d5ec60b6adedf60800b9e8dd1223bb69f4cbc" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "29.0.1" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b1161c8f62880deea07358bc40cceddc019f1c81d46007bc390710b2fe24ffc" +checksum = "e209505770c7f38725513dba37246265fa6f724c30969de1e9d2a9e6c8f55099" dependencies = [ "anyhow", "base64", @@ -2300,9 +2322,9 @@ dependencies = [ [[package]] name = "wasmtime-component-macro" -version = "29.0.1" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d74de6592ed945d0a602f71243982a304d5d02f1e501b638addf57f42d57dfaf" +checksum = "397e68ee29eb072d8d8741c9d2c971a284cd1bc960ebf2c1f6a33ea6ba16d6e1" dependencies = [ "anyhow", "proc-macro2", @@ -2315,15 +2337,15 @@ dependencies = [ [[package]] name = "wasmtime-component-util" -version = "29.0.1" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707dc7b3c112ab5a366b30cfe2fb5b2f8e6a0f682f16df96a5ec582bfe6f056e" +checksum = "f292ef5eb2cf3d414c2bde59c7fa0feeba799c8db9a8c5a656ad1d1a1d05e10b" [[package]] name = "wasmtime-cranelift" -version = "29.0.1" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "366be722674d4bf153290fbcbc4d7d16895cc82fb3e869f8d550ff768f9e9e87" +checksum = "52fc12eb8ea695a30007a4849a5fd56209dd86a15579e92e0c27c27122818505" dependencies = [ "anyhow", "cfg-if", @@ -2336,19 +2358,20 @@ dependencies = [ "itertools 0.12.1", "log", "object 0.36.7", + "pulley-interpreter", "smallvec", "target-lexicon", "thiserror", - "wasmparser 0.221.3", + "wasmparser 0.226.0", "wasmtime-environ", "wasmtime-versioned-export-macros", ] [[package]] name = "wasmtime-environ" -version = "29.0.1" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdadc1af7097347aa276a4f008929810f726b5b46946971c660b6d421e9994ad" +checksum = "5b6b4bf08e371edf262cccb62de10e214bd4aaafaa069f1cd49c9c1c3a5ae8e4" dependencies = [ "anyhow", "cpp_demangle", @@ -2365,17 +2388,17 @@ dependencies = [ "serde_derive", "smallvec", "target-lexicon", - "wasm-encoder 0.221.3", - "wasmparser 0.221.3", - "wasmprinter 0.221.3", + "wasm-encoder 0.226.0", + "wasmparser 0.226.0", + "wasmprinter 0.226.0", "wasmtime-component-util", ] [[package]] name = "wasmtime-fiber" -version = "29.0.1" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccba90d4119f081bca91190485650730a617be1fff5228f8c4757ce133d21117" +checksum = "f4c8828d7d8fbe90d087a9edea9223315caf7eb434848896667e5d27889f1173" dependencies = [ "anyhow", "cc", @@ -2388,10 +2411,11 @@ dependencies = [ [[package]] name = "wasmtime-jit-debug" -version = "29.0.1" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e7b61488a5ee00c35c8c22de707c36c0aecacf419a3be803a6a2ba5e860f56a" +checksum = "ab9eff86dedd48b023199de2d266f5d3e37bc7c5bafdc1e3e3057214649ecf5a" dependencies = [ + "cc", "object 0.36.7", "rustix", "wasmtime-versioned-export-macros", @@ -2399,9 +2423,9 @@ dependencies = [ [[package]] name = "wasmtime-jit-icache-coherence" -version = "29.0.1" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec5e8552e01692e6c2e5293171704fed8abdec79d1a6995a0870ab190e5747d1" +checksum = "a54f6c6c7e9d7eeee32dfcc10db7f29d505ee7dd28d00593ea241d5f70698e64" dependencies = [ "anyhow", "cfg-if", @@ -2411,24 +2435,24 @@ dependencies = [ [[package]] name = "wasmtime-math" -version = "29.0.1" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29210ec2aa25e00f4d54605cedaf080f39ec01a872c5bd520ad04c67af1dde17" +checksum = "b1108aad2e6965698f9207ea79b80eda2b3dcc57dcb69f4258296d4664ae32cd" dependencies = [ "libm", ] [[package]] name = "wasmtime-slab" -version = "29.0.1" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb5821a96fa04ac14bc7b158bb3d5cd7729a053db5a74dad396cd513a5e5ccf" +checksum = "84d6a321317281b721c5530ef733e8596ecc6065035f286ccd155b3fa8e0ab2f" [[package]] name = "wasmtime-versioned-export-macros" -version = "29.0.1" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ff86db216dc0240462de40c8290887a613dddf9685508eb39479037ba97b5b" +checksum = "5732a5c86efce7bca121a61d8c07875f6b85c1607aa86753b40f7f8bd9d3a780" dependencies = [ "proc-macro2", "quote", @@ -2437,9 +2461,9 @@ dependencies = [ [[package]] name = "wasmtime-wasi" -version = "29.0.1" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d1be69bfcab1bdac74daa7a1f9695ab992b9c8e21b9b061e7d66434097e0ca4" +checksum = "9b425ede2633fade96bd624b6f35cea5f8be1995d149530882dbc35efbf1e31f" dependencies = [ "anyhow", "async-trait", @@ -2459,25 +2483,38 @@ dependencies = [ "thiserror", "tokio", "tracing", - "trait-variant", "url", "wasmtime", + "wasmtime-wasi-io", "wiggle", "windows-sys 0.59.0", ] +[[package]] +name = "wasmtime-wasi-io" +version = "31.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2ec650d8891ec5ff823bdcefe3b370278becd1f33125bcfdcf628943dcde676" +dependencies = [ + "anyhow", + "async-trait", + "bytes", + "futures", + "wasmtime", +] + [[package]] name = "wasmtime-winch" -version = "29.0.1" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdbabfb8f20502d5e1d81092b9ead3682ae59988487aafcd7567387b7a43cf8f" +checksum = "3aa4741ee66a52e2f0ec5f79040017123ba47d2dff9d994b35879cc2b7f468d4" dependencies = [ "anyhow", "cranelift-codegen", "gimli 0.31.1", "object 0.36.7", "target-lexicon", - "wasmparser 0.221.3", + "wasmparser 0.226.0", "wasmtime-cranelift", "wasmtime-environ", "winch-codegen", @@ -2485,9 +2522,9 @@ dependencies = [ [[package]] name = "wasmtime-wit-bindgen" -version = "29.0.1" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8358319c2dd1e4db79e3c1c5d3a5af84956615343f9f89f4e4996a36816e06e6" +checksum = "505c13fa0cac6c43e805347acf1e916c8de54e3790f2c22873c5692964b09b62" dependencies = [ "anyhow", "heck 0.5.0", @@ -2506,24 +2543,24 @@ dependencies = [ [[package]] name = "wast" -version = "225.0.0" +version = "228.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61496027ff707f9fa9e0b22c34ec163eb7adb1070df565e32a9180a76e4300b" +checksum = "9e5aae124478cb51439f6587f074a3a5e835afd22751c59a87b2e2a882727c97" dependencies = [ "bumpalo", "leb128fmt", "memchr", "unicode-width 0.2.0", - "wasm-encoder 0.225.0", + "wasm-encoder 0.228.0", ] [[package]] name = "wat" -version = "1.225.0" +version = "1.228.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e72a33942234fd0794bcdac30e43b448de3187512414267678e511c6755f11" +checksum = "7ec29c89a8d055df988de7236483bf569988ac3d6905899f6af5ef920f9385ad" dependencies = [ - "wast 225.0.0", + "wast 228.0.0", ] [[package]] @@ -2538,9 +2575,9 @@ dependencies = [ [[package]] name = "wiggle" -version = "29.0.1" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b9af35bc9629c52c261465320a9a07959164928b4241980ba1cf923b9e6751d" +checksum = "1dc9a83fe01faa51423fc84941cdbe0ec33ba1e9a75524a560a27a4ad1ff2c3b" dependencies = [ "anyhow", "async-trait", @@ -2553,9 +2590,9 @@ dependencies = [ [[package]] name = "wiggle-generate" -version = "29.0.1" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cf267dd05673912c8138f4b54acabe6bd53407d9d1536f0fadb6520dd16e101" +checksum = "d250c01cd52cfdb40aad167fad579af55acbeccb85a54827099d31dc1b90cbd7" dependencies = [ "anyhow", "heck 0.5.0", @@ -2568,9 +2605,9 @@ dependencies = [ [[package]] name = "wiggle-macro" -version = "29.0.1" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c5c473d4198e6c2d377f3809f713ff0c110cab88a0805ae099a82119ee250c" +checksum = "35be0aee84be808a5e17f6b732e110eb75703d9d6e66e22c7464d841aa2600c5" dependencies = [ "proc-macro2", "quote", @@ -2611,9 +2648,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winch-codegen" -version = "29.0.1" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f849ef2c5f46cb0a20af4b4487aaa239846e52e2c03f13fa3c784684552859c" +checksum = "e02f05457f74ec3c94d5c5caac06b84fd8d9d4d7fa21419189845ed245a53477" dependencies = [ "anyhow", "cranelift-codegen", @@ -2622,7 +2659,7 @@ dependencies = [ "smallvec", "target-lexicon", "thiserror", - "wasmparser 0.221.3", + "wasmparser 0.226.0", "wasmtime-cranelift", "wasmtime-environ", ] @@ -2739,9 +2776,9 @@ dependencies = [ [[package]] name = "wit-parser" -version = "0.221.3" +version = "0.226.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "896112579ed56b4a538b07a3d16e562d101ff6265c46b515ce0c701eef16b2ac" +checksum = "33f007722bfd43a2978c5b8b90f02c927dddf0f11c5f5b50929816b3358718cd" dependencies = [ "anyhow", "id-arena", @@ -2752,7 +2789,7 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser 0.221.3", + "wasmparser 0.226.0", ] [[package]] @@ -2778,9 +2815,9 @@ dependencies = [ "log", "rayon", "structopt", - "wasm-encoder 0.202.0", - "wasmparser 0.202.0", - "wasmprinter 0.202.0", + "wasm-encoder 0.228.0", + "wasmparser 0.228.0", + "wasmprinter 0.228.0", "wasmtime", "wasmtime-wasi", "wat", @@ -2794,7 +2831,7 @@ dependencies = [ "libfuzzer-sys", "log", "wasm-smith", - "wasmprinter 0.202.0", + "wasmprinter 0.228.0", "wasmtime", "wizer", ] diff --git a/Cargo.toml b/Cargo.toml index 4aa3cb55..89b0db54 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,14 +27,14 @@ name = "uap" harness = false [dependencies] -anyhow = "1.0.81" -cap-std = "3.0.0" -env_logger = { version = "0.11", optional = true } -log = "0.4.21" +anyhow = "1.0.97" +cap-std = "3.4.3" +env_logger = { version = "0.11.8", optional = true } +log = "0.4.27" rayon = "1.10.0" structopt = { version = "0.3.26", optional = true } -wasm-encoder = "0.202.0" -wasmparser = "0.202.0" +wasm-encoder = "0.228.0" +wasmparser = "0.228.0" wasmtime = { workspace = true } wasmtime-wasi = { workspace = true, features = ["preview1"] } @@ -45,15 +45,15 @@ workspace = true optional = true [workspace.dependencies] -wasmprinter = "0.202.0" -wasmtime = "29" -wasmtime-wasi = "29" +wasmprinter = "0.228.0" +wasmtime = "31" +wasmtime-wasi = "31" [dev-dependencies] criterion = "0.5.1" -env_logger = "0.11.3" +env_logger = "0.11.8" wasmprinter = { workspace = true } -wat = "1.202.0" +wat = "1.228.0" [workspace] members = [ diff --git a/fuzz/fuzz_targets/same_result.rs b/fuzz/fuzz_targets/same_result.rs index 8b84d8eb..76a58ce5 100644 --- a/fuzz/fuzz_targets/same_result.rs +++ b/fuzz/fuzz_targets/same_result.rs @@ -198,7 +198,10 @@ fuzz_target!(|data: &[u8]| { panic!("divergence between snapshot and non-snapshot memories"); } } - Extern::SharedMemory(_) | Extern::Func(_) | Extern::Table(_) => continue, + Extern::SharedMemory(_) + | Extern::Func(_) + | Extern::Table(_) + | Extern::Tag(_) => continue, } } } diff --git a/src/dummy.rs b/src/dummy.rs index 6248662e..949447a5 100644 --- a/src/dummy.rs +++ b/src/dummy.rs @@ -41,6 +41,9 @@ pub fn dummy_extern(store: &mut crate::Store, ty: ExternType, name: &str) -> Res ExternType::Memory(_) => { anyhow::bail!("Error: attempted to import unknown memory: {}", name) } + ExternType::Tag(_) => { + anyhow::bail!("Error: attempted to import unknown tag: {}", name) + } }) } diff --git a/src/info/types_interner.rs b/src/info/types_interner.rs index 21969557..748a835b 100644 --- a/src/info/types_interner.rs +++ b/src/info/types_interner.rs @@ -64,10 +64,11 @@ impl TypesInterner { ty: wasmparser::CompositeType, _types_space: &[TypeId], ) -> TypeId { - match ty { - wasmparser::CompositeType::Func(func_ty) => self.insert(Type::Func(func_ty)), - wasmparser::CompositeType::Array(_) => todo!(), - wasmparser::CompositeType::Struct(_) => todo!(), + match ty.inner { + wasmparser::CompositeInnerType::Func(func_ty) => self.insert(Type::Func(func_ty)), + wasmparser::CompositeInnerType::Array(_) => todo!(), + wasmparser::CompositeInnerType::Struct(_) => todo!(), + wasmparser::CompositeInnerType::Cont(_) => todo!(), } } diff --git a/src/lib.rs b/src/lib.rs index 5a0a31e7..05898b71 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -17,6 +17,7 @@ mod snapshot; mod stack_ext; mod translate; +use wasmparser::WasmFeatures; /// Re-export wasmtime so users can align with our version. This is /// especially useful when providing a custom Linker. pub use wasmtime; @@ -665,6 +666,9 @@ impl Wizer { .unwrap_or(DEFAULT_WASM_REFERENCE_TYPES), ); + config.wasm_tail_call(true); + config.wasm_extended_const(true); + // Proposals that we should add support for. config.wasm_threads(false); @@ -673,59 +677,34 @@ impl Wizer { // NB: keep this in sync with the Wasmtime config. fn wasm_features(&self) -> wasmparser::WasmFeatures { - wasmparser::WasmFeatures { - mutable_global: true, - saturating_float_to_int: true, - sign_extension: true, - floats: true, - component_model_values: false, - component_model_nested_names: false, - - // Proposals that we support. - multi_memory: self.wasm_multi_memory.unwrap_or(DEFAULT_WASM_MULTI_MEMORY), - multi_value: self.wasm_multi_value.unwrap_or(DEFAULT_WASM_MULTI_VALUE), - - // Proposals that we should add support for. - reference_types: self - .wasm_reference_types + let mut features = WasmFeatures::WASM2; + + features.set( + WasmFeatures::MULTI_MEMORY, + self.wasm_multi_memory.unwrap_or(DEFAULT_WASM_MULTI_MEMORY), + ); + features.set( + WasmFeatures::MULTI_VALUE, + self.wasm_multi_value.unwrap_or(DEFAULT_WASM_MULTI_VALUE), + ); + features.set( + WasmFeatures::BULK_MEMORY, + self.wasm_bulk_memory.unwrap_or(DEFAULT_WASM_BULK_MEMORY), + ); + features.set( + WasmFeatures::SIMD, + self.wasm_simd.unwrap_or(DEFAULT_WASM_SIMD), + ); + features.set( + WasmFeatures::REFERENCE_TYPES, + self.wasm_reference_types .unwrap_or(DEFAULT_WASM_REFERENCE_TYPES), - simd: self.wasm_simd.unwrap_or(DEFAULT_WASM_SIMD), - threads: false, - tail_call: false, - memory64: false, - exceptions: false, - extended_const: false, - relaxed_simd: false, - component_model: false, - memory_control: false, - function_references: false, - gc: false, - - // XXX: Though we don't fully support bulk memory yet, we - // unconditionally turn it on. - // - // Many parsers, notably our own `wasmparser`, assume that which - // Wasm features are enabled or disabled cannot affect parsing, only - // validation. That assumption is incorrect when it comes to data - // segments, the multi-memory proposal, and the bulk memory - // proposal. A `0x01` prefix of a data segment can either mean "this - // is a passive segment" if bulk memory is enabled or "this segment - // is referring to memory index 1" if both bulk memory is disabled - // and multi-memory is enabled. `wasmparser` fails to handle this - // edge case, which means that everything built on top of it, like - // Wasmtime, also fail to handle this edge case. However, because - // bulk memory is merged into the spec proper and is no longer - // technically a "proposal", and because a fix would require - // significant refactoring and API changes to give a - // `wasmparser::Parser` a `wasmparser::WasmFeatures`, we won't ever - // resolve this discrepancy in `wasmparser`. - // - // So we enable bulk memory during parsing, validation, and - // execution, but we add our own custom validation pass to ensure - // that no table-mutating instructions exist in our input modules - // until we *actually* support bulk memory. - bulk_memory: true, - } + ); + + features.set(WasmFeatures::TAIL_CALL, true); + features.set(WasmFeatures::EXTENDED_CONST, true); + + return features; } fn wasm_validate(&self, wasm: &[u8]) -> anyhow::Result<()> { diff --git a/src/parse.rs b/src/parse.rs index 10ceb20a..2ef58c82 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -102,7 +102,6 @@ pub(crate) fn parse<'a>(full_wasm: &'a [u8]) -> anyhow::Result assert!(stack.is_empty()); return Ok(cx); } - ComponentTypeSection(_) | ComponentImportSection(_) | ComponentExportSection(_) @@ -116,6 +115,7 @@ pub(crate) fn parse<'a>(full_wasm: &'a [u8]) -> anyhow::Result | ComponentSection { .. } => { unreachable!() } + _ => anyhow::bail!("unsupported wasmparser payload"), } } } @@ -133,12 +133,13 @@ fn type_section<'a>( // instance imports. for group in types { for ty in group?.into_types() { - match ty.composite_type { - ty @ wasmparser::CompositeType::Func(_) => { - module.push_type(cx, ty); + match ty.composite_type.inner { + wasmparser::CompositeInnerType::Func(_) => { + module.push_type(cx, ty.composite_type); } - wasmparser::CompositeType::Array(_) => todo!(), - wasmparser::CompositeType::Struct(_) => todo!(), + wasmparser::CompositeInnerType::Array(_) => todo!(), + wasmparser::CompositeInnerType::Struct(_) => todo!(), + wasmparser::CompositeInnerType::Cont(_) => todo!(), } } } diff --git a/src/rewrite.rs b/src/rewrite.rs index 01742ec3..637913e6 100644 --- a/src/rewrite.rs +++ b/src/rewrite.rs @@ -166,7 +166,7 @@ impl Wizer { fn is_name_section(s: &wasm_encoder::RawSection) -> bool { s.id == u8::from(SectionId::Custom) && { - let mut reader = wasmparser::BinaryReader::new(s.data); + let mut reader = wasmparser::BinaryReader::new(s.data, 0); matches!(reader.read_string(), Ok("name")) } } diff --git a/src/translate.rs b/src/translate.rs index c57ad094..6b0addc1 100644 --- a/src/translate.rs +++ b/src/translate.rs @@ -18,6 +18,7 @@ pub(crate) fn global_type(ty: wasmparser::GlobalType) -> wasm_encoder::GlobalTyp wasm_encoder::GlobalType { val_type: val_type(ty.content_type), mutable: ty.mutable, + shared: ty.shared, } } @@ -27,6 +28,7 @@ pub(crate) fn memory_type(ty: wasmparser::MemoryType) -> wasm_encoder::MemoryTyp maximum: ty.maximum.map(|val| val.into()), memory64: ty.memory64, shared: ty.shared, + page_size_log2: None, } } diff --git a/tests/tests.rs b/tests/tests.rs index 4005f414..7a9bbc51 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -97,10 +97,10 @@ fn fails_wizening(wat: &str) -> Result<()> { let wasm = wat_to_wasm(wat)?; - let mut validator = wasmparser::Validator::new_with_features(wasmparser::WasmFeatures { - multi_memory: true, - ..Default::default() - }); + let mut features = wasmparser::WasmFeatures::WASM2; + features.set(wasmparser::WasmFeatures::MULTI_MEMORY, true); + + let mut validator = wasmparser::Validator::new_with_features(features); validator .validate_all(&wasm) .context("initial Wasm should be valid")?; @@ -556,6 +556,8 @@ fn rename_functions() -> Result<()> { (module (type (;0;) (func)) (type (;1;) (func (result i32))) + (export "func_a" (func 2)) + (export "func_b" (func 3)) (func (;0;) (type 0)) (func (;1;) (type 1) (result i32) i32.const 1 @@ -566,8 +568,6 @@ fn rename_functions() -> Result<()> { (func (;3;) (type 1) (result i32) i32.const 3 ) - (export "func_a" (func 2)) - (export "func_b" (func 3)) ) "#; @@ -707,8 +707,13 @@ fn accept_bulk_memory_copy() -> Result<()> { fn accept_bulk_memory_data_count() -> Result<()> { let mut module = wasm_encoder::Module::new(); let mut types = wasm_encoder::TypeSection::new(); - types.function(vec![], vec![wasm_encoder::ValType::I32]); - types.function(vec![], vec![]); + types.ty().func_type(&wasm_encoder::FuncType::new( + vec![], + vec![wasm_encoder::ValType::I32], + )); + types + .ty() + .func_type(&wasm_encoder::FuncType::new(vec![], vec![])); module.section(&types); let mut functions = wasm_encoder::FunctionSection::new(); @@ -722,6 +727,7 @@ fn accept_bulk_memory_data_count() -> Result<()> { maximum: Some(1), memory64: false, shared: false, + page_size_log2: None, }); module.section(&memory);