From 218d347b475bead702a96065ad78846a61e49da0 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 8 Oct 2024 16:19:31 -0500 Subject: [PATCH] Update wasm-tools to 219 (#1063) * Update wasm-tools to 219 Keeping up-to-date * Fix compile * Use crates.io-based versions --- Cargo.lock | 182 +++++++++++++++++---------------- Cargo.toml | 10 +- crates/c/src/lib.rs | 2 +- crates/csharp/src/lib.rs | 2 +- crates/moonbit/src/lib.rs | 2 +- crates/rust/src/interface.rs | 2 +- crates/teavm-java/src/lib.rs | 2 +- crates/test-helpers/src/lib.rs | 4 +- 8 files changed, 106 insertions(+), 100 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ba4e8f772..5221f209f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,11 +13,11 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ - "gimli 0.31.0", + "gimli 0.31.1", ] [[package]] @@ -131,7 +131,7 @@ version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ - "addr2line 0.24.1", + "addr2line 0.24.2", "cfg-if", "libc", "miniz_oxide", @@ -258,9 +258,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.23" +version = "1.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bbb537bb4a30b90362caddba8f360c0a56bc13d3a5570028e7197204cb54a17" +checksum = "2e80e3b6a3ab07840e1cae9b0666a63970dc28e8ed5ffbcdacbfc760c281bfc1" dependencies = [ "jobserver", "libc", @@ -275,9 +275,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.5.18" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0956a43b323ac1afaffc053ed5c4b7c1f1800bacd1683c353aabbb752515dd3" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", "clap_derive", @@ -285,9 +285,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.18" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d72166dd41634086d5803a47eb71ae740e61d84709c36f3c34110173db3961b" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstream", "anstyle", @@ -391,7 +391,7 @@ dependencies = [ "cranelift-entity", "cranelift-isle", "gimli 0.29.0", - "hashbrown", + "hashbrown 0.14.5", "log", "regalloc2", "rustc-hash", @@ -643,6 +643,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "foldhash" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -665,9 +671,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -679,9 +685,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -689,33 +695,33 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-core", "futures-sink", @@ -780,9 +786,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "hashbrown" @@ -794,6 +800,15 @@ dependencies = [ "serde", ] +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +dependencies = [ + "foldhash", +] + [[package]] name = "heck" version = "0.4.1" @@ -853,12 +868,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.15.0", "serde", ] @@ -880,9 +895,9 @@ checksum = "5a611371471e98973dbcab4e0ec66c31a10bc356eeb4d54a0e05eac8158fe38c" [[package]] name = "ipnet" -version = "2.10.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is_terminal_polyfill" @@ -1036,24 +1051,21 @@ dependencies = [ [[package]] name = "object" -version = "0.36.4" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "crc32fast", - "hashbrown", + "hashbrown 0.15.0", "indexmap", "memchr", ] [[package]] name = "once_cell" -version = "1.20.1" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82881c4be219ab5faaf2ad5e5e5ecdff8c66bd7402ca3160975c93b24961afd1" -dependencies = [ - "portable-atomic", -] +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "paste" @@ -1085,12 +1097,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" -[[package]] -name = "portable-atomic" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" - [[package]] name = "postcard" version = "1.0.10" @@ -1124,9 +1130,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a" dependencies = [ "unicode-ident", ] @@ -1227,7 +1233,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12908dbeb234370af84d0579b9f68258a0f67e201412dd9a2814e6f45b2fc0f0" dependencies = [ - "hashbrown", + "hashbrown 0.14.5", "log", "rustc-hash", "slice-group-by", @@ -1453,10 +1459,10 @@ name = "test-helpers" version = "0.0.0" dependencies = [ "codegen-macro", - "wasm-encoder 0.218.0", + "wasm-encoder 0.219.0", "wit-bindgen-core", "wit-component", - "wit-parser 0.218.0", + "wit-parser 0.219.0", ] [[package]] @@ -1599,9 +1605,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" @@ -1731,19 +1737,19 @@ dependencies = [ [[package]] name = "wasm-encoder" -version = "0.218.0" +version = "0.219.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22b896fa8ceb71091ace9bcb81e853f54043183a1c9667cf93422c40252ffa0a" +checksum = "e2b1b95711b3ad655656a341e301cc64e33cbee94de9a99a1c5a2ab88efab79d" dependencies = [ "leb128", - "wasmparser 0.218.0", + "wasmparser 0.219.0", ] [[package]] name = "wasm-metadata" -version = "0.218.0" +version = "0.219.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa5eeb071abe8a2132fdd5565dabffee70775ee8c24fc7e300ac43f51f4a8a91" +checksum = "96132fe00dd17d092d2be289eeed5a0a68ad3cf30b68e8875bc953b96f55f0be" dependencies = [ "anyhow", "indexmap", @@ -1751,8 +1757,8 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder 0.218.0", - "wasmparser 0.218.0", + "wasm-encoder 0.219.0", + "wasmparser 0.219.0", ] [[package]] @@ -1763,7 +1769,7 @@ checksum = "ca917a21307d3adf2b9857b94dd05ebf8496bdcff4437a9b9fb3899d3e6c74e7" dependencies = [ "ahash", "bitflags", - "hashbrown", + "hashbrown 0.14.5", "indexmap", "semver", "serde", @@ -1771,13 +1777,13 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.218.0" +version = "0.219.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b09e46c7fceceaa72b2dd1a8a137ea7fd8f93dfaa69806010a709918e496c5dc" +checksum = "324b4e56d24439495b88cd81439dad5e97f3c7b1eedc3c7e10455ed1e045e9a2" dependencies = [ "ahash", "bitflags", - "hashbrown", + "hashbrown 0.14.5", "indexmap", "semver", "serde", @@ -1810,7 +1816,7 @@ dependencies = [ "encoding_rs", "fxprof-processed-profile", "gimli 0.29.0", - "hashbrown", + "hashbrown 0.14.5", "indexmap", "ittapi", "libc", @@ -2093,24 +2099,24 @@ dependencies = [ [[package]] name = "wast" -version = "218.0.0" +version = "219.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a53cd1f0fa505df97557e36a58bddb8296e2fcdcd089529545ebfdb18a1b9d7" +checksum = "06880ecb25662bc21db6a83f4fcc27c41f71fbcba4f1980b650c88ada92728e1" dependencies = [ "bumpalo", "leb128", "memchr", "unicode-width", - "wasm-encoder 0.218.0", + "wasm-encoder 0.219.0", ] [[package]] name = "wat" -version = "1.218.0" +version = "1.219.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f87f8e14e776762e07927c27c2054d2cf678aab9aae2d431a79b3e31e4dd391" +checksum = "11e56dbf9fc89111b0d97c91e683d7895b1a6e5633a729f2ccad2303724005b6" dependencies = [ - "wast 218.0.0", + "wast 219.0.0", ] [[package]] @@ -2329,11 +2335,11 @@ dependencies = [ "clap", "heck 0.5.0", "test-helpers", - "wasm-encoder 0.218.0", + "wasm-encoder 0.219.0", "wasm-metadata", "wit-bindgen-core", "wit-component", - "wit-parser 0.218.0", + "wit-parser 0.219.0", ] [[package]] @@ -2344,8 +2350,8 @@ dependencies = [ "clap", "heck 0.5.0", "test-artifacts", - "wasm-encoder 0.218.0", - "wasmparser 0.218.0", + "wasm-encoder 0.219.0", + "wasmparser 0.219.0", "wasmtime", "wasmtime-wasi", "wit-bindgen-c", @@ -2357,7 +2363,7 @@ dependencies = [ "wit-bindgen-rust", "wit-bindgen-teavm-java", "wit-component", - "wit-parser 0.218.0", + "wit-parser 0.219.0", ] [[package]] @@ -2366,7 +2372,7 @@ version = "0.33.0" dependencies = [ "anyhow", "heck 0.5.0", - "wit-parser 0.218.0", + "wit-parser 0.219.0", ] [[package]] @@ -2378,12 +2384,12 @@ dependencies = [ "heck 0.5.0", "indexmap", "test-helpers", - "wasm-encoder 0.218.0", + "wasm-encoder 0.219.0", "wasm-metadata", - "wasmparser 0.218.0", + "wasmparser 0.219.0", "wit-bindgen-core", "wit-component", - "wit-parser 0.218.0", + "wit-parser 0.219.0", ] [[package]] @@ -2477,9 +2483,9 @@ dependencies = [ [[package]] name = "wit-component" -version = "0.218.0" +version = "0.219.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa53aa7e6bf2b3e8ccaffbcc963fbdb672a603dc0af393a481b6cec24c266406" +checksum = "99a76111c20444a814019de20499d30940ecd219b9512ee296f034a5edb18a2d" dependencies = [ "anyhow", "bitflags", @@ -2488,11 +2494,11 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder 0.218.0", + "wasm-encoder 0.219.0", "wasm-metadata", - "wasmparser 0.218.0", + "wasmparser 0.219.0", "wat", - "wit-parser 0.218.0", + "wit-parser 0.219.0", ] [[package]] @@ -2515,9 +2521,9 @@ dependencies = [ [[package]] name = "wit-parser" -version = "0.218.0" +version = "0.219.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d3d1066ab761b115f97fef2b191090faabcb0f37b555b758d3caf42d4ed9e55" +checksum = "23102e180c0c464f36e293d31a27b524e3ece930d7b5527d2f33f9d2c963de64" dependencies = [ "anyhow", "id-arena", @@ -2528,7 +2534,7 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser 0.218.0", + "wasmparser 0.219.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 2e45db1c9..29f973e10 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,11 +32,11 @@ indexmap = "2.0.0" prettyplease = "0.2.20" syn = { version = "2.0", features = ["printing"] } -wasmparser = "0.218.0" -wasm-encoder = "0.218.0" -wasm-metadata = "0.218.0" -wit-parser = "0.218.0" -wit-component = "0.218.0" +wasmparser = "0.219.0" +wasm-encoder = "0.219.0" +wasm-metadata = "0.219.0" +wit-parser = "0.219.0" +wit-component = "0.219.0" wit-bindgen-core = { path = 'crates/core', version = '0.33.0' } wit-bindgen-c = { path = 'crates/c', version = '0.33.0' } diff --git a/crates/c/src/lib.rs b/crates/c/src/lib.rs index 2da9a640d..99eb5c689 100644 --- a/crates/c/src/lib.rs +++ b/crates/c/src/lib.rs @@ -1778,7 +1778,7 @@ impl InterfaceGenerator<'_> { self.src.c_fns("\n"); let core_module_name = interface_name.map(|s| self.resolve.name_world_key(s)); - let export_name = func.core_export_name(core_module_name.as_deref()); + let export_name = func.legacy_core_export_name(core_module_name.as_deref()); // Print the actual header for this function into the header file, and // it's what we'll be calling. diff --git a/crates/csharp/src/lib.rs b/crates/csharp/src/lib.rs index b160d7a0a..6f11ef47b 100644 --- a/crates/csharp/src/lib.rs +++ b/crates/csharp/src/lib.rs @@ -1226,7 +1226,7 @@ impl InterfaceGenerator<'_> { let interop_name = format!("wasmExport{}", func.name.to_upper_camel_case()); let core_module_name = interface_name.map(|s| self.resolve.name_world_key(s)); - let export_name = func.core_export_name(core_module_name.as_deref()); + let export_name = func.legacy_core_export_name(core_module_name.as_deref()); let access = self.gen.access_modifier(); uwrite!( diff --git a/crates/moonbit/src/lib.rs b/crates/moonbit/src/lib.rs index 725275029..1f4aff4ae 100644 --- a/crates/moonbit/src/lib.rs +++ b/crates/moonbit/src/lib.rs @@ -828,7 +828,7 @@ impl InterfaceGenerator<'_> { let func_sig = self.sig_string(func, true); - let export_name = func.core_export_name(interface_name); + let export_name = func.legacy_core_export_name(interface_name); let mut toplevel_generator = self.gen diff --git a/crates/rust/src/interface.rs b/crates/rust/src/interface.rs index 2a47caaf8..8a7468960 100644 --- a/crates/rust/src/interface.rs +++ b/crates/rust/src/interface.rs @@ -608,7 +608,7 @@ macro_rules! {macro_name} {{ Identifier::World(_) => None, }; let export_prefix = self.gen.opts.export_prefix.as_deref().unwrap_or(""); - let export_name = func.core_export_name(wasm_module_export_name.as_deref()); + let export_name = func.legacy_core_export_name(wasm_module_export_name.as_deref()); uwrite!( self.src, "\ diff --git a/crates/teavm-java/src/lib.rs b/crates/teavm-java/src/lib.rs index 63ebfe81a..1d0c90593 100644 --- a/crates/teavm-java/src/lib.rs +++ b/crates/teavm-java/src/lib.rs @@ -556,7 +556,7 @@ impl InterfaceGenerator<'_> { fn export(&mut self, interface_name: Option<&str>, func: &Function) { let sig = self.resolve.wasm_signature(AbiVariant::GuestExport, func); - let export_name = func.core_export_name(interface_name); + let export_name = func.legacy_core_export_name(interface_name); let mut bindgen = FunctionBindgen::new( self, diff --git a/crates/test-helpers/src/lib.rs b/crates/test-helpers/src/lib.rs index 32ea36bc5..1129238bb 100644 --- a/crates/test-helpers/src/lib.rs +++ b/crates/test-helpers/src/lib.rs @@ -6,7 +6,7 @@ use std::process::Command; use wasm_encoder::{Encode, Section}; use wit_bindgen_core::Files; use wit_component::StringEncoding; -use wit_parser::{Resolve, WorldId}; +use wit_parser::{Mangling, Resolve, WorldId}; /// Returns a suitable directory to place output for tests within. /// @@ -96,7 +96,7 @@ pub fn run_component_codegen_test( ) { let (resolve, world) = parse_wit(wit_path); let world_name = &resolve.worlds[world].name; - let mut wasm = wit_component::dummy_module(&resolve, world); + let mut wasm = wit_component::dummy_module(&resolve, world, Mangling::Standard32); let encoded = wit_component::metadata::encode(&resolve, world, StringEncoding::UTF8, None).unwrap(); let section = wasm_encoder::CustomSection {