diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8b527bb944..055d4576f7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -162,7 +162,7 @@ jobs: submodules: true - uses: ./.github/actions/install-rust - run: cargo test --locked -p wasmparser --benches - - run: cargo test --locked -p wasm-encoder --all-features + - run: cargo test --locked --all-features --manifest-path crates/wasm-encoder/Cargo.toml - run: cargo test -p wasm-smith --features wasmparser - run: cargo test -p wasm-smith --features component-model - run: cargo test --locked -p wasmparser --features try-op @@ -306,11 +306,11 @@ jobs: - run: cargo check --no-default-features -p wat - run: cargo check --no-default-features -p wat --features component-model - run: cargo check --no-default-features -p wat --features dwarf - - run: cargo check --no-default-features -p wasm-encoder - - run: cargo check --no-default-features -p wasm-encoder --target x86_64-unknown-none - - run: cargo check --no-default-features -p wasm-encoder --target x86_64-unknown-none --features wasmparser,component-model - - run: cargo check --no-default-features -p wasm-encoder --features component-model - - run: cargo check --no-default-features -p wasm-encoder --features wasmparser + - run: cargo check --no-default-features --manifest-path crates/wasm-encoder/Cargo.toml + - run: cargo check --no-default-features --manifest-path crates/wasm-encoder/Cargo.toml --target x86_64-unknown-none + - run: cargo check --no-default-features --manifest-path crates/wasm-encoder/Cargo.toml --target x86_64-unknown-none --features wasmparser,component-model + - run: cargo check --no-default-features --manifest-path crates/wasm-encoder/Cargo.toml --features component-model + - run: cargo check --no-default-features --manifest-path crates/wasm-encoder/Cargo.toml --features wasmparser - run: cargo check --no-default-features -p wasm-smith - run: cargo check --no-default-features -p wasm-smith --features component-model - run: cargo check --no-default-features -p wasm-smith --features wasmparser diff --git a/Cargo.lock b/Cargo.lock index f53601b205..7de56f004f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,29 +4,20 @@ version = 4 [[package]] name = "addr2line" -version = "0.24.2" +version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" dependencies = [ - "cpp_demangle", + "cpp_demangle 0.4.4", "fallible-iterator", - "gimli 0.31.1", + "gimli", "memmap2", - "object 0.36.7", + "object", "rustc-demangle", "smallvec", "typed-arena", ] -[[package]] -name = "addr2line" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" -dependencies = [ - "gimli 0.32.3", -] - [[package]] name = "adler2" version = "2.0.1" @@ -175,9 +166,9 @@ dependencies = [ [[package]] name = "auditable-serde" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c7bf8143dfc3c0258df908843e169b5cc5fcf76c7718bd66135ef4a9cd558c5" +checksum = "d026218ae25ba5c72834245412dd1338f6d270d2c5109ee03a4badec288d4056" dependencies = [ "semver", "serde", @@ -242,25 +233,26 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.8" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +checksum = "87a0c0e6148f11f01f32650a2ea02d532b2ad4e81d8bd41e6e565b5adc5e6082" dependencies = [ "serde", + "serde_core", ] [[package]] name = "cargo_metadata" -version = "0.19.0" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc309ed89476c8957c50fb818f56fe894db857866c3e163335faa91dc34eb85" +checksum = "ef987d17b0a113becdd19d3d0022d04d7ef41f9efe4f3fb63ac44ba61df3ade9" dependencies = [ "camino", "cargo-platform", "semver", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] @@ -287,6 +279,17 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" +[[package]] +name = "chacha20" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f8d983286843e49675a4b7a2d174efe136dc93a18d69130dd18198a6c167601" +dependencies = [ + "cfg-if", + "cpufeatures", + "rand_core", +] + [[package]] name = "ciborium" version = "0.2.2" @@ -413,6 +416,24 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "cpp_demangle" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0667304c32ea56cb4cd6d2d7c0cfe9a2f8041229db8c033af7f8d69492429def" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +dependencies = [ + "libc", +] + [[package]] name = "cranelift-assembler-x64" version = "0.123.7" @@ -465,7 +486,7 @@ dependencies = [ "cranelift-control", "cranelift-entity", "cranelift-isle", - "gimli 0.32.3", + "gimli", "hashbrown 0.15.4", "log", "pulley-interpreter", @@ -562,23 +583,20 @@ dependencies = [ [[package]] name = "criterion" -version = "0.5.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +checksum = "e1c047a62b0cc3e145fa84415a3191f628e980b194c2755aa12300a4e6cbd928" dependencies = [ "anes", "cast", "ciborium", "clap", "criterion-plot", - "is-terminal", - "itertools 0.10.5", + "itertools 0.13.0", "num-traits", - "once_cell", "oorandom", "regex", "serde", - "serde_derive", "serde_json", "tinytemplate", "walkdir", @@ -586,12 +604,12 @@ dependencies = [ [[package]] name = "criterion-plot" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +checksum = "9b1bcc0dc7dfae599d84ad0b1a55f80cde8af3725da8313b528da95ef783e338" dependencies = [ "cast", - "itertools 0.10.5", + "itertools 0.13.0", ] [[package]] @@ -922,19 +940,22 @@ checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ "cfg-if", "libc", - "r-efi", + "r-efi 5.3.0", "wasi", ] [[package]] -name = "gimli" -version = "0.31.1" +name = "getrandom" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" dependencies = [ - "fallible-iterator", - "indexmap 2.14.0", - "stable_deref_trait", + "cfg-if", + "libc", + "r-efi 6.0.0", + "rand_core", + "wasip2", + "wasip3", ] [[package]] @@ -1204,17 +1225,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "is-terminal" -version = "0.4.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.59.0", -] - [[package]] name = "is_executable" version = "1.0.4" @@ -1232,9 +1242,9 @@ checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" -version = "0.10.5" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] @@ -1284,7 +1294,7 @@ version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" dependencies = [ - "getrandom", + "getrandom 0.3.3", "libc", ] @@ -1462,17 +1472,6 @@ dependencies = [ "libc", ] -[[package]] -name = "object" -version = "0.36.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" -dependencies = [ - "flate2", - "memchr", - "ruzstd", -] - [[package]] name = "object" version = "0.37.3" @@ -1480,9 +1479,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" dependencies = [ "crc32fast", + "flate2", "hashbrown 0.15.4", "indexmap 2.14.0", "memchr", + "ruzstd", ] [[package]] @@ -1558,15 +1559,6 @@ dependencies = [ "serde", ] -[[package]] -name = "ppv-lite86" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" -dependencies = [ - "zerocopy", -] - [[package]] name = "pretty_assertions" version = "1.4.1" @@ -1635,33 +1627,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] -name = "rand" -version = "0.9.1" +name = "r-efi" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" -dependencies = [ - "rand_chacha", - "rand_core", -] +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" [[package]] -name = "rand_chacha" -version = "0.9.0" +name = "rand" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207" dependencies = [ - "ppv-lite86", + "chacha20", + "getrandom 0.4.2", "rand_core", ] [[package]] name = "rand_core" -version = "0.9.3" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" -dependencies = [ - "getrandom", -] +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" [[package]] name = "rayon" @@ -1753,19 +1739,13 @@ dependencies = [ [[package]] name = "ruzstd" -version = "0.7.3" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad02996bfc73da3e301efe90b1837be9ed8f4a462b6ed410aa35d00381de89f" +checksum = "3640bec8aad418d7d03c72ea2de10d5c646a598f9883c7babc160d91e3c1b26c" dependencies = [ "twox-hash", ] -[[package]] -name = "ryu" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" - [[package]] name = "same-file" version = "1.0.6" @@ -1817,14 +1797,15 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ "itoa", "memchr", - "ryu", "serde", + "serde_core", + "zmij", ] [[package]] @@ -1869,16 +1850,19 @@ dependencies = [ ] [[package]] -name = "stable_deref_trait" -version = "1.2.0" +name = "spdx" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "a8da593e30beb790fc9424502eb898320b44e5eb30367dbda1c1edde8e2f32d7" +dependencies = [ + "smallvec", +] [[package]] -name = "static_assertions" -version = "1.1.0" +name = "stable_deref_trait" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "strsim" @@ -1927,7 +1911,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" dependencies = [ "fastrand", - "getrandom", + "getrandom 0.3.3", "once_cell", "rustix", "windows-sys 0.59.0", @@ -1957,7 +1941,7 @@ name = "test-programs" version = "0.1.0" dependencies = [ "rand", - "wit-bindgen", + "wit-bindgen 0.49.0", "wit-dylib-ffi", ] @@ -2029,13 +2013,9 @@ checksum = "ea68304e134ecd095ac6c3574494fc62b909f416c4fca77e440530221e549d3d" [[package]] name = "twox-hash" -version = "1.6.3" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" -dependencies = [ - "cfg-if", - "static_assertions", -] +checksum = "9ea3136b675547379c4bd395ca6b938e5ad3c3d20fad76e7fe85f9e0d011419c" [[package]] name = "typed-arena" @@ -2127,6 +2107,24 @@ version = "36.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4da2ec25ddcaf86d98cd2e1928af72963bc24318cf22fee36c61953bc5fd9f28" +[[package]] +name = "wasip2" +version = "1.0.2+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +dependencies = [ + "wit-bindgen 0.51.0", +] + +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" +dependencies = [ + "wit-bindgen 0.51.0", +] + [[package]] name = "wasm-compose" version = "0.246.2" @@ -2179,6 +2177,16 @@ dependencies = [ "wasmparser 0.243.0", ] +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser 0.244.0", +] + [[package]] name = "wasm-encoder" version = "0.246.2" @@ -2201,7 +2209,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "spdx", + "spdx 0.10.8", "wasm-encoder 0.214.0", "wasmparser 0.214.0", ] @@ -2218,6 +2226,18 @@ dependencies = [ "wasmparser 0.243.0", ] +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap 2.14.0", + "wasm-encoder 0.244.0", + "wasmparser 0.244.0", +] + [[package]] name = "wasm-metadata" version = "0.246.2" @@ -2230,7 +2250,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "spdx", + "spdx 0.13.4", "url", "wasm-encoder 0.246.2", "wasmparser 0.246.2", @@ -2310,7 +2330,7 @@ dependencies = [ name = "wasm-tools" version = "1.246.2" dependencies = [ - "addr2line 0.24.2", + "addr2line", "anyhow", "arbitrary", "bitflags", @@ -2318,9 +2338,9 @@ dependencies = [ "clap", "clap_complete", "comfy-table", - "cpp_demangle", + "cpp_demangle 0.5.1", "env_logger", - "gimli 0.31.1", + "gimli", "indexmap 2.14.0", "is_executable", "json-from-wast", @@ -2440,6 +2460,18 @@ dependencies = [ "semver", ] +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags", + "hashbrown 0.15.4", + "indexmap 2.14.0", + "semver", +] + [[package]] name = "wasmparser" version = "0.246.2" @@ -2487,7 +2519,7 @@ version = "36.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b80d5ba38b9b00f60a0665e07dde38e91d884d4a78cd61d777c8cf081a1267c1" dependencies = [ - "addr2line 0.25.1", + "addr2line", "anyhow", "bitflags", "bumpalo", @@ -2500,7 +2532,7 @@ dependencies = [ "log", "mach2", "memfd", - "object 0.37.3", + "object", "once_cell", "postcard", "pulley-interpreter", @@ -2536,10 +2568,10 @@ dependencies = [ "anyhow", "cranelift-bitset", "cranelift-entity", - "gimli 0.32.3", + "gimli", "indexmap 2.14.0", "log", - "object 0.37.3", + "object", "postcard", "semver", "serde", @@ -2595,10 +2627,10 @@ dependencies = [ "cranelift-entity", "cranelift-frontend", "cranelift-native", - "gimli 0.32.3", + "gimli", "itertools 0.14.0", "log", - "object 0.37.3", + "object", "pulley-interpreter", "smallvec", "target-lexicon", @@ -2672,7 +2704,7 @@ dependencies = [ "cfg-if", "cranelift-codegen", "log", - "object 0.37.3", + "object", ] [[package]] @@ -2694,8 +2726,8 @@ checksum = "6a8cb36b61fbcff2c8bcd14f9f2651a6e52b019d0d329324620d7bc971b2b235" dependencies = [ "anyhow", "cranelift-codegen", - "gimli 0.32.3", - "object 0.37.3", + "gimli", + "object", "target-lexicon", "wasmparser 0.236.1", "wasmtime-environ", @@ -2722,7 +2754,7 @@ version = "246.0.2" dependencies = [ "anyhow", "bumpalo", - "gimli 0.31.1", + "gimli", "leb128fmt", "libtest-mimic", "memchr", @@ -2780,7 +2812,7 @@ dependencies = [ "anyhow", "cranelift-assembler-x64", "cranelift-codegen", - "gimli 0.32.3", + "gimli", "regalloc2", "smallvec", "target-lexicon", @@ -2958,7 +2990,16 @@ version = "0.49.0" source = "git+https://github.com/bytecodealliance/wit-bindgen#f1d72d49a60524263e697dfa9d92fb44481d4134" dependencies = [ "futures", - "wit-bindgen-rust-macro", + "wit-bindgen-rust-macro 0.49.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro 0.51.0", ] [[package]] @@ -2971,6 +3012,17 @@ dependencies = [ "wit-parser 0.243.0", ] +[[package]] +name = "wit-bindgen-core" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck", + "wit-parser 0.244.0", +] + [[package]] name = "wit-bindgen-rt" version = "0.26.0" @@ -3000,10 +3052,26 @@ dependencies = [ "prettyplease", "syn", "wasm-metadata 0.243.0", - "wit-bindgen-core", + "wit-bindgen-core 0.49.0", "wit-component 0.243.0", ] +[[package]] +name = "wit-bindgen-rust" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck", + "indexmap 2.14.0", + "prettyplease", + "syn", + "wasm-metadata 0.244.0", + "wit-bindgen-core 0.51.0", + "wit-component 0.244.0", +] + [[package]] name = "wit-bindgen-rust-macro" version = "0.49.0" @@ -3014,8 +3082,23 @@ dependencies = [ "proc-macro2", "quote", "syn", - "wit-bindgen-core", - "wit-bindgen-rust", + "wit-bindgen-core 0.49.0", + "wit-bindgen-rust 0.49.0", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn", + "wit-bindgen-core 0.51.0", + "wit-bindgen-rust 0.51.0", ] [[package]] @@ -3056,6 +3139,25 @@ dependencies = [ "wit-parser 0.243.0", ] +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags", + "indexmap 2.14.0", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder 0.244.0", + "wasm-metadata 0.244.0", + "wasmparser 0.244.0", + "wit-parser 0.244.0", +] + [[package]] name = "wit-component" version = "0.246.2" @@ -3105,7 +3207,7 @@ dependencies = [ name = "wit-dylib-ffi" version = "0.1.0" dependencies = [ - "wit-bindgen", + "wit-bindgen 0.49.0", ] [[package]] @@ -3175,6 +3277,24 @@ dependencies = [ "wasmparser 0.243.0", ] +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap 2.14.0", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.244.0", +] + [[package]] name = "wit-parser" version = "0.246.2" @@ -3338,3 +3458,9 @@ dependencies = [ "quote", "syn", ] + +[[package]] +name = "zmij" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/Cargo.toml b/Cargo.toml index c2d8b43b0f..764870a352 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -115,9 +115,9 @@ bytesize = "2.0.0" clap = { version = "4.0.0", features = ["derive"] } clap_complete = "4.4.7" comfy-table = { version = "7.1.3", default-features = false } -criterion = { version = "0.5.1", default-features = false } +criterion = { version = "0.7.0", default-features = false } env_logger = "0.11" -gimli = "0.31.1" +gimli = "0.32.0" hashbrown = { version = "0.17.0", default-features = false, features = ['default-hasher'] } id-arena = { version = "2.3.0", default-features = false } indexmap = { version = "2.14.0", default-features = false } @@ -128,14 +128,14 @@ libtest-mimic = "0.8.1" log = "0.4.17" num_cpus = "1.13" pretty_assertions = "1.3.0" -rand = { version = "0.9.1", features = ["small_rng"] } +rand = "0.10.1" rayon = "1.3" semver = { version = "1.0.0", default-features = false } serde = { version = "1.0.166", default-features = false, features = ['alloc'] } serde_derive = "1.0.166" serde_json = { version = "1" } smallvec = "1.11.1" -spdx = "0.10.1" +spdx = "0.13.4" termcolor = "1.2.0" url = "2.0.0" wasmtime = { version = "36.0.7", default-features = false, features = ['cranelift', 'component-model', 'runtime', 'gc-drc'] } @@ -200,7 +200,7 @@ wasm-encoder = { workspace = true, features = ["std"], optional = true } wasm-compose = { workspace = true, optional = true, features = ['default'] } # Dependencies of `demangle` -cpp_demangle = { version = "0.4.0", optional = true } +cpp_demangle = { version = "0.5.1", optional = true } rustc-demangle = { version = "0.1.21", optional = true } # Dependencies of `component` @@ -217,7 +217,7 @@ bytesize = { workspace = true } wit-smith = { workspace = true, features = ["clap"], optional = true } # Dependencies of `addr2line` -addr2line = { version = "0.24.0", optional = true } +addr2line = { version = "0.25.0", optional = true } gimli = { workspace = true, optional = true } # Dependencies of `wast` diff --git a/crates/fuzz-stats/src/bin/failed-instantiations.rs b/crates/fuzz-stats/src/bin/failed-instantiations.rs index aba9889714..7f6f087e5c 100644 --- a/crates/fuzz-stats/src/bin/failed-instantiations.rs +++ b/crates/fuzz-stats/src/bin/failed-instantiations.rs @@ -1,5 +1,5 @@ use arbitrary::{Arbitrary, Error, Unstructured}; -use rand::RngCore; +use rand::Rng; use std::sync::Arc; use std::sync::atomic::{AtomicIsize, AtomicUsize, Ordering::SeqCst}; use wasmtime::*; diff --git a/crates/wasm-metadata/Cargo.toml b/crates/wasm-metadata/Cargo.toml index 191aae4024..b1837f846e 100644 --- a/crates/wasm-metadata/Cargo.toml +++ b/crates/wasm-metadata/Cargo.toml @@ -21,7 +21,7 @@ spdx = { workspace = true, optional = true } url = { workspace = true, optional = true } wasm-encoder = { workspace = true, features = ['std', 'component-model'] } wasmparser = { workspace = true, features = ['std', 'component-model', 'hash-collections'] } -auditable-serde = { version = "0.8.0", optional = true } +auditable-serde = { version = "0.9.0", optional = true } flate2 = { version = "1.1.0", optional = true } [features] diff --git a/crates/wasm-mutate-stats/src/bin/wasm-mutate-stats.rs b/crates/wasm-mutate-stats/src/bin/wasm-mutate-stats.rs index b1176520c1..e70b620cd2 100644 --- a/crates/wasm-mutate-stats/src/bin/wasm-mutate-stats.rs +++ b/crates/wasm-mutate-stats/src/bin/wasm-mutate-stats.rs @@ -1,7 +1,7 @@ use anyhow::Context; use clap::Parser; use core::sync::atomic::Ordering::{Relaxed, SeqCst}; -use rand::Rng; +use rand::RngExt; use rand::{SeedableRng, rngs::SmallRng}; use std::collections::hash_map::DefaultHasher; use std::ffi::OsStr; diff --git a/crates/wasm-mutate/src/lib.rs b/crates/wasm-mutate/src/lib.rs index 2e2443b31b..7e975cdd48 100644 --- a/crates/wasm-mutate/src/lib.rs +++ b/crates/wasm-mutate/src/lib.rs @@ -27,7 +27,7 @@ use crate::mutators::{ }; use info::ModuleInfo; use mutators::Mutator; -use rand::{Rng, SeedableRng, rngs::SmallRng}; +use rand::{RngExt, SeedableRng, rngs::SmallRng}; use std::sync::Arc; #[cfg(feature = "clap")] diff --git a/crates/wasm-mutate/src/mutators/add_function.rs b/crates/wasm-mutate/src/mutators/add_function.rs index 5b76b9302f..9349f1f215 100644 --- a/crates/wasm-mutate/src/mutators/add_function.rs +++ b/crates/wasm-mutate/src/mutators/add_function.rs @@ -3,7 +3,7 @@ use super::Mutator; use crate::module::{PrimitiveTypeInfo, TypeInfo}; use crate::{Result, WasmMutate}; -use rand::Rng; +use rand::RngExt; use wasm_encoder::{AbstractHeapType, HeapType, Module}; /// Mutator that adds new, empty functions to a Wasm module. diff --git a/crates/wasm-mutate/src/mutators/add_type.rs b/crates/wasm-mutate/src/mutators/add_type.rs index 6e441afc39..7fddf7e8fb 100644 --- a/crates/wasm-mutate/src/mutators/add_type.rs +++ b/crates/wasm-mutate/src/mutators/add_type.rs @@ -3,7 +3,7 @@ use super::Mutator; use crate::Result; use crate::module::map_type; -use rand::Rng; +use rand::{Rng, RngExt}; use std::iter; /// A mutator that appends a new type to the type section. diff --git a/crates/wasm-mutate/src/mutators/codemotion.rs b/crates/wasm-mutate/src/mutators/codemotion.rs index 4db28f502e..74fac3e193 100644 --- a/crates/wasm-mutate/src/mutators/codemotion.rs +++ b/crates/wasm-mutate/src/mutators/codemotion.rs @@ -31,7 +31,7 @@ use crate::{ }, }, }; -use rand::{Rng, prelude::*}; +use rand::{RngExt, prelude::*}; use wasm_encoder::{CodeSection, Function, Module, ValType}; use wasmparser::{CodeSectionReader, FunctionBody}; diff --git a/crates/wasm-mutate/src/mutators/custom.rs b/crates/wasm-mutate/src/mutators/custom.rs index 5b59f67b93..3f43741ca7 100644 --- a/crates/wasm-mutate/src/mutators/custom.rs +++ b/crates/wasm-mutate/src/mutators/custom.rs @@ -1,9 +1,8 @@ //! Mutate custom sections. -use std::borrow::Cow; - use super::Mutator; -use rand::{Rng, prelude::*}; +use rand::prelude::*; +use std::borrow::Cow; #[derive(Clone, Copy)] pub struct CustomSectionMutator; diff --git a/crates/wasm-mutate/src/mutators/function_body_unreachable.rs b/crates/wasm-mutate/src/mutators/function_body_unreachable.rs index a1e33e13a3..1120e304c3 100644 --- a/crates/wasm-mutate/src/mutators/function_body_unreachable.rs +++ b/crates/wasm-mutate/src/mutators/function_body_unreachable.rs @@ -2,7 +2,7 @@ use crate::{Result, WasmMutate}; -use rand::Rng; +use rand::RngExt; use wasm_encoder::{CodeSection, Function, Module}; use wasmparser::CodeSectionReader; diff --git a/crates/wasm-mutate/src/mutators/modify_const_exprs.rs b/crates/wasm-mutate/src/mutators/modify_const_exprs.rs index 44cfc742c7..cc73888d28 100644 --- a/crates/wasm-mutate/src/mutators/modify_const_exprs.rs +++ b/crates/wasm-mutate/src/mutators/modify_const_exprs.rs @@ -2,7 +2,7 @@ //! entities which require constant initializers. use crate::{Error, Mutator, ReencodeResult}; -use rand::Rng; +use rand::RngExt; use wasm_encoder::reencode::{self, Reencode, RoundtripReencoder}; use wasm_encoder::{ElementSection, GlobalSection}; use wasmparser::{ConstExpr, ElementSectionReader, GlobalSectionReader}; diff --git a/crates/wasm-mutate/src/mutators/modify_data.rs b/crates/wasm-mutate/src/mutators/modify_data.rs index 1a8d8f794a..c530e56b81 100644 --- a/crates/wasm-mutate/src/mutators/modify_data.rs +++ b/crates/wasm-mutate/src/mutators/modify_data.rs @@ -1,6 +1,6 @@ use super::Mutator; use crate::{Result, WasmMutate}; -use rand::Rng; +use rand::RngExt; use wasm_encoder::reencode::{Reencode, RoundtripReencoder}; use wasm_encoder::{DataSection, Module}; use wasmparser::{DataKind, DataSectionReader}; diff --git a/crates/wasm-mutate/src/mutators/peephole.rs b/crates/wasm-mutate/src/mutators/peephole.rs index 2922715f63..97a24f10ac 100644 --- a/crates/wasm-mutate/src/mutators/peephole.rs +++ b/crates/wasm-mutate/src/mutators/peephole.rs @@ -39,7 +39,7 @@ use crate::{ module::{PrimitiveTypeInfo, map_type}, }; use egg::{Rewrite, Runner}; -use rand::Rng; +use rand::RngExt; use wasm_encoder::reencode::{Reencode, RoundtripReencoder}; use wasm_encoder::{CodeSection, ConstExpr, Function, GlobalSection, Module, ValType}; use wasmparser::{CodeSectionReader, FunctionBody, GlobalSectionReader, LocalsReader}; diff --git a/crates/wasm-mutate/src/mutators/peephole/eggsy/encoder/expr2wasm.rs b/crates/wasm-mutate/src/mutators/peephole/eggsy/encoder/expr2wasm.rs index a73c400317..5c362253a2 100644 --- a/crates/wasm-mutate/src/mutators/peephole/eggsy/encoder/expr2wasm.rs +++ b/crates/wasm-mutate/src/mutators/peephole/eggsy/encoder/expr2wasm.rs @@ -6,7 +6,7 @@ use crate::{ mutators::peephole::{EG, Lang, MemArg, eggsy::encoder::TraversalEvent}, }; use egg::{Id, Language, RecExpr}; -use rand::Rng; +use rand::RngExt; use std::num::Wrapping; use wasm_encoder::Function; diff --git a/crates/wasm-mutate/src/mutators/peephole/eggsy/expr_enumerator.rs b/crates/wasm-mutate/src/mutators/peephole/eggsy/expr_enumerator.rs index 130c8d9312..f76b6d21ad 100644 --- a/crates/wasm-mutate/src/mutators/peephole/eggsy/expr_enumerator.rs +++ b/crates/wasm-mutate/src/mutators/peephole/eggsy/expr_enumerator.rs @@ -9,7 +9,7 @@ use crate::mutators::peephole::{ eggsy::{RandomExtractor, encoder::rebuild::build_expr_inner}, }; use egg::{AstSize, Id, Language, RecExpr}; -use rand::{Rng, SeedableRng, prelude::SmallRng}; +use rand::{RngExt, SeedableRng, prelude::SmallRng}; use std::{cell::RefCell, rc::Rc}; /// Returns a lazy iterator over all possible expressions that can be diff --git a/crates/wasm-mutate/src/mutators/remove_export.rs b/crates/wasm-mutate/src/mutators/remove_export.rs index afd18f7fd6..7904fd231f 100644 --- a/crates/wasm-mutate/src/mutators/remove_export.rs +++ b/crates/wasm-mutate/src/mutators/remove_export.rs @@ -2,7 +2,7 @@ use super::Mutator; use crate::{Result, WasmMutate}; -use rand::Rng; +use rand::RngExt; use wasm_encoder::{ExportKind, ExportSection, Module}; use wasmparser::ExportSectionReader; diff --git a/crates/wasm-mutate/src/mutators/remove_item.rs b/crates/wasm-mutate/src/mutators/remove_item.rs index 678f7ec7f0..7fd9da4dbb 100644 --- a/crates/wasm-mutate/src/mutators/remove_item.rs +++ b/crates/wasm-mutate/src/mutators/remove_item.rs @@ -10,7 +10,7 @@ use crate::mutators::{Item, Mutator}; use crate::{Error, ReencodeResult}; use crate::{ModuleInfo, Result, WasmMutate}; -use rand::Rng; +use rand::RngExt; use std::collections::HashSet; use wasm_encoder::reencode::Reencode; use wasm_encoder::*; diff --git a/crates/wasm-mutate/src/mutators/rename_export.rs b/crates/wasm-mutate/src/mutators/rename_export.rs index 4fcf95896b..3bea15cc2b 100644 --- a/crates/wasm-mutate/src/mutators/rename_export.rs +++ b/crates/wasm-mutate/src/mutators/rename_export.rs @@ -1,7 +1,7 @@ //! Mutator that generates a random renaming of a preexisting export use super::Mutator; use crate::{Result, WasmMutate}; -use rand::Rng; +use rand::RngExt; use wasm_encoder::{ExportKind, ExportSection, Module}; use wasmparser::ExportSectionReader; diff --git a/crates/wasm-mutate/src/mutators/snip_function.rs b/crates/wasm-mutate/src/mutators/snip_function.rs index 8377724830..f137902314 100644 --- a/crates/wasm-mutate/src/mutators/snip_function.rs +++ b/crates/wasm-mutate/src/mutators/snip_function.rs @@ -3,7 +3,7 @@ use super::Mutator; use crate::module::{PrimitiveTypeInfo, TypeInfo}; use crate::{Result, WasmMutate}; -use rand::Rng; +use rand::RngExt; use wasm_encoder::{CodeSection, Function, HeapType, Module}; use wasmparser::CodeSectionReader; diff --git a/crates/wasm-shrink/src/lib.rs b/crates/wasm-shrink/src/lib.rs index 8085d77756..1221c8505d 100755 --- a/crates/wasm-shrink/src/lib.rs +++ b/crates/wasm-shrink/src/lib.rs @@ -4,7 +4,7 @@ //! See the [`WasmShrink`] type for details. use anyhow::{Context, Result}; -use rand::{Rng, SeedableRng, rngs::SmallRng}; +use rand::{RngExt, SeedableRng, rngs::SmallRng}; use std::collections::HashSet; use wasm_mutate::WasmMutate; use wasmparser::WasmFeatures; diff --git a/crates/wasm-smith/tests/available_imports.rs b/crates/wasm-smith/tests/available_imports.rs index 629eeeff81..4ecf6a0ef0 100644 --- a/crates/wasm-smith/tests/available_imports.rs +++ b/crates/wasm-smith/tests/available_imports.rs @@ -1,7 +1,7 @@ #![cfg(feature = "wasmparser")] use arbitrary::Unstructured; -use rand::{RngCore, SeedableRng, rngs::SmallRng}; +use rand::{Rng, SeedableRng, rngs::SmallRng}; use std::collections::HashMap; use wasm_smith::{Config, Module}; use wasmparser::Validator; diff --git a/crates/wasm-smith/tests/component.rs b/crates/wasm-smith/tests/component.rs index cba22079eb..5b2c28de0b 100644 --- a/crates/wasm-smith/tests/component.rs +++ b/crates/wasm-smith/tests/component.rs @@ -1,7 +1,7 @@ #![cfg(feature = "component-model")] use arbitrary::{Arbitrary, Unstructured}; -use rand::{RngCore, SeedableRng, rngs::SmallRng}; +use rand::{Rng, SeedableRng, rngs::SmallRng}; use wasm_smith::Component; #[test] diff --git a/crates/wasm-smith/tests/core.rs b/crates/wasm-smith/tests/core.rs index 195f639dce..f0394a7c09 100644 --- a/crates/wasm-smith/tests/core.rs +++ b/crates/wasm-smith/tests/core.rs @@ -1,5 +1,5 @@ use arbitrary::{Arbitrary, Unstructured}; -use rand::{RngCore, SeedableRng, rngs::SmallRng}; +use rand::{Rng, SeedableRng, rngs::SmallRng}; use wasm_smith::{Config, Module}; use wasmparser::{Validator, WasmFeatures}; diff --git a/crates/wasm-smith/tests/exports.rs b/crates/wasm-smith/tests/exports.rs index 64244fefa3..65b369335b 100644 --- a/crates/wasm-smith/tests/exports.rs +++ b/crates/wasm-smith/tests/exports.rs @@ -1,7 +1,7 @@ #![cfg(feature = "wasmparser")] use arbitrary::Unstructured; -use rand::{RngCore, SeedableRng, rngs::SmallRng}; +use rand::{Rng, SeedableRng, rngs::SmallRng}; use wasm_smith::{Config, Module}; use wasmparser::{ CompositeType, FuncType, GlobalType, MemoryType, Parser, TableType, Validator, WasmFeatures, diff --git a/crates/wasm-smith/tests/module_shape.rs b/crates/wasm-smith/tests/module_shape.rs index 8e5f67c8f7..4a110720aa 100644 --- a/crates/wasm-smith/tests/module_shape.rs +++ b/crates/wasm-smith/tests/module_shape.rs @@ -1,7 +1,7 @@ #![cfg(feature = "wasmparser")] use arbitrary::Unstructured; -use rand::{RngCore, SeedableRng, rngs::SmallRng}; +use rand::{Rng, SeedableRng, rngs::SmallRng}; use wasm_smith::{Config, Module}; use wasmparser::{Parser, Validator, WasmFeatures, types::EntityType}; diff --git a/crates/wast/src/core/binary/dwarf.rs b/crates/wast/src/core/binary/dwarf.rs index 2bc2dee9ba..6d2e9e8416 100644 --- a/crates/wast/src/core/binary/dwarf.rs +++ b/crates/wast/src/core/binary/dwarf.rs @@ -96,6 +96,7 @@ impl<'a> Dwarf<'a> { encoding, LineEncoding::default(), LineString::StringRef(comp_dir_ref), + None, LineString::StringRef(comp_file_ref), None, ); @@ -511,7 +512,7 @@ mod tests { use super::{Dwarf, EncodeOptions, GenerateDwarf}; use crate::token::Span; use rand::rngs::SmallRng; - use rand::{Rng, SeedableRng}; + use rand::{RngExt, SeedableRng}; fn linecol_test(contents: &str) { let mut dwarf = Dwarf::new( diff --git a/crates/wit-dylib/test-programs/artifacts/Cargo.toml b/crates/wit-dylib/test-programs/artifacts/Cargo.toml index 39e141a171..4d5452698b 100644 --- a/crates/wit-dylib/test-programs/artifacts/Cargo.toml +++ b/crates/wit-dylib/test-programs/artifacts/Cargo.toml @@ -15,7 +15,7 @@ wasi-preview1-component-adapter-provider = "36.0.2" wasm-compose = { workspace = true } [build-dependencies] -cargo_metadata = "0.19.0" +cargo_metadata = "0.23.1" [lints] workspace = true diff --git a/crates/wit-dylib/test-programs/src/bin/roundtrip_callee.rs b/crates/wit-dylib/test-programs/src/bin/roundtrip_callee.rs index 38e93d04c4..46b8ac3e9e 100644 --- a/crates/wit-dylib/test-programs/src/bin/roundtrip_callee.rs +++ b/crates/wit-dylib/test-programs/src/bin/roundtrip_callee.rs @@ -1,4 +1,4 @@ -use rand::Rng; +use rand::RngExt; use std::sync::Mutex; use test_programs::*; diff --git a/crates/wit-dylib/test-programs/src/bin/roundtrip_caller.rs b/crates/wit-dylib/test-programs/src/bin/roundtrip_caller.rs index caf4e2f9a2..11ba6b3f45 100644 --- a/crates/wit-dylib/test-programs/src/bin/roundtrip_caller.rs +++ b/crates/wit-dylib/test-programs/src/bin/roundtrip_caller.rs @@ -1,5 +1,5 @@ use rand::rngs::SmallRng; -use rand::{Rng, SeedableRng}; +use rand::{RngExt, SeedableRng}; use test_programs::*; export_test!(struct MyInterpreter); diff --git a/crates/wit-dylib/test-programs/src/generate.rs b/crates/wit-dylib/test-programs/src/generate.rs index 3539e57a98..b87db55581 100644 --- a/crates/wit-dylib/test-programs/src/generate.rs +++ b/crates/wit-dylib/test-programs/src/generate.rs @@ -3,7 +3,7 @@ use crate::{ }; use rand::distr::{SampleString, StandardUniform}; use rand::rngs::SmallRng; -use rand::{Rng, SeedableRng}; +use rand::{RngExt, SeedableRng}; use std::collections::HashMap; use std::mem; diff --git a/fuzz/src/lib.rs b/fuzz/src/lib.rs index f6b7a31c8d..db5ddbfb8b 100644 --- a/fuzz/src/lib.rs +++ b/fuzz/src/lib.rs @@ -108,7 +108,7 @@ pub fn log_wasm(wasm: &[u8], config: impl Debug) { #[cfg(test)] mod test { use arbitrary::{Result, Unstructured}; - use rand::{RngCore, SeedableRng, rngs::SmallRng}; + use rand::{Rng, SeedableRng, rngs::SmallRng}; fn gen_until_pass(mut f: impl FnMut(&mut Unstructured<'_>) -> Result) -> bool { let mut rng = SmallRng::seed_from_u64(0); diff --git a/src/bin/wasm-tools/demangle.rs b/src/bin/wasm-tools/demangle.rs index b573151a97..0896b53f16 100644 --- a/src/bin/wasm-tools/demangle.rs +++ b/src/bin/wasm-tools/demangle.rs @@ -117,10 +117,10 @@ impl Opts { let naming = naming?; let name = match rustc_demangle::try_demangle(naming.name) { Ok(name) => name.to_string(), - Err(_) => match cpp_demangle::Symbol::new(naming.name) { - Ok(name) => name.to_string(), - Err(_) => naming.name.to_string(), - }, + Err(_) => cpp_demangle::Symbol::new(naming.name) + .ok() + .and_then(|s| s.demangle().ok()) + .unwrap_or_else(|| naming.name.to_string()), }; ret.append(naming.index, &name); }