From 8b70f19d22775d25d780af69de2e781d898fcabf Mon Sep 17 00:00:00 2001 From: Christof Petig Date: Sun, 1 Feb 2026 16:01:12 +0100 Subject: [PATCH 1/4] Prepare for wasm-tools 0.245 --- Cargo.lock | 141 +++++++++++++------------------------ Cargo.toml | 14 ++-- crates/c/src/lib.rs | 12 ++-- crates/core/src/abi.rs | 14 ++-- crates/core/src/lib.rs | 4 +- crates/core/src/types.rs | 2 +- crates/cpp/src/lib.rs | 4 +- crates/markdown/src/lib.rs | 2 +- crates/test/Cargo.toml | 6 +- 9 files changed, 77 insertions(+), 122 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 142b83f68..fe5534273 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -475,9 +475,9 @@ dependencies = [ [[package]] name = "id-arena" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" [[package]] name = "idna" @@ -1015,7 +1015,7 @@ name = "test-helpers" version = "0.0.0" dependencies = [ "codegen-macro", - "wasm-encoder 0.244.0", + "wasm-encoder", "wit-bindgen-core", "wit-component", "wit-parser", @@ -1172,9 +1172,8 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wac-graph" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d511e0c9462a5f6369e7e17e9f0f3b566eab2a235076a23f2db19ca7bf36d32c" +version = "0.9.0-dev" +source = "git+https://github.com/cpetig/wac.git?branch=new_wasm_tools#9d50a16a18d4f2d7dfa497388bd0f0d26df31817" dependencies = [ "anyhow", "id-arena", @@ -1184,16 +1183,15 @@ dependencies = [ "semver", "thiserror", "wac-types", - "wasm-encoder 0.239.0", - "wasm-metadata 0.239.0", - "wasmparser 0.239.0", + "wasm-encoder", + "wasm-metadata", + "wasmparser", ] [[package]] name = "wac-parser" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b47c29a894f9f82c4da2d036d410babb3bd5aed0acfb4c3d779b536a4316cba0" +version = "0.9.0-dev" +source = "git+https://github.com/cpetig/wac.git?branch=new_wasm_tools#9d50a16a18d4f2d7dfa497388bd0f0d26df31817" dependencies = [ "anyhow", "id-arena", @@ -1205,23 +1203,22 @@ dependencies = [ "serde", "thiserror", "wac-graph", - "wasm-encoder 0.239.0", - "wasm-metadata 0.239.0", - "wasmparser 0.239.0", + "wasm-encoder", + "wasm-metadata", + "wasmparser", ] [[package]] name = "wac-types" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64fdef742a5198856c7c754944b329ed684f703dca477d0a77b474b37d990121" +version = "0.9.0-dev" +source = "git+https://github.com/cpetig/wac.git?branch=new_wasm_tools#9d50a16a18d4f2d7dfa497388bd0f0d26df31817" dependencies = [ "anyhow", "id-arena", "indexmap", "semver", - "wasm-encoder 0.239.0", - "wasmparser 0.239.0", + "wasm-encoder", + "wasmparser", ] [[package]] @@ -1233,8 +1230,7 @@ checksum = "6545ca20bba2f220430c4a97f6b60c48ef14eaa432b04e6b31be547037b4c9ab" [[package]] name = "wasm-compose" version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92cda9c76ca8dcac01a8b497860c2cb15cd6f216dc07060517df5abbe82512ac" +source = "git+https://github.com/bytecodealliance/wasm-tools.git#037cce497699bdc178906a3eedd6c63a31a44523" dependencies = [ "anyhow", "heck", @@ -1246,36 +1242,24 @@ dependencies = [ "serde_derive", "serde_yaml", "smallvec", - "wasm-encoder 0.244.0", - "wasmparser 0.244.0", + "wasm-encoder", + "wasmparser", "wat", ] -[[package]] -name = "wasm-encoder" -version = "0.239.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be00faa2b4950c76fe618c409d2c3ea5a3c9422013e079482d78544bb2d184c" -dependencies = [ - "leb128fmt", - "wasmparser 0.239.0", -] - [[package]] name = "wasm-encoder" version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +source = "git+https://github.com/bytecodealliance/wasm-tools.git#037cce497699bdc178906a3eedd6c63a31a44523" dependencies = [ "leb128fmt", - "wasmparser 0.244.0", + "wasmparser", ] [[package]] name = "wasm-metadata" -version = "0.239.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20b3ec880a9ac69ccd92fbdbcf46ee833071cf09f82bb005b2327c7ae6025ae2" +version = "0.244.0" +source = "git+https://github.com/bytecodealliance/wasm-tools.git#037cce497699bdc178906a3eedd6c63a31a44523" dependencies = [ "anyhow", "auditable-serde", @@ -1286,40 +1270,14 @@ dependencies = [ "serde_json", "spdx", "url", - "wasm-encoder 0.239.0", - "wasmparser 0.239.0", -] - -[[package]] -name = "wasm-metadata" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" -dependencies = [ - "anyhow", - "indexmap", - "wasm-encoder 0.244.0", - "wasmparser 0.244.0", -] - -[[package]] -name = "wasmparser" -version = "0.239.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9d90bb93e764f6beabf1d02028c70a2156a6583e63ac4218dd07ef733368b0" -dependencies = [ - "bitflags", - "hashbrown 0.15.5", - "indexmap", - "semver", - "serde", + "wasm-encoder", + "wasmparser", ] [[package]] name = "wasmparser" version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +source = "git+https://github.com/bytecodealliance/wasm-tools.git#037cce497699bdc178906a3eedd6c63a31a44523" dependencies = [ "bitflags", "hashbrown 0.15.5", @@ -1331,21 +1289,19 @@ dependencies = [ [[package]] name = "wast" version = "244.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2e7b9f9e23311275920e3d6b56d64137c160cf8af4f84a7283b36cfecbf4acb" +source = "git+https://github.com/bytecodealliance/wasm-tools.git#037cce497699bdc178906a3eedd6c63a31a44523" dependencies = [ "bumpalo", "leb128fmt", "memchr", "unicode-width 0.2.2", - "wasm-encoder 0.244.0", + "wasm-encoder", ] [[package]] name = "wat" version = "1.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbf35b87ed352f9ab6cd0732abde5a67dd6153dfd02c493e61459218b19456fa" +source = "git+https://github.com/bytecodealliance/wasm-tools.git#037cce497699bdc178906a3eedd6c63a31a44523" dependencies = [ "wast", ] @@ -1467,8 +1423,8 @@ dependencies = [ "clap", "heck", "indexmap", - "wasm-encoder 0.244.0", - "wasm-metadata 0.244.0", + "wasm-encoder", + "wasm-metadata", "wit-bindgen-core", "wit-component", ] @@ -1480,7 +1436,7 @@ dependencies = [ "anyhow", "clap", "env_logger", - "wasm-encoder 0.244.0", + "wasm-encoder", "wit-bindgen-c", "wit-bindgen-core", "wit-bindgen-cpp", @@ -1512,8 +1468,8 @@ dependencies = [ "clap", "heck", "test-helpers", - "wasm-encoder 0.244.0", - "wasm-metadata 0.244.0", + "wasm-encoder", + "wasm-metadata", "wit-bindgen-c", "wit-bindgen-core", "wit-component", @@ -1527,7 +1483,7 @@ dependencies = [ "clap", "heck", "indexmap", - "wasm-metadata 0.244.0", + "wasm-metadata", "wit-bindgen-core", "wit-component", "wit-parser", @@ -1540,8 +1496,8 @@ dependencies = [ "anyhow", "clap", "heck", - "wasm-encoder 0.244.0", - "wasm-metadata 0.244.0", + "wasm-encoder", + "wasm-metadata", "wit-bindgen-core", "wit-component", ] @@ -1582,7 +1538,7 @@ dependencies = [ "serde_json", "syn", "test-helpers", - "wasm-metadata 0.244.0", + "wasm-metadata", "wit-bindgen", "wit-bindgen-core", "wit-component", @@ -1619,8 +1575,8 @@ dependencies = [ "wac-types", "wasi-preview1-component-adapter-provider", "wasm-compose", - "wasm-encoder 0.244.0", - "wasmparser 0.244.0", + "wasm-encoder", + "wasmparser", "wat", "wit-bindgen-csharp", "wit-component", @@ -1630,8 +1586,7 @@ dependencies = [ [[package]] name = "wit-component" version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +source = "git+https://github.com/bytecodealliance/wasm-tools.git#037cce497699bdc178906a3eedd6c63a31a44523" dependencies = [ "anyhow", "bitflags", @@ -1640,9 +1595,9 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder 0.244.0", - "wasm-metadata 0.244.0", - "wasmparser 0.244.0", + "wasm-encoder", + "wasm-metadata", + "wasmparser", "wat", "wit-parser", ] @@ -1650,10 +1605,10 @@ dependencies = [ [[package]] name = "wit-parser" version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +source = "git+https://github.com/bytecodealliance/wasm-tools.git#037cce497699bdc178906a3eedd6c63a31a44523" dependencies = [ "anyhow", + "hashbrown 0.15.5", "id-arena", "indexmap", "log", @@ -1662,7 +1617,7 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser 0.244.0", + "wasmparser", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index cfbbf5fc9..ae1b1538b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,13 +36,13 @@ prettyplease = "0.2.20" syn = { version = "2.0.89", features = ["printing"] } futures = "0.3.31" -wat = "1.244.0" -wasmparser = "0.244.0" -wasm-encoder = "0.244.0" -wasm-metadata = { version = "0.244.0", default-features = false } -wit-parser = "0.244.0" -wit-component = "0.244.0" -wasm-compose = "0.244.0" +wat = { git = 'https://github.com/bytecodealliance/wasm-tools.git' } +wasmparser = { git = 'https://github.com/bytecodealliance/wasm-tools.git' } +wasm-encoder = { git = 'https://github.com/bytecodealliance/wasm-tools.git' } +wasm-metadata = { git = 'https://github.com/bytecodealliance/wasm-tools.git' } +wit-parser = { git = 'https://github.com/bytecodealliance/wasm-tools.git' } +wit-component = { git = 'https://github.com/bytecodealliance/wasm-tools.git' } +wasm-compose = { git = 'https://github.com/bytecodealliance/wasm-tools.git' } wit-bindgen-core = { path = 'crates/core', version = '0.52.0' } wit-bindgen-c = { path = 'crates/c', version = '0.52.0' } diff --git a/crates/c/src/lib.rs b/crates/c/src/lib.rs index 1799bca4c..39c844640 100644 --- a/crates/c/src/lib.rs +++ b/crates/c/src/lib.rs @@ -1066,7 +1066,7 @@ fn is_prim_type_id(resolve: &Resolve, id: TypeId) -> bool { | TypeDefKind::Future(_) | TypeDefKind::Stream(_) | TypeDefKind::Unknown => false, - TypeDefKind::FixedSizeList(..) => todo!(), + TypeDefKind::FixedLengthList(..) => todo!(), TypeDefKind::Map(..) => todo!(), } } @@ -1152,7 +1152,7 @@ pub fn push_ty_name(resolve: &Resolve, ty: &Type, src: &mut String) { push_ty_name(resolve, &Type::Id(*resource), src); } TypeDefKind::Unknown => unreachable!(), - TypeDefKind::FixedSizeList(..) => todo!(), + TypeDefKind::FixedLengthList(..) => todo!(), TypeDefKind::Map(..) => todo!(), } } @@ -1366,7 +1366,7 @@ impl Return { TypeDefKind::Resource => todo!("return_single for resource"), TypeDefKind::Unknown => unreachable!(), - TypeDefKind::FixedSizeList(..) => todo!(), + TypeDefKind::FixedLengthList(..) => todo!(), TypeDefKind::Map(..) => todo!(), } @@ -2012,7 +2012,7 @@ impl InterfaceGenerator<'_> { self.free(&Type::Id(*id), "*ptr"); } TypeDefKind::Unknown => unreachable!(), - TypeDefKind::FixedSizeList(..) => todo!(), + TypeDefKind::FixedLengthList(..) => todo!(), TypeDefKind::Map(..) => todo!(), } if c_helpers_body_start == self.src.c_helpers.len() { @@ -2706,7 +2706,7 @@ void {name}_return({return_ty}) {{ TypeDefKind::Type(ty) => self.contains_droppable_borrow(ty), TypeDefKind::Unknown => false, - TypeDefKind::FixedSizeList(..) => todo!(), + TypeDefKind::FixedLengthList(..) => todo!(), TypeDefKind::Map(..) => todo!(), } } else { @@ -4076,7 +4076,7 @@ pub fn is_arg_by_pointer(resolve: &Resolve, ty: &Type) -> bool { TypeDefKind::Stream(_) => false, TypeDefKind::Resource => todo!("is_arg_by_pointer for resource"), TypeDefKind::Unknown => unreachable!(), - TypeDefKind::FixedSizeList(..) => todo!(), + TypeDefKind::FixedLengthList(..) => todo!(), TypeDefKind::Map(..) => todo!(), }, Type::String => true, diff --git a/crates/core/src/abi.rs b/crates/core/src/abi.rs index 7f627aedf..d6052f505 100644 --- a/crates/core/src/abi.rs +++ b/crates/core/src/abi.rs @@ -873,7 +873,7 @@ fn needs_deallocate(resolve: &Resolve, ty: &Type, what: Deallocate) -> bool { TypeDefKind::Flags(_) | TypeDefKind::Enum(_) => false, TypeDefKind::Future(_) | TypeDefKind::Stream(_) => what.handles(), TypeDefKind::Unknown => unreachable!(), - TypeDefKind::FixedSizeList(t, _) => needs_deallocate(resolve, t, what), + TypeDefKind::FixedLengthList(t, _) => needs_deallocate(resolve, t, what), TypeDefKind::Map(..) => todo!(), }, @@ -1597,7 +1597,7 @@ impl<'a, B: Bindgen> Generator<'a, B> { }); } TypeDefKind::Unknown => unreachable!(), - TypeDefKind::FixedSizeList(ty, size) => { + TypeDefKind::FixedLengthList(ty, size) => { self.emit(&FixedLengthListLower { element: ty, size: *size, @@ -1795,7 +1795,7 @@ impl<'a, B: Bindgen> Generator<'a, B> { }); } TypeDefKind::Unknown => unreachable!(), - TypeDefKind::FixedSizeList(ty, size) => { + TypeDefKind::FixedLengthList(ty, size) => { let temp = flat_types(self.resolve, ty, None).unwrap(); let flat_per_elem = temp.to_vec().len(); let flatsize = flat_per_elem * (*size as usize); @@ -1995,7 +1995,7 @@ impl<'a, B: Bindgen> Generator<'a, B> { } TypeDefKind::Unknown => unreachable!(), - TypeDefKind::FixedSizeList(element, size) => { + TypeDefKind::FixedLengthList(element, size) => { // resembles write_list_to_memory self.push_block(); self.emit(&IterElem { element }); @@ -2197,7 +2197,7 @@ impl<'a, B: Bindgen> Generator<'a, B> { } TypeDefKind::Unknown => unreachable!(), - TypeDefKind::FixedSizeList(ty, size) => { + TypeDefKind::FixedLengthList(ty, size) => { self.push_block(); self.emit(&IterBasePointer); let elemaddr = self.stack.pop().unwrap(); @@ -2398,7 +2398,7 @@ impl<'a, B: Bindgen> Generator<'a, B> { TypeDefKind::Resource => unreachable!(), TypeDefKind::Unknown => unreachable!(), - TypeDefKind::FixedSizeList(..) => todo!(), + TypeDefKind::FixedLengthList(..) => todo!(), TypeDefKind::Map(..) => todo!(), }, } @@ -2520,7 +2520,7 @@ impl<'a, B: Bindgen> Generator<'a, B> { TypeDefKind::Future(_) => unreachable!(), TypeDefKind::Stream(_) => unreachable!(), TypeDefKind::Unknown => unreachable!(), - TypeDefKind::FixedSizeList(_, _) => {} + TypeDefKind::FixedLengthList(_, _) => {} TypeDefKind::Map(..) => todo!(), }, } diff --git a/crates/core/src/lib.rs b/crates/core/src/lib.rs index fcfb73791..7799b15e7 100644 --- a/crates/core/src/lib.rs +++ b/crates/core/src/lib.rs @@ -181,7 +181,7 @@ pub trait InterfaceGenerator<'a> { TypeDefKind::Future(t) => self.type_future(id, name, t, &ty.docs), TypeDefKind::Stream(t) => self.type_stream(id, name, t, &ty.docs), TypeDefKind::Handle(_) => panic!("handle types do not require definition"), - TypeDefKind::FixedSizeList(..) => todo!(), + TypeDefKind::FixedLengthList(..) => todo!(), TypeDefKind::Map(..) => todo!(), TypeDefKind::Unknown => unreachable!(), } @@ -219,7 +219,7 @@ pub trait AnonymousTypeGenerator<'a> { TypeDefKind::Future(f) => self.anonymous_type_future(id, f, &ty.docs), TypeDefKind::Stream(s) => self.anonymous_type_stream(id, s, &ty.docs), TypeDefKind::Handle(handle) => self.anonymous_type_handle(id, handle, &ty.docs), - TypeDefKind::FixedSizeList(t, size) => { + TypeDefKind::FixedLengthList(t, size) => { self.anonymous_type_fixed_length_list(id, t, *size, &ty.docs) } TypeDefKind::Map(..) => todo!(), diff --git a/crates/core/src/types.rs b/crates/core/src/types.rs index 8129aa0dc..1b99fcdd0 100644 --- a/crates/core/src/types.rs +++ b/crates/core/src/types.rs @@ -203,7 +203,7 @@ impl Types { // should use the same ownership semantics as `own` info.has_own_handle = true; } - TypeDefKind::FixedSizeList(ty, _) => { + TypeDefKind::FixedLengthList(ty, _) => { info = self.type_info(resolve, ty); } TypeDefKind::Map(..) => todo!(), diff --git a/crates/cpp/src/lib.rs b/crates/cpp/src/lib.rs index 9c02e2855..1dc2a8e5a 100644 --- a/crates/cpp/src/lib.rs +++ b/crates/cpp/src/lib.rs @@ -891,7 +891,7 @@ impl CppInterfaceGenerator<'_> { TypeDefKind::Future(_) => todo!("generate for future"), TypeDefKind::Stream(_) => todo!("generate for stream"), TypeDefKind::Handle(_) => todo!("generate for handle"), - TypeDefKind::FixedSizeList(_, _) => todo!(), + TypeDefKind::FixedLengthList(_, _) => todo!(), TypeDefKind::Map(_, _) => todo!(), TypeDefKind::Unknown => unreachable!(), } @@ -1702,7 +1702,7 @@ impl CppInterfaceGenerator<'_> { TypeDefKind::Future(_) => todo!(), TypeDefKind::Stream(_) => todo!(), TypeDefKind::Type(ty) => self.type_name(ty, from_namespace, flavor), - TypeDefKind::FixedSizeList(ty, size) => { + TypeDefKind::FixedLengthList(ty, size) => { self.r#gen.dependencies.needs_array = true; format!( "std::array<{}, {size}>", diff --git a/crates/markdown/src/lib.rs b/crates/markdown/src/lib.rs index e46a36c8c..e0b9eb712 100644 --- a/crates/markdown/src/lib.rs +++ b/crates/markdown/src/lib.rs @@ -419,7 +419,7 @@ impl InterfaceGenerator<'_> { self.push_str(">"); } TypeDefKind::Unknown => unreachable!(), - TypeDefKind::FixedSizeList(..) => todo!(), + TypeDefKind::FixedLengthList(..) => todo!(), TypeDefKind::Map(..) => todo!(), } } diff --git a/crates/test/Cargo.toml b/crates/test/Cargo.toml index 283625380..0b9e5bcff 100644 --- a/crates/test/Cargo.toml +++ b/crates/test/Cargo.toml @@ -27,9 +27,9 @@ regex = "1.11.1" serde = { workspace = true } toml = "0.8.20" wasi-preview1-component-adapter-provider = "37.0.2" -wac-parser = "0.8.1" -wac-types = "0.8.1" -wac-graph = "0.8.1" +wac-parser = { git = "https://github.com/cpetig/wac.git", branch = "new_wasm_tools" } +wac-types = { git = "https://github.com/cpetig/wac.git", branch = "new_wasm_tools" } +wac-graph = { git = "https://github.com/cpetig/wac.git", branch = "new_wasm_tools" } wasm-compose = { workspace = true } indexmap = { workspace = true } wasm-encoder = { workspace = true } From c67e4ff8dcf7134a83a88a9fa95955dbeb0cb8f7 Mon Sep 17 00:00:00 2001 From: Christof Petig Date: Mon, 9 Feb 2026 01:51:43 +0100 Subject: [PATCH 2/4] adapt to an even newer version of wasm-tools --- Cargo.lock | 22 +++++++++++----------- crates/c/src/lib.rs | 2 +- crates/core/src/lib.rs | 4 ++-- crates/core/src/types.rs | 6 ++++-- crates/cpp/src/lib.rs | 5 +++++ crates/csharp/src/world_generator.rs | 2 +- crates/markdown/src/lib.rs | 4 ++-- 7 files changed, 26 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fe5534273..856ea061d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1173,7 +1173,7 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wac-graph" version = "0.9.0-dev" -source = "git+https://github.com/cpetig/wac.git?branch=new_wasm_tools#9d50a16a18d4f2d7dfa497388bd0f0d26df31817" +source = "git+https://github.com/cpetig/wac.git?branch=new_wasm_tools#5d4485d03a2bedd75398bf2ebb2a02e18198c13b" dependencies = [ "anyhow", "id-arena", @@ -1191,7 +1191,7 @@ dependencies = [ [[package]] name = "wac-parser" version = "0.9.0-dev" -source = "git+https://github.com/cpetig/wac.git?branch=new_wasm_tools#9d50a16a18d4f2d7dfa497388bd0f0d26df31817" +source = "git+https://github.com/cpetig/wac.git?branch=new_wasm_tools#5d4485d03a2bedd75398bf2ebb2a02e18198c13b" dependencies = [ "anyhow", "id-arena", @@ -1211,7 +1211,7 @@ dependencies = [ [[package]] name = "wac-types" version = "0.9.0-dev" -source = "git+https://github.com/cpetig/wac.git?branch=new_wasm_tools#9d50a16a18d4f2d7dfa497388bd0f0d26df31817" +source = "git+https://github.com/cpetig/wac.git?branch=new_wasm_tools#5d4485d03a2bedd75398bf2ebb2a02e18198c13b" dependencies = [ "anyhow", "id-arena", @@ -1230,7 +1230,7 @@ checksum = "6545ca20bba2f220430c4a97f6b60c48ef14eaa432b04e6b31be547037b4c9ab" [[package]] name = "wasm-compose" version = "0.244.0" -source = "git+https://github.com/bytecodealliance/wasm-tools.git#037cce497699bdc178906a3eedd6c63a31a44523" +source = "git+https://github.com/bytecodealliance/wasm-tools.git#39cd181edac6f8f9a951f1c7f0f6bfb744e81283" dependencies = [ "anyhow", "heck", @@ -1250,7 +1250,7 @@ dependencies = [ [[package]] name = "wasm-encoder" version = "0.244.0" -source = "git+https://github.com/bytecodealliance/wasm-tools.git#037cce497699bdc178906a3eedd6c63a31a44523" +source = "git+https://github.com/bytecodealliance/wasm-tools.git#39cd181edac6f8f9a951f1c7f0f6bfb744e81283" dependencies = [ "leb128fmt", "wasmparser", @@ -1259,7 +1259,7 @@ dependencies = [ [[package]] name = "wasm-metadata" version = "0.244.0" -source = "git+https://github.com/bytecodealliance/wasm-tools.git#037cce497699bdc178906a3eedd6c63a31a44523" +source = "git+https://github.com/bytecodealliance/wasm-tools.git#39cd181edac6f8f9a951f1c7f0f6bfb744e81283" dependencies = [ "anyhow", "auditable-serde", @@ -1277,7 +1277,7 @@ dependencies = [ [[package]] name = "wasmparser" version = "0.244.0" -source = "git+https://github.com/bytecodealliance/wasm-tools.git#037cce497699bdc178906a3eedd6c63a31a44523" +source = "git+https://github.com/bytecodealliance/wasm-tools.git#39cd181edac6f8f9a951f1c7f0f6bfb744e81283" dependencies = [ "bitflags", "hashbrown 0.15.5", @@ -1289,7 +1289,7 @@ dependencies = [ [[package]] name = "wast" version = "244.0.0" -source = "git+https://github.com/bytecodealliance/wasm-tools.git#037cce497699bdc178906a3eedd6c63a31a44523" +source = "git+https://github.com/bytecodealliance/wasm-tools.git#39cd181edac6f8f9a951f1c7f0f6bfb744e81283" dependencies = [ "bumpalo", "leb128fmt", @@ -1301,7 +1301,7 @@ dependencies = [ [[package]] name = "wat" version = "1.244.0" -source = "git+https://github.com/bytecodealliance/wasm-tools.git#037cce497699bdc178906a3eedd6c63a31a44523" +source = "git+https://github.com/bytecodealliance/wasm-tools.git#39cd181edac6f8f9a951f1c7f0f6bfb744e81283" dependencies = [ "wast", ] @@ -1586,7 +1586,7 @@ dependencies = [ [[package]] name = "wit-component" version = "0.244.0" -source = "git+https://github.com/bytecodealliance/wasm-tools.git#037cce497699bdc178906a3eedd6c63a31a44523" +source = "git+https://github.com/bytecodealliance/wasm-tools.git#39cd181edac6f8f9a951f1c7f0f6bfb744e81283" dependencies = [ "anyhow", "bitflags", @@ -1605,7 +1605,7 @@ dependencies = [ [[package]] name = "wit-parser" version = "0.244.0" -source = "git+https://github.com/bytecodealliance/wasm-tools.git#037cce497699bdc178906a3eedd6c63a31a44523" +source = "git+https://github.com/bytecodealliance/wasm-tools.git#39cd181edac6f8f9a951f1c7f0f6bfb744e81283" dependencies = [ "anyhow", "hashbrown 0.15.5", diff --git a/crates/c/src/lib.rs b/crates/c/src/lib.rs index 39c844640..f25c6fbff 100644 --- a/crates/c/src/lib.rs +++ b/crates/c/src/lib.rs @@ -1010,7 +1010,7 @@ pub fn imported_types_used_by_exported_interfaces( exported_interfaces.insert(*id); live_export_types.add_interface(resolve, *id) } - WorldItem::Type(_) => unreachable!(), + WorldItem::Type { .. } => unreachable!(), } } diff --git a/crates/core/src/lib.rs b/crates/core/src/lib.rs index 7799b15e7..4739225af 100644 --- a/crates/core/src/lib.rs +++ b/crates/core/src/lib.rs @@ -42,7 +42,7 @@ pub trait WorldGenerator { WorldItem::Interface { id, .. } => { self.import_interface(resolve, name, *id, files)? } - WorldItem::Type(id) => types.push((unwrap_name(name), *id)), + WorldItem::Type { id, .. } => types.push((unwrap_name(name), *id)), } } if !types.is_empty() { @@ -66,7 +66,7 @@ pub trait WorldGenerator { match export { WorldItem::Function(f) => funcs.push((unwrap_name(name), f)), WorldItem::Interface { id, .. } => interfaces.push((name, id)), - WorldItem::Type(_) => unreachable!(), + WorldItem::Type { .. } => unreachable!(), } } if !funcs.is_empty() { diff --git a/crates/core/src/types.rs b/crates/core/src/types.rs index 1b99fcdd0..5decdcde2 100644 --- a/crates/core/src/types.rs +++ b/crates/core/src/types.rs @@ -81,12 +81,14 @@ impl Types { WorldItem::Function(f) => { self.type_info_func(resolve, f, import); } - WorldItem::Interface { id, stability: _ } => { + WorldItem::Interface { + id, stability: _, .. + } => { for (_, f) in resolve.interfaces[*id].functions.iter() { self.type_info_func(resolve, f, import); } } - WorldItem::Type(_) => {} + WorldItem::Type { .. } => {} } } } diff --git a/crates/cpp/src/lib.rs b/crates/cpp/src/lib.rs index 1dc2a8e5a..920a79afa 100644 --- a/crates/cpp/src/lib.rs +++ b/crates/cpp/src/lib.rs @@ -1920,6 +1920,7 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for CppInterfaceGenerator<'a> result: None, docs: Docs::default(), stability: Stability::Unknown, + span: Default::default(), }; self.generate_function(&func, &TypeOwner::Interface(intf), variant); } @@ -1953,6 +1954,7 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for CppInterfaceGenerator<'a> result: Some(Type::Id(id)), docs: Docs::default(), stability: Stability::Unknown, + span: Default::default(), }; self.generate_function(&func2, &TypeOwner::Interface(intf), variant); } @@ -1982,6 +1984,7 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for CppInterfaceGenerator<'a> result: Some(id_type), docs: Docs::default(), stability: Stability::Unknown, + span: Default::default(), }; self.generate_function(&func, &TypeOwner::Interface(intf), variant); @@ -1992,6 +1995,7 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for CppInterfaceGenerator<'a> result: Some(Type::Id(id)), docs: Docs::default(), stability: Stability::Unknown, + span: Default::default(), }; self.generate_function(&func1, &TypeOwner::Interface(intf), variant); @@ -2002,6 +2006,7 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for CppInterfaceGenerator<'a> result: None, docs: Docs::default(), stability: Stability::Unknown, + span: Default::default(), }; self.generate_function(&func2, &TypeOwner::Interface(intf), variant); } diff --git a/crates/csharp/src/world_generator.rs b/crates/csharp/src/world_generator.rs index b72143139..ccc97708d 100644 --- a/crates/csharp/src/world_generator.rs +++ b/crates/csharp/src/world_generator.rs @@ -291,7 +291,7 @@ impl WorldGenerator for CSharp { for (name, export) in world.exports.iter() { match name { WorldKey::Name(name) => match export { - WorldItem::Type(id) => { + WorldItem::Type { id, .. } => { if !CSharp::type_is_bidirectional(resolve, &id) { types.push((name.as_str(), *id)) } diff --git a/crates/markdown/src/lib.rs b/crates/markdown/src/lib.rs index e0b9eb712..4ba345fad 100644 --- a/crates/markdown/src/lib.rs +++ b/crates/markdown/src/lib.rs @@ -76,7 +76,7 @@ impl WorldGenerator for Markdown { r#gen.push_str(name); r#gen.push_str("`\n"); } - WorldItem::Type(_) => { + WorldItem::Type { .. } => { r#gen.push_str(" - type `"); r#gen.push_str(name); r#gen.push_str("`\n"); @@ -101,7 +101,7 @@ impl WorldGenerator for Markdown { r#gen.push_str(name); r#gen.push_str("`\n"); } - WorldItem::Type(_) => { + WorldItem::Type { .. } => { r#gen.push_str(" - type `"); r#gen.push_str(name); r#gen.push_str("`\n"); From 036debf1dfc15fc203351d9493e746049725648d Mon Sep 17 00:00:00 2001 From: Christof Petig Date: Mon, 9 Feb 2026 22:34:43 +0100 Subject: [PATCH 3/4] adapt to new Parameter type --- Cargo.lock | 16 ++++++------ crates/c/src/lib.rs | 14 +++++----- crates/core/src/abi.rs | 20 ++++++++++----- crates/core/src/types.rs | 2 +- crates/cpp/src/lib.rs | 40 ++++++++++++++++++++++------- crates/csharp/src/interface.rs | 13 +++++----- crates/go/src/lib.rs | 12 ++++----- crates/markdown/src/lib.rs | 2 +- crates/moonbit/src/async_support.rs | 8 +++--- crates/moonbit/src/lib.rs | 5 ++-- crates/moonbit/src/pkg.rs | 4 +-- crates/rust/src/interface.rs | 22 +++++++++++----- 12 files changed, 99 insertions(+), 59 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 856ea061d..95e3f4b60 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1230,7 +1230,7 @@ checksum = "6545ca20bba2f220430c4a97f6b60c48ef14eaa432b04e6b31be547037b4c9ab" [[package]] name = "wasm-compose" version = "0.244.0" -source = "git+https://github.com/bytecodealliance/wasm-tools.git#39cd181edac6f8f9a951f1c7f0f6bfb744e81283" +source = "git+https://github.com/bytecodealliance/wasm-tools.git#1ed898a8242456d943f1d6f83667b5c7220e4021" dependencies = [ "anyhow", "heck", @@ -1250,7 +1250,7 @@ dependencies = [ [[package]] name = "wasm-encoder" version = "0.244.0" -source = "git+https://github.com/bytecodealliance/wasm-tools.git#39cd181edac6f8f9a951f1c7f0f6bfb744e81283" +source = "git+https://github.com/bytecodealliance/wasm-tools.git#1ed898a8242456d943f1d6f83667b5c7220e4021" dependencies = [ "leb128fmt", "wasmparser", @@ -1259,7 +1259,7 @@ dependencies = [ [[package]] name = "wasm-metadata" version = "0.244.0" -source = "git+https://github.com/bytecodealliance/wasm-tools.git#39cd181edac6f8f9a951f1c7f0f6bfb744e81283" +source = "git+https://github.com/bytecodealliance/wasm-tools.git#1ed898a8242456d943f1d6f83667b5c7220e4021" dependencies = [ "anyhow", "auditable-serde", @@ -1277,7 +1277,7 @@ dependencies = [ [[package]] name = "wasmparser" version = "0.244.0" -source = "git+https://github.com/bytecodealliance/wasm-tools.git#39cd181edac6f8f9a951f1c7f0f6bfb744e81283" +source = "git+https://github.com/bytecodealliance/wasm-tools.git#1ed898a8242456d943f1d6f83667b5c7220e4021" dependencies = [ "bitflags", "hashbrown 0.15.5", @@ -1289,7 +1289,7 @@ dependencies = [ [[package]] name = "wast" version = "244.0.0" -source = "git+https://github.com/bytecodealliance/wasm-tools.git#39cd181edac6f8f9a951f1c7f0f6bfb744e81283" +source = "git+https://github.com/bytecodealliance/wasm-tools.git#1ed898a8242456d943f1d6f83667b5c7220e4021" dependencies = [ "bumpalo", "leb128fmt", @@ -1301,7 +1301,7 @@ dependencies = [ [[package]] name = "wat" version = "1.244.0" -source = "git+https://github.com/bytecodealliance/wasm-tools.git#39cd181edac6f8f9a951f1c7f0f6bfb744e81283" +source = "git+https://github.com/bytecodealliance/wasm-tools.git#1ed898a8242456d943f1d6f83667b5c7220e4021" dependencies = [ "wast", ] @@ -1586,7 +1586,7 @@ dependencies = [ [[package]] name = "wit-component" version = "0.244.0" -source = "git+https://github.com/bytecodealliance/wasm-tools.git#39cd181edac6f8f9a951f1c7f0f6bfb744e81283" +source = "git+https://github.com/bytecodealliance/wasm-tools.git#1ed898a8242456d943f1d6f83667b5c7220e4021" dependencies = [ "anyhow", "bitflags", @@ -1605,7 +1605,7 @@ dependencies = [ [[package]] name = "wit-parser" version = "0.244.0" -source = "git+https://github.com/bytecodealliance/wasm-tools.git#39cd181edac6f8f9a951f1c7f0f6bfb744e81283" +source = "git+https://github.com/bytecodealliance/wasm-tools.git#1ed898a8242456d943f1d6f83667b5c7220e4021" dependencies = [ "anyhow", "hashbrown 0.15.5", diff --git a/crates/c/src/lib.rs b/crates/c/src/lib.rs index f25c6fbff..80b5950c8 100644 --- a/crates/c/src/lib.rs +++ b/crates/c/src/lib.rs @@ -2142,7 +2142,7 @@ impl InterfaceGenerator<'_> { let mut optional_adapters = String::from(""); if !self.r#gen.opts.no_sig_flattening { for (i, (_, param)) in c_sig.params.iter().enumerate() { - let ty = &func.params[i].1; + let ty = &func.params[i].ty; if let Type::Id(id) = ty { if let TypeDefKind::Option(_) = &self.resolve.types[*id].kind { let ty = self.r#gen.type_name(ty); @@ -2216,7 +2216,7 @@ impl InterfaceGenerator<'_> { params.push(format!("(uint8_t*) {}", c_sig.params[0].1)); } else { let mut f = FunctionBindgen::new(self, c_sig.clone(), "INVALID"); - for (i, (_, ty)) in func.params.iter().enumerate() { + for (i, Param { ty, .. }) in func.params.iter().enumerate() { let param = &c_sig.params[i].1; params.extend(abi::lower_flat(f.r#gen.resolve, &mut f, param.clone(), ty)); } @@ -2488,7 +2488,7 @@ void {name}_return({return_ty}) {{ fn print_sig_params(&mut self, func: &Function) -> Vec<(bool, String)> { let mut params = Vec::new(); - for (i, (name, ty)) in func.params.iter().enumerate() { + for (i, Param { name, ty, .. }) in func.params.iter().enumerate() { if i > 0 { self.src.h_fns(", "); } @@ -2538,7 +2538,7 @@ void {name}_return({return_ty}) {{ if sig.indirect_params { match &func.params[..] { [] => {} - [(_name, ty)] => { + [Param { name: _, ty, .. }] => { printed = true; let name = "arg".to_string(); self.print_ty(SourceType::HFns, ty); @@ -2550,7 +2550,7 @@ void {name}_return({return_ty}) {{ printed = true; let names = multiple .iter() - .map(|(name, ty)| (to_c_ident(name), self.r#gen.type_name(ty))) + .map(|Param { name, ty, .. }| (to_c_ident(name), self.r#gen.type_name(ty))) .collect::>(); uwriteln!(self.src.h_defs, "typedef struct {c_func_name}_args {{"); for (name, ty) in names { @@ -2562,7 +2562,7 @@ void {name}_return({return_ty}) {{ } } } else { - for (name, ty) in func.params.iter() { + for Param { name, ty, .. } in func.params.iter() { let name = to_c_ident(name); if printed { self.src.h_fns(", "); @@ -3621,7 +3621,7 @@ impl Bindgen for FunctionBindgen<'_, '_> { if i > 0 { args.push_str(", "); } - let ty = &func.params[i].1; + let ty = &func.params[i].ty; if *byref { let name = self.locals.tmp("arg"); let ty = self.r#gen.r#gen.type_name(ty); diff --git a/crates/core/src/abi.rs b/crates/core/src/abi.rs index d6052f505..7d625f222 100644 --- a/crates/core/src/abi.rs +++ b/crates/core/src/abi.rs @@ -1,6 +1,7 @@ use std::fmt; use std::iter; +use wit_parser::Param; pub use wit_parser::abi::{AbiVariant, FlatTypes, WasmSignature, WasmType}; use wit_parser::{ Alignment, ArchitectureSize, ElementInfo, Enum, Flags, FlagsRepr, Function, Handle, Int, @@ -842,7 +843,7 @@ pub fn guest_export_needs_post_return(resolve: &Resolve, func: &Function) -> boo pub fn guest_export_params_have_allocations(resolve: &Resolve, func: &Function) -> bool { func.params .iter() - .any(|(_, t)| needs_deallocate(resolve, &t, Deallocate::Lists)) + .any(|param| needs_deallocate(resolve, ¶m.ty, Deallocate::Lists)) } fn needs_deallocate(resolve: &Resolve, ty: &Type, what: Deallocate) -> bool { @@ -1003,7 +1004,7 @@ impl<'a, B: Bindgen> Generator<'a, B> { // Create a function that performs individual lowering of operands let lower_to_memory = |self_: &mut Self, ptr: B::Operand| { let mut offset = ArchitectureSize::default(); - for (nth, (_, ty)) in func.params.iter().enumerate() { + for (nth, Param { ty, .. }) in func.params.iter().enumerate() { self_.emit(&Instruction::GetArg { nth }); offset = align_to_arch(offset, self_.bindgen.sizes().align(ty)); self_.write_to_memory(ty, ptr.clone(), offset); @@ -1021,7 +1022,7 @@ impl<'a, B: Bindgen> Generator<'a, B> { let ElementInfo { size, align } = self .bindgen .sizes() - .record(func.params.iter().map(|t| &t.1)); + .record(func.params.iter().map(|param| ¶m.ty)); // Resolve the pointer to the indirectly stored parameters let ptr = match variant { @@ -1055,7 +1056,7 @@ impl<'a, B: Bindgen> Generator<'a, B> { // ... otherwise arguments are direct, // (there aren't too many) then we simply do a normal lower // operation for them all. - for (nth, (_, ty)) in func.params.iter().enumerate() { + for (nth, Param { ty, .. }) in func.params.iter().enumerate() { self.emit(&Instruction::GetArg { nth }); self.lower(ty); } @@ -1163,7 +1164,7 @@ impl<'a, B: Bindgen> Generator<'a, B> { .stack .pop() .expect("empty stack during read param from memory"); - for (_, ty) in func.params.iter() { + for Param { ty, .. } in func.params.iter() { offset = align_to_arch(offset, self_.bindgen.sizes().align(ty)); self_.read_from_memory(ty, ptr.clone(), offset); offset += self_.bindgen.sizes().size(ty); @@ -1182,7 +1183,12 @@ impl<'a, B: Bindgen> Generator<'a, B> { // argument in succession from the component wasm types that // make-up the type. let mut offset = 0; - for (param_name, ty) in func.params.iter() { + for Param { + name: param_name, + ty, + .. + } in func.params.iter() + { let Some(types) = flat_types(self.resolve, ty, Some(max_flat_params)) else { panic!( @@ -1236,7 +1242,7 @@ impl<'a, B: Bindgen> Generator<'a, B> { let ElementInfo { size, align } = self .bindgen .sizes() - .record(func.params.iter().map(|t| &t.1)); + .record(func.params.iter().map(|param| ¶m.ty)); self.emit(&Instruction::GetArg { nth: 0 }); self.emit(&Instruction::GuestDeallocate { size, align }); } diff --git a/crates/core/src/types.rs b/crates/core/src/types.rs index 5decdcde2..08bf034bc 100644 --- a/crates/core/src/types.rs +++ b/crates/core/src/types.rs @@ -96,7 +96,7 @@ impl Types { fn type_info_func(&mut self, resolve: &Resolve, func: &Function, import: bool) { let mut live = LiveTypes::default(); - for (_, ty) in func.params.iter() { + for Param { ty, .. } in func.params.iter() { self.type_info(resolve, ty); live.add_type(resolve, ty); } diff --git a/crates/cpp/src/lib.rs b/crates/cpp/src/lib.rs index 920a79afa..183609237 100644 --- a/crates/cpp/src/lib.rs +++ b/crates/cpp/src/lib.rs @@ -15,7 +15,7 @@ use wit_bindgen_core::{ abi::{self, AbiVariant, Bindgen, Bitcast, LiftLower, WasmSignature, WasmType}, name_package_module, uwrite, uwriteln, wit_parser::{ - Alignment, ArchitectureSize, Docs, Function, FunctionKind, Handle, Int, InterfaceId, + Alignment, ArchitectureSize, Docs, Function, FunctionKind, Handle, Int, InterfaceId, Param, Resolve, SizeAlign, Stability, Type, TypeDef, TypeDefKind, TypeId, TypeOwner, WorldId, WorldKey, }, @@ -1120,7 +1120,13 @@ impl CppInterfaceGenerator<'_> { { res.static_member = true; } - for (i, (name, param)) in func.params.iter().enumerate() { + for ( + i, + Param { + name, ty: param, .. + }, + ) in func.params.iter().enumerate() + { if i == 0 && name == "self" && (matches!(&func.kind, FunctionKind::Method(_)) @@ -1314,7 +1320,7 @@ impl CppInterfaceGenerator<'_> { uwriteln!( self.r#gen.c_src.src, "{wasm_sig}({});", - func.params.first().unwrap().0 + func.params.first().unwrap().name ); } LiftLower::LowerArgsLiftResults => { @@ -1347,7 +1353,7 @@ impl CppInterfaceGenerator<'_> { self.r#gen.c_src.src, "return {wasm_sig}(({}){});", self.r#gen.opts.ptr_type(), - func.params.first().unwrap().0 + func.params.first().unwrap().name ); } SpecialMethod::ResourceRep => { @@ -1364,7 +1370,7 @@ impl CppInterfaceGenerator<'_> { self.r#gen.c_src.src, "return ({}*){wasm_sig}({});", classname, - func.params.first().unwrap().0 + func.params.first().unwrap().name ); } SpecialMethod::Allocate => unreachable!(), @@ -1916,7 +1922,11 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for CppInterfaceGenerator<'a> let func = Function { name, kind: FunctionKind::Static(id), - params: vec![("self".into(), Type::Id(id))], + params: vec![Param { + name: "self".into(), + ty: Type::Id(id), + span: Default::default(), + }], result: None, docs: Docs::default(), stability: Stability::Unknown, @@ -1980,7 +1990,11 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for CppInterfaceGenerator<'a> let func = Function { name: "[resource-new]".to_string() + name, kind: FunctionKind::Static(id), - params: vec![("self".into(), Type::Id(id))], + params: vec![Param { + name: "self".into(), + ty: Type::Id(id), + span: Default::default(), + }], result: Some(id_type), docs: Docs::default(), stability: Stability::Unknown, @@ -1991,7 +2005,11 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for CppInterfaceGenerator<'a> let func1 = Function { name: "[resource-rep]".to_string() + name, kind: FunctionKind::Static(id), - params: vec![("id".into(), id_type)], + params: vec![Param { + name: "id".into(), + ty: id_type, + span: Default::default(), + }], result: Some(Type::Id(id)), docs: Docs::default(), stability: Stability::Unknown, @@ -2002,7 +2020,11 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for CppInterfaceGenerator<'a> let func2 = Function { name: "[resource-drop]".to_string() + name, kind: FunctionKind::Static(id), - params: vec![("id".into(), id_type)], + params: vec![Param { + name: "id".into(), + ty: id_type, + span: Default::default(), + }], result: None, docs: Docs::default(), stability: Stability::Unknown, diff --git a/crates/csharp/src/interface.rs b/crates/csharp/src/interface.rs index 70fe5a728..adf5d383b 100644 --- a/crates/csharp/src/interface.rs +++ b/crates/csharp/src/interface.rs @@ -11,6 +11,7 @@ use wit_bindgen_core::abi::LiftLower; use wit_bindgen_core::{ Direction, InterfaceGenerator as CoreInterfaceGenerator, abi, uwrite, uwriteln, }; +use wit_parser::Param; use wit_parser::abi::AbiVariant; use wit_parser::{ Docs, Enum, Flags, FlagsRepr, Function, FunctionKind, Handle, Int, InterfaceId, LiveTypes, @@ -457,7 +458,7 @@ impl InterfaceGenerator<'_> { } else { 0 }) - .any(|param| self.is_primative_list(¶m.1)); + .any(|param| self.is_primative_list(¶m.ty)); if include_additional_functions { funcs.push(self.gen_import_src(func, &results, ParameterType::Span)); @@ -575,7 +576,7 @@ impl InterfaceGenerator<'_> { func.params .iter() .enumerate() - .map(|(i, (name, _))| { + .map(|(i, Param { name, .. })| { if i == 0 && matches!(&func.kind, FunctionKind::Method(_)) { "this".to_owned() } else { @@ -608,8 +609,8 @@ impl InterfaceGenerator<'_> { 0 }) .map(|param| { - let ty = self.name_with_qualifier(¶m.1, true, parameter_type); - let param_name = ¶m.0; + let ty = self.name_with_qualifier(¶m.ty, true, parameter_type); + let param_name = ¶m.name; let param_name = param_name.to_csharp_ident(); format!("{ty} {param_name}") }) @@ -704,7 +705,7 @@ impl InterfaceGenerator<'_> { } else { 0 }) - .map(|(name, ty)| { + .map(|Param { name, ty, .. }| { let ty = self.type_name_with_qualifier(ty, true); let name = name.to_csharp_ident(); format!("{ty} {name}") @@ -1248,7 +1249,7 @@ impl InterfaceGenerator<'_> { } else { 0 }) - .map(|(name, ty)| { + .map(|Param { name, ty, .. }| { let ty = self.type_name_with_qualifier(ty, qualifier); let name = name.to_csharp_ident(); format!("{ty} {name}") diff --git a/crates/go/src/lib.rs b/crates/go/src/lib.rs index 1c86b8db1..831db5bc9 100644 --- a/crates/go/src/lib.rs +++ b/crates/go/src/lib.rs @@ -15,7 +15,7 @@ use wit_bindgen_core::abi::{ }; use wit_bindgen_core::wit_parser::{ Alignment, ArchitectureSize, Docs, Enum, Flags, FlagsRepr, Function, FunctionKind, Handle, Int, - InterfaceId, Package, PackageName, Record, Resolve, Result_, SizeAlign, Tuple, Type, + InterfaceId, Package, PackageName, Param, Record, Resolve, Result_, SizeAlign, Tuple, Type, TypeDefKind, TypeId, TypeOwner, Variant, WorldId, WorldKey, }; use wit_bindgen_core::{ @@ -985,7 +985,7 @@ impl Go { func.params .iter() .skip(if has_self { 1 } else { 0 }) - .map(|(name, _)| name.to_lower_camel_case()), + .map(|Param { name, .. }| name.to_lower_camel_case()), ) .collect::>(); @@ -1011,13 +1011,13 @@ impl Go { let abi = generator .generator .sizes - .record(func.params.iter().map(|(_, ty)| ty)); + .record(func.params.iter().map(|Param { ty, .. }| ty)); let size = abi.size.format(POINTER_SIZE_EXPRESSION); let align = abi.align.format(POINTER_SIZE_EXPRESSION); let offsets = generator .generator .sizes - .field_offsets(func.params.iter().map(|(_, ty)| ty)); + .field_offsets(func.params.iter().map(|Param { ty, .. }| ty)); for (name, (offset, ty)) in go_param_names.iter().zip(offsets) { let offset = offset.format(POINTER_SIZE_EXPRESSION); @@ -1042,7 +1042,7 @@ impl Go { let wasm_params = go_param_names .iter() .zip(&func.params) - .flat_map(|(name, (_, ty))| { + .flat_map(|(name, Param { ty, .. })| { abi::lower_flat(resolve, &mut generator, name.clone(), ty) }) .collect(); @@ -1341,7 +1341,7 @@ func wasm_export_{name}({params}) {results} {{ func.params .iter() .skip(if has_self { 1 } else { 0 }) - .map(|(name, ty)| { + .map(|Param { name, ty, .. }| { let name = name.to_lower_camel_case(); let ty = self.type_name(resolve, *ty, interface, in_import, imports); format!("{prefix}{name} {ty}") diff --git a/crates/markdown/src/lib.rs b/crates/markdown/src/lib.rs index 4ba345fad..8e05696d0 100644 --- a/crates/markdown/src/lib.rs +++ b/crates/markdown/src/lib.rs @@ -279,7 +279,7 @@ impl InterfaceGenerator<'_> { if func.params.len() > 0 { self.push_str("\n"); self.push_str("##### Params\n\n"); - for (name, ty) in func.params.iter() { + for Param { name, ty, .. } in func.params.iter() { self.push_str(&format!( "- `{}`: ", name, diff --git a/crates/moonbit/src/async_support.rs b/crates/moonbit/src/async_support.rs index 4b907773e..7975c6990 100644 --- a/crates/moonbit/src/async_support.rs +++ b/crates/moonbit/src/async_support.rs @@ -8,7 +8,7 @@ use wit_bindgen_core::{ Files, Source, abi::{self, WasmSignature}, uwriteln, - wit_parser::{Function, Resolve, Type, TypeDefKind, TypeId}, + wit_parser::{Function, Param, Resolve, Type, TypeDefKind, TypeId}, }; use crate::{ @@ -110,11 +110,11 @@ impl<'a> InterfaceGenerator<'a> { if sig.indirect_params { match &func.params[..] { [] => {} - [(_, _)] => { + [_] => { lower_params.push("_lower_ptr".into()); } multiple_params => { - let params = multiple_params.iter().map(|(_, ty)| ty); + let params = multiple_params.iter().map(|Param { ty, .. }| ty); let offsets = self.r#gen.sizes.field_offsets(params.clone()); let elem_info = self.r#gen.sizes.params(params); body.push_str(&format!( @@ -128,7 +128,7 @@ impl<'a> InterfaceGenerator<'a> { for ((offset, ty), name) in offsets.iter().zip( multiple_params .iter() - .map(|(name, _)| name.to_moonbit_ident()), + .map(|Param { name, .. }| name.to_moonbit_ident()), ) { let result = self.lower_to_memory( &format!("_lower_ptr + {}", offset.size_wasm32()), diff --git a/crates/moonbit/src/lib.rs b/crates/moonbit/src/lib.rs index 69b0b96ba..656b0fea3 100644 --- a/crates/moonbit/src/lib.rs +++ b/crates/moonbit/src/lib.rs @@ -14,7 +14,8 @@ use wit_bindgen_core::{ uwrite, uwriteln, wit_parser::{ Alignment, ArchitectureSize, Docs, Enum, Flags, FlagsRepr, Function, Int, InterfaceId, - Record, Resolve, Result_, SizeAlign, Tuple, Type, TypeId, Variant, WorldId, WorldKey, + Param, Record, Resolve, Result_, SizeAlign, Tuple, Type, TypeId, Variant, WorldId, + WorldKey, }, }; @@ -603,7 +604,7 @@ impl InterfaceGenerator<'_> { self.name, func.params .iter() - .map(|(name, _)| name.to_moonbit_ident()) + .map(|Param { name, .. }| name.to_moonbit_ident()) .collect(), ); diff --git a/crates/moonbit/src/pkg.rs b/crates/moonbit/src/pkg.rs index 28f60ecda..bdaa5b34d 100644 --- a/crates/moonbit/src/pkg.rs +++ b/crates/moonbit/src/pkg.rs @@ -4,7 +4,7 @@ use heck::{ToLowerCamelCase, ToSnakeCase, ToUpperCamelCase}; use wit_bindgen_core::{ Ns, dealias, wit_parser::{ - Function, FunctionKind, Handle, InterfaceId, Resolve, Type, TypeDef, TypeDefKind, + Function, FunctionKind, Handle, InterfaceId, Param, Resolve, Type, TypeDef, TypeDefKind, TypeOwner, WorldId, WorldKey, }, }; @@ -323,7 +323,7 @@ impl PkgResolver { let params = func .params .iter() - .map(|(name, ty)| { + .map(|Param { name, ty, .. }| { let name = if ignore_param { format!("_{}", name.to_moonbit_ident()) } else { diff --git a/crates/rust/src/interface.rs b/crates/rust/src/interface.rs index 7fe76278e..290062156 100644 --- a/crates/rust/src/interface.rs +++ b/crates/rust/src/interface.rs @@ -807,7 +807,11 @@ pub mod vtable{ordinal} {{ func: &Function, mut params: Vec, ) { - let param_tys = func.params.iter().map(|(_, ty)| *ty).collect::>(); + let param_tys = func + .params + .iter() + .map(|Param { ty, .. }| *ty) + .collect::>(); let async_support = self.r#gen.async_support_path(); let sig = self .resolve @@ -850,7 +854,7 @@ unsafe impl<'a> _Subtask for _MySubtask<'a> {{ // Generate `type Params` uwrite!(self.src, "type Params = ("); - for (_, ty) in func.params.iter() { + for Param { ty, .. } in func.params.iter() { let mode = self.type_mode_for(ty, TypeOwnershipStyle::Owned, "'a"); self.print_ty(ty, mode); self.src.push_str(", "); @@ -970,7 +974,7 @@ unsafe fn call_import(&mut self, _params: Self::ParamsLower, _results: *mut u8) if sig.indirect_params { let offsets = self .sizes - .field_offsets(func.params.iter().map(|(_, ty)| ty)); + .field_offsets(func.params.iter().map(|Param { ty, .. }| ty)); for (i, (offset, ty)) in offsets.into_iter().enumerate() { let name = format!("_lower{i}"); let mut start = format!( @@ -986,7 +990,7 @@ unsafe fn call_import(&mut self, _params: Self::ParamsLower, _results: *mut u8) } else { let mut f = FunctionBindgen::new(self, Vec::new(), module, true); let mut results = Vec::new(); - for (i, (_, ty)) in func.params.iter().enumerate() { + for (i, Param { ty, .. }) in func.params.iter().enumerate() { let name = format!("_lower{i}"); results.extend(abi::lower_flat(f.r#gen.resolve, &mut f, name.clone(), ty)); param_lowers.push(name); @@ -1352,7 +1356,7 @@ unsafe fn call_import(&mut self, _params: Self::ParamsLower, _results: *mut u8) } } - fn rustdoc_params(&mut self, docs: &[(String, Type)], header: &str) { + fn rustdoc_params(&mut self, docs: &Vec, header: &str) { let _ = (docs, header); // let docs = docs // .iter() @@ -1452,7 +1456,13 @@ unsafe fn call_import(&mut self, _params: Self::ParamsLower, _results: *mut u8) self.push_str(","); } let mut params = Vec::new(); - for (i, (name, param)) in func.params.iter().enumerate() { + for ( + i, + Param { + name, ty: param, .. + }, + ) in func.params.iter().enumerate() + { if i == 0 && sig.self_is_first_param { params.push("self".to_string()); continue; From 4b451e43af336dcbe217d961b35bbf2cf2fe049a Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 10 Feb 2026 10:41:31 -0800 Subject: [PATCH 4/4] Update to crates.io-based versions of crates --- Cargo.lock | 165 +++++++++++++++++++++++++++-------------- Cargo.toml | 14 ++-- crates/test/Cargo.toml | 6 +- 3 files changed, 121 insertions(+), 64 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 95e3f4b60..07e07e308 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -272,6 +272,12 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + [[package]] name = "form_urlencoded" version = "1.2.2" @@ -376,7 +382,7 @@ version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ - "foldhash", + "foldhash 0.1.5", "serde", ] @@ -385,6 +391,11 @@ name = "hashbrown" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "foldhash 0.2.0", + "serde", + "serde_core", +] [[package]] name = "heck" @@ -1015,7 +1026,7 @@ name = "test-helpers" version = "0.0.0" dependencies = [ "codegen-macro", - "wasm-encoder", + "wasm-encoder 0.245.0", "wit-bindgen-core", "wit-component", "wit-parser", @@ -1172,8 +1183,9 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wac-graph" -version = "0.9.0-dev" -source = "git+https://github.com/cpetig/wac.git?branch=new_wasm_tools#5d4485d03a2bedd75398bf2ebb2a02e18198c13b" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d511e0c9462a5f6369e7e17e9f0f3b566eab2a235076a23f2db19ca7bf36d32c" dependencies = [ "anyhow", "id-arena", @@ -1183,15 +1195,16 @@ dependencies = [ "semver", "thiserror", "wac-types", - "wasm-encoder", - "wasm-metadata", - "wasmparser", + "wasm-encoder 0.239.0", + "wasm-metadata 0.239.0", + "wasmparser 0.239.0", ] [[package]] name = "wac-parser" -version = "0.9.0-dev" -source = "git+https://github.com/cpetig/wac.git?branch=new_wasm_tools#5d4485d03a2bedd75398bf2ebb2a02e18198c13b" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b47c29a894f9f82c4da2d036d410babb3bd5aed0acfb4c3d779b536a4316cba0" dependencies = [ "anyhow", "id-arena", @@ -1203,22 +1216,23 @@ dependencies = [ "serde", "thiserror", "wac-graph", - "wasm-encoder", - "wasm-metadata", - "wasmparser", + "wasm-encoder 0.239.0", + "wasm-metadata 0.239.0", + "wasmparser 0.239.0", ] [[package]] name = "wac-types" -version = "0.9.0-dev" -source = "git+https://github.com/cpetig/wac.git?branch=new_wasm_tools#5d4485d03a2bedd75398bf2ebb2a02e18198c13b" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64fdef742a5198856c7c754944b329ed684f703dca477d0a77b474b37d990121" dependencies = [ "anyhow", "id-arena", "indexmap", "semver", - "wasm-encoder", - "wasmparser", + "wasm-encoder 0.239.0", + "wasmparser 0.239.0", ] [[package]] @@ -1229,8 +1243,9 @@ checksum = "6545ca20bba2f220430c4a97f6b60c48ef14eaa432b04e6b31be547037b4c9ab" [[package]] name = "wasm-compose" -version = "0.244.0" -source = "git+https://github.com/bytecodealliance/wasm-tools.git#1ed898a8242456d943f1d6f83667b5c7220e4021" +version = "0.245.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e87956946cd902ed92479d41ea3210538cb77d8bd104f0cd05b80627fcb3c6" dependencies = [ "anyhow", "heck", @@ -1242,24 +1257,36 @@ dependencies = [ "serde_derive", "serde_yaml", "smallvec", - "wasm-encoder", - "wasmparser", + "wasm-encoder 0.245.0", + "wasmparser 0.245.0", "wat", ] [[package]] name = "wasm-encoder" -version = "0.244.0" -source = "git+https://github.com/bytecodealliance/wasm-tools.git#1ed898a8242456d943f1d6f83667b5c7220e4021" +version = "0.239.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be00faa2b4950c76fe618c409d2c3ea5a3c9422013e079482d78544bb2d184c" +dependencies = [ + "leb128fmt", + "wasmparser 0.239.0", +] + +[[package]] +name = "wasm-encoder" +version = "0.245.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95d568e113f706ee7a7df9b33547bb80721f55abffc79b3dc4d09c368690e662" dependencies = [ "leb128fmt", - "wasmparser", + "wasmparser 0.245.0", ] [[package]] name = "wasm-metadata" -version = "0.244.0" -source = "git+https://github.com/bytecodealliance/wasm-tools.git#1ed898a8242456d943f1d6f83667b5c7220e4021" +version = "0.239.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20b3ec880a9ac69ccd92fbdbcf46ee833071cf09f82bb005b2327c7ae6025ae2" dependencies = [ "anyhow", "auditable-serde", @@ -1270,14 +1297,27 @@ dependencies = [ "serde_json", "spdx", "url", - "wasm-encoder", - "wasmparser", + "wasm-encoder 0.239.0", + "wasmparser 0.239.0", +] + +[[package]] +name = "wasm-metadata" +version = "0.245.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce52b194ec202d029751081d735c1ae49c1bacbdc2634c821a86211e3751300c" +dependencies = [ + "anyhow", + "indexmap", + "wasm-encoder 0.245.0", + "wasmparser 0.245.0", ] [[package]] name = "wasmparser" -version = "0.244.0" -source = "git+https://github.com/bytecodealliance/wasm-tools.git#1ed898a8242456d943f1d6f83667b5c7220e4021" +version = "0.239.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c9d90bb93e764f6beabf1d02028c70a2156a6583e63ac4218dd07ef733368b0" dependencies = [ "bitflags", "hashbrown 0.15.5", @@ -1286,22 +1326,37 @@ dependencies = [ "serde", ] +[[package]] +name = "wasmparser" +version = "0.245.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48a767a48974f0c8b66f211b96e01aa77feed58b8ccce4e7f0cff0ae55b174d4" +dependencies = [ + "bitflags", + "hashbrown 0.16.1", + "indexmap", + "semver", + "serde", +] + [[package]] name = "wast" -version = "244.0.0" -source = "git+https://github.com/bytecodealliance/wasm-tools.git#1ed898a8242456d943f1d6f83667b5c7220e4021" +version = "245.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75ffc7471e16a6f3c7a3c3a230314915b5dcd158e5ef13ccda2f43358a9df00c" dependencies = [ "bumpalo", "leb128fmt", "memchr", "unicode-width 0.2.2", - "wasm-encoder", + "wasm-encoder 0.245.0", ] [[package]] name = "wat" -version = "1.244.0" -source = "git+https://github.com/bytecodealliance/wasm-tools.git#1ed898a8242456d943f1d6f83667b5c7220e4021" +version = "1.245.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bcac6f915e2a84a4c0d9df9d41ad7518d99cda13f3bb83e3b8c22bf8726ab6" dependencies = [ "wast", ] @@ -1423,8 +1478,8 @@ dependencies = [ "clap", "heck", "indexmap", - "wasm-encoder", - "wasm-metadata", + "wasm-encoder 0.245.0", + "wasm-metadata 0.245.0", "wit-bindgen-core", "wit-component", ] @@ -1436,7 +1491,7 @@ dependencies = [ "anyhow", "clap", "env_logger", - "wasm-encoder", + "wasm-encoder 0.245.0", "wit-bindgen-c", "wit-bindgen-core", "wit-bindgen-cpp", @@ -1468,8 +1523,8 @@ dependencies = [ "clap", "heck", "test-helpers", - "wasm-encoder", - "wasm-metadata", + "wasm-encoder 0.245.0", + "wasm-metadata 0.245.0", "wit-bindgen-c", "wit-bindgen-core", "wit-component", @@ -1483,7 +1538,7 @@ dependencies = [ "clap", "heck", "indexmap", - "wasm-metadata", + "wasm-metadata 0.245.0", "wit-bindgen-core", "wit-component", "wit-parser", @@ -1496,8 +1551,8 @@ dependencies = [ "anyhow", "clap", "heck", - "wasm-encoder", - "wasm-metadata", + "wasm-encoder 0.245.0", + "wasm-metadata 0.245.0", "wit-bindgen-core", "wit-component", ] @@ -1538,7 +1593,7 @@ dependencies = [ "serde_json", "syn", "test-helpers", - "wasm-metadata", + "wasm-metadata 0.245.0", "wit-bindgen", "wit-bindgen-core", "wit-component", @@ -1575,8 +1630,8 @@ dependencies = [ "wac-types", "wasi-preview1-component-adapter-provider", "wasm-compose", - "wasm-encoder", - "wasmparser", + "wasm-encoder 0.245.0", + "wasmparser 0.245.0", "wat", "wit-bindgen-csharp", "wit-component", @@ -1585,8 +1640,9 @@ dependencies = [ [[package]] name = "wit-component" -version = "0.244.0" -source = "git+https://github.com/bytecodealliance/wasm-tools.git#1ed898a8242456d943f1d6f83667b5c7220e4021" +version = "0.245.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "896efcb3d68ea1cb555d2d1df185b4071b39d91cf850456809bb0c90a0e4e66e" dependencies = [ "anyhow", "bitflags", @@ -1595,20 +1651,21 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", + "wasm-encoder 0.245.0", + "wasm-metadata 0.245.0", + "wasmparser 0.245.0", "wat", "wit-parser", ] [[package]] name = "wit-parser" -version = "0.244.0" -source = "git+https://github.com/bytecodealliance/wasm-tools.git#1ed898a8242456d943f1d6f83667b5c7220e4021" +version = "0.245.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5cda4f69fdc5a8d54f7032262217dd89410a933e3f86fdad854f5833caf3ccb" dependencies = [ "anyhow", - "hashbrown 0.15.5", + "hashbrown 0.16.1", "id-arena", "indexmap", "log", @@ -1617,7 +1674,7 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser", + "wasmparser 0.245.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index ae1b1538b..5e623f687 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,13 +36,13 @@ prettyplease = "0.2.20" syn = { version = "2.0.89", features = ["printing"] } futures = "0.3.31" -wat = { git = 'https://github.com/bytecodealliance/wasm-tools.git' } -wasmparser = { git = 'https://github.com/bytecodealliance/wasm-tools.git' } -wasm-encoder = { git = 'https://github.com/bytecodealliance/wasm-tools.git' } -wasm-metadata = { git = 'https://github.com/bytecodealliance/wasm-tools.git' } -wit-parser = { git = 'https://github.com/bytecodealliance/wasm-tools.git' } -wit-component = { git = 'https://github.com/bytecodealliance/wasm-tools.git' } -wasm-compose = { git = 'https://github.com/bytecodealliance/wasm-tools.git' } +wat = "1.245.0" +wasmparser = "0.245.0" +wasm-encoder = "0.245.0" +wasm-metadata = { version = "0.245.0", default-features = false } +wit-parser = "0.245.0" +wit-component = "0.245.0" +wasm-compose = "0.245.0" wit-bindgen-core = { path = 'crates/core', version = '0.52.0' } wit-bindgen-c = { path = 'crates/c', version = '0.52.0' } diff --git a/crates/test/Cargo.toml b/crates/test/Cargo.toml index 0b9e5bcff..283625380 100644 --- a/crates/test/Cargo.toml +++ b/crates/test/Cargo.toml @@ -27,9 +27,9 @@ regex = "1.11.1" serde = { workspace = true } toml = "0.8.20" wasi-preview1-component-adapter-provider = "37.0.2" -wac-parser = { git = "https://github.com/cpetig/wac.git", branch = "new_wasm_tools" } -wac-types = { git = "https://github.com/cpetig/wac.git", branch = "new_wasm_tools" } -wac-graph = { git = "https://github.com/cpetig/wac.git", branch = "new_wasm_tools" } +wac-parser = "0.8.1" +wac-types = "0.8.1" +wac-graph = "0.8.1" wasm-compose = { workspace = true } indexmap = { workspace = true } wasm-encoder = { workspace = true }