From 396d2e70d43072c4b286ec44629ced8495fddbcd Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 8 Jul 2024 09:32:05 -0500 Subject: [PATCH 01/24] Switch from CentOS to Alma Linux (#998) Looks like the old CentOS mirrors are being decommissioned. --- ci/docker/x86_64-linux/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/docker/x86_64-linux/Dockerfile b/ci/docker/x86_64-linux/Dockerfile index 89ddc2b2..7b4ac6b2 100644 --- a/ci/docker/x86_64-linux/Dockerfile +++ b/ci/docker/x86_64-linux/Dockerfile @@ -1,5 +1,5 @@ -FROM centos:7 +FROM almalinux:8 -RUN yum install -y git gcc +RUN dnf install -y git gcc ENV PATH=$PATH:/rust/bin From 7af0f81263c7dd3a6d143a06de8fbcff04a38b2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=8BAndrzej=20Ressel?= Date: Mon, 8 Jul 2024 17:08:59 +0200 Subject: [PATCH 02/24] Remove unnecessary cast in cabi_dealloc (#991) --- crates/rust/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/rust/src/lib.rs b/crates/rust/src/lib.rs index 6ef7674b..108b2f63 100644 --- a/crates/rust/src/lib.rs +++ b/crates/rust/src/lib.rs @@ -386,7 +386,7 @@ pub unsafe fn cabi_dealloc(ptr: *mut u8, size: usize, align: usize) { return; } let layout = alloc::Layout::from_size_align_unchecked(size, align); - alloc::dealloc(ptr as *mut u8, layout); + alloc::dealloc(ptr, layout); } ", ); From ac20b253f38c57dd81bbdcaa8217219219af1b01 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Mon, 8 Jul 2024 10:34:47 -0600 Subject: [PATCH 03/24] Revert "temporarily remove C# `variants` runtime test (#963)" (#993) * Revert "temporarily remove C# `variants` runtime test (#963)" This reverts commit 3ca773953a74dfbc907784072726fd541eba1f2b. As of https://github.com/dotnet/runtimelab/pull/2609, the "return pointer not aligned" issue which forced us to remove the C# `variants` runtime test case _should_ be resolved. :crossed_fingers: Signed-off-by: Joel Dice * update C# variants test to match latest code generator Signed-off-by: Joel Dice --------- Signed-off-by: Joel Dice --- tests/runtime/variants/wasm.cs | 123 +++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 tests/runtime/variants/wasm.cs diff --git a/tests/runtime/variants/wasm.cs b/tests/runtime/variants/wasm.cs new file mode 100644 index 00000000..66235c76 --- /dev/null +++ b/tests/runtime/variants/wasm.cs @@ -0,0 +1,123 @@ +using System; +using System.Runtime.InteropServices; +using System.Diagnostics; +using VariantsWorld.wit.imports.test.variants; + +namespace VariantsWorld +{ + + public class VariantsWorldImpl : IVariantsWorld + { + public static void TestImports() + { + Debug.Assert(TestInterop.RoundtripOption(1.0f).Value == 1); + Debug.Assert(TestInterop.RoundtripOption(null).HasValue == false); + Debug.Assert(TestInterop.RoundtripOption(2.0f).Value == 2); + + Debug.Assert(TestInterop.RoundtripResult(Result.ok(2)) == 2.0); + Debug.Assert(TestInterop.RoundtripResult(Result.ok(4)) == 4.0); + try { + TestInterop.RoundtripResult(Result.err(5.3f)); + throw new Exception(); + } catch (WitException e) { + Debug.Assert((byte)e.Value == 5); + } + + Debug.Assert(TestInterop.RoundtripEnum(ITest.E1.A) == ITest.E1.A); + Debug.Assert(TestInterop.RoundtripEnum(ITest.E1.B) == ITest.E1.B); + + Debug.Assert(TestInterop.InvertBool(true) == false); + Debug.Assert(TestInterop.InvertBool(false) == true); + + var (a1, a2, a3, a4, a5, a6) = + TestInterop.VariantCasts((ITest.C1.a(1), ITest.C2.a(2), ITest.C3.a(3), ITest.C4.a(4), ITest.C5.a(5), ITest.C6.a(6.0f))); + Debug.Assert(a1.AsA == 1); + Debug.Assert(a2.AsA == 2); + Debug.Assert(a3.AsA == 3); + Debug.Assert(a4.AsA == 4); + Debug.Assert(a5.AsA == 5); + Debug.Assert(a6.AsA == 6.0f); + + var (b1, b2, b3, b4, b5, b6) = +TestInterop.VariantCasts((ITest.C1.b(1), ITest.C2.b(2), ITest.C3.b(3), ITest.C4.b(4), ITest.C5.b(5), ITest.C6.b(6.0))); + Debug.Assert(b1.AsB == 1); + Debug.Assert(b2.AsB == 2.0f); + Debug.Assert(b3.AsB == 3.0f); + Debug.Assert(b4.AsB == 4.0f); + Debug.Assert(b5.AsB == 5.0f); + Debug.Assert(b6.AsB == 6.0); + + var (za1, za2, za3, za4) = +TestInterop.VariantZeros((ITest.Z1.a(1), ITest.Z2.a(2), ITest.Z3.a(3.0f), ITest.Z4.a(4.0f))); + Debug.Assert(za1.AsA == 1); + Debug.Assert(za2.AsA == 2); + Debug.Assert(za3.AsA == 3.0f); + Debug.Assert(za4.AsA == 4.0f); + + var (zb1, zb2, zb3, zb4) = +TestInterop.VariantZeros((ITest.Z1.b(), ITest.Z2.b(), ITest.Z3.b(), ITest.Z4.b())); + //TODO: Add comparison operator to variants and None + //Debug.Assert(zb1.AsB == ITest.Z1.b()); + //Debug.Assert(zb2.AsB == ITest.Z2.b()); + //Debug.Assert(zb3.AsB == ITest.Z3.b()); + //Debug.Assert(zb4.AsB == ITest.Z4.b()); + + TestInterop.VariantTypedefs(null, false, Result.err(new None())); + + var (a, b, c) = TestInterop.VariantEnums(true, Result.ok(new None()), ITest.MyErrno.SUCCESS); + Debug.Assert(a == false); + var test = b.AsErr; + Debug.Assert(c == ITest.MyErrno.A); + } + } +} + +namespace VariantsWorld.wit.exports.test.variants +{ + public class TestImpl : ITest + { + public static byte? RoundtripOption(float? a) + { + return a is null ? null : (byte)a; + } + + public static double RoundtripResult(Result a) + { + switch (a.Tag) + { + case Result.OK: return (double)a.AsOk; + case Result.ERR: throw new WitException((byte)a.AsErr, 0); + default: throw new ArgumentException(); + } + } + + public static ITest.E1 RoundtripEnum(ITest.E1 a) + { + return a; + } + + public static bool InvertBool(bool a) + { + return !a; + } + + public static (ITest.C1, ITest.C2, ITest.C3, ITest.C4, ITest.C5, ITest.C6) + VariantCasts((ITest.C1, ITest.C2, ITest.C3, ITest.C4, ITest.C5, ITest.C6) a) + { + return a; + } + + public static (bool, Result, ITest.MyErrno) + VariantEnums(bool a, Result b, ITest.MyErrno c) + { + return new(a, b, c); + } + + public static void VariantTypedefs(uint? a, bool b, Result c) { } + + public static (ITest.Z1, ITest.Z2, ITest.Z3, ITest.Z4) VariantZeros((ITest.Z1, ITest.Z2, ITest.Z3, ITest.Z4) a) + { + return a; + } + } +} From 0bc43bd13820980383f8dde4b4b09372cdce0a66 Mon Sep 17 00:00:00 2001 From: primoly <168267431+primoly@users.noreply.github.com> Date: Mon, 8 Jul 2024 19:15:55 +0200 Subject: [PATCH 04/24] Update abi.rs (#997) --- crates/core/src/abi.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/core/src/abi.rs b/crates/core/src/abi.rs index 6d6a816b..d696b459 100644 --- a/crates/core/src/abi.rs +++ b/crates/core/src/abi.rs @@ -1806,16 +1806,17 @@ impl<'a, B: Bindgen> Generator<'a, B> { TypeDefKind::Type(t) => self.deallocate(t, addr, offset), TypeDefKind::List(element) => { + self.stack.push(addr.clone()); + self.emit(&Instruction::PointerLoad { offset }); + self.stack.push(addr); + self.emit(&Instruction::LengthLoad { offset: offset + 4 }); + self.push_block(); self.emit(&IterBasePointer); let elemaddr = self.stack.pop().unwrap(); self.deallocate(element, elemaddr, 0); self.finish_block(0); - self.stack.push(addr.clone()); - self.emit(&Instruction::PointerLoad { offset }); - self.stack.push(addr); - self.emit(&Instruction::LengthLoad { offset: offset + 4 }); self.emit(&Instruction::GuestDeallocateList { element }); } From 8ff0e1769dcd0a200cd235df9d7051cc377bebda Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 9 Jul 2024 10:10:22 -0500 Subject: [PATCH 05/24] Relicense this repository (#1000) * Relicense this repository This commit relicenses this repository from Apache-2.0 WITH LLVM-exception to Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT in accordance with #987. All contributors have signed off in #987 and the license metadata and such here match the `wasi-rs` repository in the bytecodealliance organization as well. Thank you again everyone for your help here! Closes #987 * Adjust some CI scripts * Fix cabi_realloc script * Fix publish script * Update license blurb in readme --- Cargo.toml | 8 +- LICENSE-APACHE | 201 ++++++++++++++++++ ... => LICENSE-Apache-2.0_WITH_LLVM-exception | 0 LICENSE-MIT | 23 ++ README.md | 13 +- ci/build-tarballs.sh | 2 +- ci/print-current-version.sh | 2 +- ci/publish.rs | 5 +- ci/rebuild-libcabi-realloc.sh | 2 +- crates/c/Cargo.toml | 8 +- crates/core/Cargo.toml | 8 +- crates/csharp/Cargo.toml | 8 +- crates/go/Cargo.toml | 8 +- crates/guest-rust/Cargo.toml | 8 +- crates/guest-rust/macro/Cargo.toml | 8 +- crates/guest-rust/rt/Cargo.toml | 8 +- crates/markdown/Cargo.toml | 8 +- crates/rust/Cargo.toml | 8 +- crates/teavm-java/Cargo.toml | 8 +- 19 files changed, 286 insertions(+), 50 deletions(-) create mode 100644 LICENSE-APACHE rename LICENSE => LICENSE-Apache-2.0_WITH_LLVM-exception (100%) create mode 100644 LICENSE-MIT diff --git a/Cargo.toml b/Cargo.toml index e6b244f6..c1f379f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "wit-bindgen-cli" authors = ["Alex Crichton "] -version.workspace = true +version = { workspace = true } edition = { workspace = true } -repository = 'https://github.com/bytecodealliance/wit-bindgen' -license = "Apache-2.0 WITH LLVM-exception" +repository = { workspace = true } +license = { workspace = true } homepage = 'https://github.com/bytecodealliance/wit-bindgen' description = """ CLI tool to generate bindings for WIT documents and the component model. @@ -19,6 +19,8 @@ resolver = "2" [workspace.package] edition = "2021" version = "0.27.0" +license = "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT" +repository = "https://github.com/bytecodealliance/wasi-rs" [workspace.dependencies] anyhow = "1.0.72" diff --git a/LICENSE-APACHE b/LICENSE-APACHE new file mode 100644 index 00000000..16fe87b0 --- /dev/null +++ b/LICENSE-APACHE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/LICENSE b/LICENSE-Apache-2.0_WITH_LLVM-exception similarity index 100% rename from LICENSE rename to LICENSE-Apache-2.0_WITH_LLVM-exception diff --git a/LICENSE-MIT b/LICENSE-MIT new file mode 100644 index 00000000..31aa7938 --- /dev/null +++ b/LICENSE-MIT @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index b5bd44c2..3adffb2b 100644 --- a/README.md +++ b/README.md @@ -489,11 +489,18 @@ That should be it, but be sure to keep an eye on CI in case anything goes wrong. # License -This project is licensed under the Apache 2.0 license with the LLVM exception. -See [LICENSE](LICENSE) for more details. +This project is triple licenced under the Apache 2/ Apache 2 with LLVM exceptions/ MIT licences. The reasoning for this is: +- Apache 2/ MIT is common in the rust ecosystem. +- Apache 2/ MIT is used in the rust standard library, and some of this code may be migrated there. +- Some of this code may be used in compiler output, and the Apache 2 with LLVM exceptions licence is useful for this. + +For more details see +- [Apache 2 Licence](LICENSE-APACHE) +- [Apache 2 Licence with LLVM exceptions](LICENSE-Apache-2.0_WITH_LLVM-exception) +- [MIT Licence](LICENSE-MIT) ### Contribution Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in this project by you, as defined in the Apache-2.0 license, +for inclusion in this project by you, as defined in the Apache 2/ Apache 2 with LLVM exceptions/ MIT licenses, shall be licensed as above, without any additional terms or conditions. diff --git a/ci/build-tarballs.sh b/ci/build-tarballs.sh index c2892eda..8b6c559d 100755 --- a/ci/build-tarballs.sh +++ b/ci/build-tarballs.sh @@ -13,7 +13,7 @@ tag=$(./ci/print-current-version.sh) bin_pkgname=wit-bindgen-$tag-$platform mkdir tmp/$bin_pkgname -cp LICENSE README.md tmp/$bin_pkgname +cp LICENSE-* README.md tmp/$bin_pkgname fmt=tar if [ "$platform" = "x86_64-windows" ]; then diff --git a/ci/print-current-version.sh b/ci/print-current-version.sh index 348b8ce5..66fb3c60 100755 --- a/ci/print-current-version.sh +++ b/ci/print-current-version.sh @@ -1,2 +1,2 @@ #!/bin/sh -grep '^version =' Cargo.toml | head -n 1 | sed 's/.*"\(.*\)"/\1/' +grep '^version = "' Cargo.toml | head -n 1 | sed 's/.*"\(.*\)"/\1/' diff --git a/ci/publish.rs b/ci/publish.rs index 337ae57a..e60d7a13 100644 --- a/ci/publish.rs +++ b/ci/publish.rs @@ -157,7 +157,10 @@ fn read_crate(ws: Option<&Workspace>, manifest: &Path) -> Crate { ); } if let Some(ws) = ws { - if version.is_none() && line.starts_with("version.workspace = true") { + if version.is_none() + && line.starts_with("version =") + && line.contains("workspace = true") + { version = Some(ws.version.clone()); } } diff --git a/ci/rebuild-libcabi-realloc.sh b/ci/rebuild-libcabi-realloc.sh index 0ed979a7..7686ed4e 100755 --- a/ci/rebuild-libcabi-realloc.sh +++ b/ci/rebuild-libcabi-realloc.sh @@ -39,7 +39,7 @@ set -ex -version=$(grep '^version =' ./Cargo.toml | sed 's/.*"\(.*\)"/\1/' | sed 's/\./_/g') +version=$(./ci/print-current-version.sh | sed 's/\./_/g') sym=cabi_realloc_wit_bindgen_$version diff --git a/crates/c/Cargo.toml b/crates/c/Cargo.toml index 285e15eb..cbf7cdc9 100644 --- a/crates/c/Cargo.toml +++ b/crates/c/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "wit-bindgen-c" authors = ["Alex Crichton "] -version.workspace = true -edition.workspace = true -repository = 'https://github.com/bytecodealliance/wit-bindgen' -license = "Apache-2.0 WITH LLVM-exception" +version = { workspace = true } +edition = { workspace = true } +repository = { workspace = true } +license = { workspace = true } homepage = 'https://github.com/bytecodealliance/wit-bindgen' description = """ C bindings generator for WIT and the component model, typically used through the diff --git a/crates/core/Cargo.toml b/crates/core/Cargo.toml index 209f2be2..60935ef8 100644 --- a/crates/core/Cargo.toml +++ b/crates/core/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "wit-bindgen-core" authors = ["Alex Crichton "] -version.workspace = true -edition.workspace = true -repository = 'https://github.com/bytecodealliance/wit-bindgen' -license = "Apache-2.0 WITH LLVM-exception" +version = { workspace = true } +edition = { workspace = true } +repository = { workspace = true } +license = { workspace = true } homepage = 'https://github.com/bytecodealliance/wit-bindgen' description = """ Low-level support for bindings generation based on WIT files for use with diff --git a/crates/csharp/Cargo.toml b/crates/csharp/Cargo.toml index b4b41700..918c8fa6 100644 --- a/crates/csharp/Cargo.toml +++ b/crates/csharp/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "wit-bindgen-csharp" authors = ["Timmy Silesmo "] -version.workspace = true -edition.workspace = true -repository = 'https://github.com/bytecodealliance/wit-bindgen' -license = "Apache-2.0 WITH LLVM-exception" +version = { workspace = true } +edition = { workspace = true } +repository = { workspace = true } +license = { workspace = true } homepage = 'https://github.com/bytecodealliance/wit-bindgen' description = """ C# bindings generator for WIT and the component model, typically used diff --git a/crates/go/Cargo.toml b/crates/go/Cargo.toml index effc681c..88e1e80f 100644 --- a/crates/go/Cargo.toml +++ b/crates/go/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "wit-bindgen-go" authors = ["Mossaka "] -version.workspace = true -edition.workspace = true -repository = 'https://github.com/bytecodealliance/wit-bindgen' -license = "Apache-2.0 WITH LLVM-exception" +version = { workspace = true } +edition = { workspace = true } +repository = { workspace = true } +license = { workspace = true } homepage = 'https://github.com/bytecodealliance/wit-bindgen' description = """ TinyGo/Go bindings generator for WIT and the component model, typically used diff --git a/crates/guest-rust/Cargo.toml b/crates/guest-rust/Cargo.toml index 58e11389..bc931b92 100644 --- a/crates/guest-rust/Cargo.toml +++ b/crates/guest-rust/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "wit-bindgen" authors = ["Alex Crichton "] -version.workspace = true -edition.workspace = true -repository = 'https://github.com/bytecodealliance/wit-bindgen' -license = "Apache-2.0 WITH LLVM-exception" +version = { workspace = true } +edition = { workspace = true } +repository = { workspace = true } +license = { workspace = true } homepage = 'https://github.com/bytecodealliance/wit-bindgen' description = """ Rust bindings generator and runtime support for WIT and the component model. diff --git a/crates/guest-rust/macro/Cargo.toml b/crates/guest-rust/macro/Cargo.toml index 5d56c3c8..984a1bff 100644 --- a/crates/guest-rust/macro/Cargo.toml +++ b/crates/guest-rust/macro/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "wit-bindgen-rust-macro" authors = ["Alex Crichton "] -version.workspace = true -edition.workspace = true -repository = 'https://github.com/bytecodealliance/wit-bindgen' -license = "Apache-2.0 WITH LLVM-exception" +version = { workspace = true } +edition = { workspace = true } +repository = { workspace = true } +license = { workspace = true } homepage = 'https://github.com/bytecodealliance/wit-bindgen' description = """ Procedural macro paired with the `wit-bindgen` crate. diff --git a/crates/guest-rust/rt/Cargo.toml b/crates/guest-rust/rt/Cargo.toml index b457ffee..d038f3fc 100644 --- a/crates/guest-rust/rt/Cargo.toml +++ b/crates/guest-rust/rt/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "wit-bindgen-rt" -version.workspace = true -edition.workspace = true -repository = 'https://github.com/bytecodealliance/wit-bindgen' -license = "Apache-2.0 WITH LLVM-exception" +version = { workspace = true } +edition = { workspace = true } +repository = { workspace = true } +license = { workspace = true } homepage = 'https://github.com/bytecodealliance/wit-bindgen' description = """ Runtime support for the `wit-bindgen` crate diff --git a/crates/markdown/Cargo.toml b/crates/markdown/Cargo.toml index fb09d5f4..057eb8fd 100644 --- a/crates/markdown/Cargo.toml +++ b/crates/markdown/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "wit-bindgen-markdown" -version.workspace = true -edition.workspace = true -repository = 'https://github.com/bytecodealliance/wit-bindgen' -license = "Apache-2.0 WITH LLVM-exception" +version = { workspace = true } +edition = { workspace = true } +repository = { workspace = true } +license = { workspace = true } homepage = 'https://github.com/bytecodealliance/wit-bindgen' description = """ Markdown generator for WIT and the component model, typically used diff --git a/crates/rust/Cargo.toml b/crates/rust/Cargo.toml index 82925a3b..1fe1d3bc 100644 --- a/crates/rust/Cargo.toml +++ b/crates/rust/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "wit-bindgen-rust" authors = ["Alex Crichton "] -version.workspace = true -edition.workspace = true -repository = 'https://github.com/bytecodealliance/wit-bindgen' -license = "Apache-2.0 WITH LLVM-exception" +version = { workspace = true } +edition = { workspace = true } +repository = { workspace = true } +license = { workspace = true } homepage = 'https://github.com/bytecodealliance/wit-bindgen' description = """ Rust bindings generator for WIT and the component model, typically used through diff --git a/crates/teavm-java/Cargo.toml b/crates/teavm-java/Cargo.toml index 9ecc5c27..f14d5de2 100644 --- a/crates/teavm-java/Cargo.toml +++ b/crates/teavm-java/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "wit-bindgen-teavm-java" -version.workspace = true -edition.workspace = true -repository = 'https://github.com/bytecodealliance/wit-bindgen' -license = "Apache-2.0 WITH LLVM-exception" +version = { workspace = true } +edition = { workspace = true } +repository = { workspace = true } +license = { workspace = true } homepage = 'https://github.com/bytecodealliance/wit-bindgen' description = """ TeaVM-Java bindings generator for WIT and the component model, typically used From 7d82e7ef6a32b6189da0c1384d8799dbf6ba93c6 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 11 Jul 2024 14:20:24 -0500 Subject: [PATCH 06/24] Fix parsing of `--with` on the CLI (#999) This commit fixes the `--with` option in the Rust generate from changes in #972. Notably the fixes here are: * The `--with` option is no longer required. * Multiple `--with` options are now accepted again. * A new `--generate-all` option was added. * The `generate_all` macro option was documented. * Error messages on the CLI and the macro now mention all the variants of how to fix the error. Closes #995 --- crates/guest-rust/macro/src/lib.rs | 19 ++++++- crates/guest-rust/src/lib.rs | 4 ++ crates/rust/src/lib.rs | 89 +++++++++++++----------------- crates/rust/tests/codegen.rs | 43 +++++++++++++++ src/bin/wit-bindgen.rs | 15 ++++- 5 files changed, 114 insertions(+), 56 deletions(-) diff --git a/crates/guest-rust/macro/src/lib.rs b/crates/guest-rust/macro/src/lib.rs index 24e7fdf4..56e36ac6 100644 --- a/crates/guest-rust/macro/src/lib.rs +++ b/crates/guest-rust/macro/src/lib.rs @@ -18,6 +18,7 @@ pub fn generate(input: proc_macro::TokenStream) -> proc_macro::TokenStream { } fn anyhow_to_syn(span: Span, err: anyhow::Error) -> Error { + let err = attach_with_context(err); let mut msg = err.to_string(); for cause in err.chain().skip(1) { msg.push_str(&format!("\n\nCaused by:\n {cause}")); @@ -25,6 +26,20 @@ fn anyhow_to_syn(span: Span, err: anyhow::Error) -> Error { Error::new(span, msg) } +fn attach_with_context(err: anyhow::Error) -> anyhow::Error { + if let Some(e) = err.downcast_ref::() { + let option = e.0.clone(); + return err.context(format!( + "missing one of:\n\ + * `generate_all` option\n\ + * `with: {{ \"{option}\": path::to::bindings, }}`\n\ + * `with: {{ \"{option}\": generate, }}`\ + " + )); + } + err +} + struct Config { opts: Opts, resolve: Resolve, @@ -100,7 +115,7 @@ impl Parse for Config { } Opt::With(with) => opts.with.extend(with), Opt::GenerateAll => { - opts.with.generate_by_default = true; + opts.generate_all = true; } Opt::TypeSectionSuffix(suffix) => { opts.type_section_suffix = Some(suffix.value()); @@ -186,7 +201,7 @@ impl Config { let mut generator = self.opts.build(); generator .generate(&self.resolve, self.world, &mut files) - .map_err(|e| Error::new(Span::call_site(), e))?; + .map_err(|e| anyhow_to_syn(Span::call_site(), e))?; let (_, src) = files.iter().next().unwrap(); let mut src = std::str::from_utf8(src).unwrap().to_string(); diff --git a/crates/guest-rust/src/lib.rs b/crates/guest-rust/src/lib.rs index a9770f0b..240f31bf 100644 --- a/crates/guest-rust/src/lib.rs +++ b/crates/guest-rust/src/lib.rs @@ -694,6 +694,10 @@ /// "some:package/my-interface": generate, /// }, /// +/// // Indicates that all interfaces not present in `with` should be assumed +/// // to be marked with `generate`. +/// generate_all, +/// /// // An optional list of function names to skip generating bindings for. /// // This is only applicable to imports and the name specified is the name /// // of the function. diff --git a/crates/rust/src/lib.rs b/crates/rust/src/lib.rs index 108b2f63..de76c75e 100644 --- a/crates/rust/src/lib.rs +++ b/crates/rust/src/lib.rs @@ -105,6 +105,18 @@ pub enum ExportKey { Name(String), } +#[cfg(feature = "clap")] +fn parse_with(s: &str) -> Result<(String, WithOption), String> { + let (k, v) = s.split_once('=').ok_or_else(|| { + format!("expected string of form `=[,=...]`; got `{s}`") + })?; + let v = match v { + "generate" => WithOption::Generate, + other => WithOption::Path(other.to_string()), + }; + Ok((k.to_string(), v)) +} + #[derive(Default, Debug, Clone)] #[cfg_attr(feature = "clap", derive(clap::Args))] pub struct Opts { @@ -179,8 +191,13 @@ pub struct Opts { /// Argument must be of the form `k=v` and this option can be passed /// multiple times or one option can be comma separated, for example /// `k1=v1,k2=v2`. - #[cfg_attr(feature = "clap", arg(long, value_parser = clap::value_parser!(WithGeneration), value_delimiter = ','))] - pub with: WithGeneration, + #[cfg_attr(feature = "clap", arg(long, value_parser = parse_with, value_delimiter = ','))] + pub with: Vec<(String, WithOption)>, + + /// Indicates that all interfaces not specified in `with` should be + /// generated. + #[cfg_attr(feature = "clap", arg(long))] + pub generate_all: bool, /// Add the specified suffix to the name of the custome section containing /// the component type. @@ -307,10 +324,7 @@ impl RustWasm { ) -> Result { let with_name = resolve.name_world_key(name); let Some(remapping) = self.with.get(&with_name) else { - bail!("no remapping found for {with_name:?} - use the `generate!` macro's `with` option to force the interface to be generated or specify where it is already defined: -``` -with: {{\n\t{with_name:?}: generate\n}} -```") + bail!(MissingWith(with_name)); }; self.generated_interfaces.insert(with_name); let entry = match remapping { @@ -872,7 +886,7 @@ impl WorldGenerator for RustWasm { for (k, v) in self.opts.with.iter() { self.with.insert(k.clone(), v.clone().into()); } - self.with.generate_by_default = self.opts.with.generate_by_default; + self.with.generate_by_default = self.opts.generate_all; } fn import_interface( @@ -1192,51 +1206,6 @@ impl fmt::Display for Ownership { } } -/// Configuration for how interfaces are generated. -#[derive(Debug, Clone, Default)] -pub struct WithGeneration { - /// How interface should be generated - with: HashMap, - /// Whether to generate interfaces not present in the `with` map - pub generate_by_default: bool, -} - -impl WithGeneration { - fn iter(&self) -> impl Iterator { - self.with.iter() - } - - pub fn extend(&mut self, with: HashMap) { - self.with.extend(with); - } -} - -impl FromStr for WithGeneration { - type Err = String; - - fn from_str(s: &str) -> std::prelude::v1::Result { - let with = s - .trim() - .split(',') - .map(|s| { - let (k, v) = s.trim().split_once('=').ok_or_else(|| { - format!("expected string of form `=[,=...]`; got `{s}`") - })?; - let k = k.trim().to_string(); - let v = match v.trim() { - "generate" => WithOption::Generate, - v => WithOption::Path(v.to_string()), - }; - Ok((k, v)) - }) - .collect::, Self::Err>>()?; - Ok(WithGeneration { - with, - generate_by_default: false, - }) - } -} - /// Options for with "with" remappings. #[derive(Debug, Clone)] pub enum WithOption { @@ -1462,3 +1431,19 @@ impl fmt::Display for RustFlagsRepr { } } } + +#[derive(Debug, Clone)] +pub struct MissingWith(pub String); + +impl fmt::Display for MissingWith { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "missing `with` mapping for the key `{}`", self.0) + } +} + +impl std::error::Error for MissingWith {} + +// bail!("no remapping found for {with_name:?} - use the `generate!` macro's `with` option to force the interface to be generated or specify where it is already defined: +// ``` +// with: {{\n\t{with_name:?}: generate\n}} +// ```") diff --git a/crates/rust/tests/codegen.rs b/crates/rust/tests/codegen.rs index 6e6919a9..f1ec1ffb 100644 --- a/crates/rust/tests/codegen.rs +++ b/crates/rust/tests/codegen.rs @@ -513,3 +513,46 @@ mod gated_features { z(); } } + +#[allow(unused)] +mod simple_with_option { + mod a { + wit_bindgen::generate!({ + inline: r#" + package foo:bar { + interface a { + x: func(); + } + } + + package foo:baz { + world w { + import foo:bar/a; + } + } + "#, + world: "foo:baz/w", + generate_all, + }); + } + + mod b { + wit_bindgen::generate!({ + inline: r#" + package foo:bar { + interface a { + x: func(); + } + } + + package foo:baz { + world w { + import foo:bar/a; + } + } + "#, + world: "foo:baz/w", + with: { "foo:bar/a": generate }, + }); + } +} diff --git a/src/bin/wit-bindgen.rs b/src/bin/wit-bindgen.rs index 7abcc067..7e3c7442 100644 --- a/src/bin/wit-bindgen.rs +++ b/src/bin/wit-bindgen.rs @@ -1,4 +1,4 @@ -use anyhow::{bail, Context, Result}; +use anyhow::{bail, Context, Error, Result}; use clap::Parser; use std::path::PathBuf; use std::str; @@ -123,7 +123,7 @@ fn main() -> Result<()> { Opt::CSharp { opts, args } => (opts.build(), args), }; - gen_world(generator, &opt, &mut files)?; + gen_world(generator, &opt, &mut files).map_err(attach_with_context)?; for (name, contents) in files.iter() { let dst = match &opt.out_dir { @@ -166,6 +166,17 @@ fn main() -> Result<()> { Ok(()) } +fn attach_with_context(err: Error) -> Error { + #[cfg(feature = "rust")] + if let Some(e) = err.downcast_ref::() { + let option = e.0.clone(); + return err.context(format!( + "missing either `--generate-all` or `--with {option}=(...|generate)`" + )); + } + err +} + fn gen_world( mut generator: Box, opts: &Common, From 1ff125d5d61caecfdb8810256a23d487a58059a1 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 12 Jul 2024 13:22:39 -0500 Subject: [PATCH 07/24] Update wasm-tools dependencies (#1001) --- Cargo.lock | 561 +++++++++++++++++++++++++++-------------------------- Cargo.toml | 10 +- 2 files changed, 288 insertions(+), 283 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0da1d9ac..890f4efe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,7 +8,16 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli", + "gimli 0.28.1", +] + +[[package]] +name = "addr2line" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +dependencies = [ + "gimli 0.29.0", ] [[package]] @@ -46,47 +55,48 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.13" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -94,9 +104,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.81" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "arbitrary" @@ -106,9 +116,9 @@ checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" [[package]] name = "async-trait" -version = "0.1.78" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "461abc97219de0eaaf81fe3ef974a540158f3d079c2ab200f891f1a2ef201e85" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", @@ -117,22 +127,22 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ - "addr2line", + "addr2line 0.22.0", "cc", "cfg-if", "libc", "miniz_oxide", - "object 0.32.2", + "object", "rustc-demangle", ] @@ -144,15 +154,9 @@ checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "bitflags" -version = "1.3.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "block-buffer" @@ -165,9 +169,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.4" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byteorder" @@ -177,15 +181,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "cap-fs-ext" -version = "3.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "769f8cd02eb04d57f14e2e371ebb533f96817f9b2525d73a5c72b61ca7973747" +checksum = "eb23061fc1c4ead4e45ca713080fe768e6234e959f5a5c399c39eb41aa34e56e" dependencies = [ "cap-primitives", "cap-std", @@ -195,9 +199,9 @@ dependencies = [ [[package]] name = "cap-net-ext" -version = "3.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ff6d3fb274292a9af283417e383afe6ded1fe66f6472d2c781216d3d80c218" +checksum = "f83ae11f116bcbafc5327c6af250341db96b5930046732e1905f7dc65887e0e1" dependencies = [ "cap-primitives", "cap-std", @@ -207,9 +211,9 @@ dependencies = [ [[package]] name = "cap-primitives" -version = "3.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90a0b44fc796b1a84535a63753d50ba3972c4db55c7255c186f79140e63d56d0" +checksum = "6d00bd8d26c4270d950eaaa837387964a2089a1c3c349a690a1fa03221d29531" dependencies = [ "ambient-authority", "fs-set-times", @@ -224,9 +228,9 @@ dependencies = [ [[package]] name = "cap-rand" -version = "3.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4327f08daac33a99bb03c54ae18c8f32c3ba31c728a33ddf683c6c6a5043de68" +checksum = "dbcb16a619d8b8211ed61f42bd290d2a1ac71277a69cf8417ec0996fa92f5211" dependencies = [ "ambient-authority", "rand", @@ -234,9 +238,9 @@ dependencies = [ [[package]] name = "cap-std" -version = "3.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266626ce180cf9709f317d0bf9754e3a5006359d87f4bf792f06c9c5f1b63c0f" +checksum = "19eb8e3d71996828751c1ed3908a439639752ac6bdc874e41469ef7fc15fbd7f" dependencies = [ "cap-primitives", "io-extras", @@ -246,9 +250,9 @@ dependencies = [ [[package]] name = "cap-time-ext" -version = "3.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1353421ba83c19da60726e35db0a89abef984b3be183ff6f58c5b8084fcd0c5" +checksum = "61142dc51e25b7acc970ca578ce2c3695eac22bbba46c1073f5f583e78957725" dependencies = [ "ambient-authority", "cap-primitives", @@ -260,12 +264,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.90" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +checksum = "eaff6f8ce506b9773fa786672d63fc7a191ffea1be33f72bbd4aeacefca9ffc8" dependencies = [ "jobserver", "libc", + "once_cell", ] [[package]] @@ -276,9 +281,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.5.3" +version = "4.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "949626d00e063efc93b6dca932419ceb5432f99769911c0b995f7e884c778813" +checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" dependencies = [ "clap_builder", "clap_derive", @@ -286,9 +291,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" dependencies = [ "anstream", "anstyle", @@ -298,9 +303,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.3" +version = "4.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90239a040c80f5e14809ca132ddc4176ab33d5e17e49691793296e3fcb34d72f" +checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -310,9 +315,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" [[package]] name = "cobs" @@ -330,9 +335,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" [[package]] name = "core-foundation-sys" @@ -380,8 +385,8 @@ dependencies = [ "cranelift-control", "cranelift-entity", "cranelift-isle", - "gimli", - "hashbrown 0.14.3", + "gimli 0.28.1", + "hashbrown 0.14.5", "log", "regalloc2", "rustc-hash", @@ -470,9 +475,9 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] @@ -498,9 +503,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crypto-common" @@ -574,9 +579,9 @@ dependencies = [ [[package]] name = "either" -version = "1.10.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "embedded-io" @@ -586,9 +591,9 @@ checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] @@ -601,9 +606,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -722,7 +727,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27d12c0aed7f1e24276a241aadc4cb8ea9f83000f34bc062b7cc2d51e3b0fabd" dependencies = [ - "bitflags 2.5.0", + "bitflags", "debugid", "fxhash", "serde", @@ -741,9 +746,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -761,6 +766,12 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" + [[package]] name = "hashbrown" version = "0.13.2" @@ -772,9 +783,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", "serde", @@ -839,20 +850,20 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.5" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "serde", ] [[package]] name = "io-extras" -version = "0.18.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c301e73fb90e8a29e600a9f402d095765f74310d582916a952f618836a1bd1ed" +checksum = "c9f046b9af244f13b3bd939f55d16830ac3a201e8a9ba9661bfcb03e2be72b9b" dependencies = [ "io-lifetimes", "windows-sys 0.52.0", @@ -870,6 +881,12 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + [[package]] name = "itertools" version = "0.12.1" @@ -881,9 +898,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "ittapi" @@ -907,9 +924,9 @@ dependencies = [ [[package]] name = "jobserver" -version = "0.1.28" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" dependencies = [ "libc", ] @@ -931,9 +948,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libm" @@ -943,26 +960,25 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libredox" -version = "0.0.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.5.0", + "bitflags", "libc", - "redox_syscall", ] [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "mach2" @@ -981,9 +997,9 @@ checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4" [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memfd" @@ -996,18 +1012,18 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" dependencies = [ "autocfg", ] [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] @@ -1035,21 +1051,12 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" -dependencies = [ - "memchr", -] - -[[package]] -name = "object" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "576dfe1fc8f9df304abb159d767a29d0476f7750fbf8aa7ad07816004a207434" +checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" dependencies = [ "crc32fast", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "indexmap", "memchr", ] @@ -1062,9 +1069,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "percent-encoding" @@ -1074,9 +1081,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -1119,9 +1126,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.85" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -1141,16 +1148,16 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" dependencies = [ - "bitflags 2.5.0", + "bitflags", "memchr", "unicase", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -1187,9 +1194,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -1205,20 +1212,11 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_users" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ "getrandom", "libredox", @@ -1247,9 +1245,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -1259,11 +1257,11 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "0.38.32" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.5.0", + "bitflags", "errno", "itoa", "libc", @@ -1274,30 +1272,30 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.197" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", @@ -1306,9 +1304,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.114" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ "itoa", "ryu", @@ -1317,9 +1315,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" dependencies = [ "serde", ] @@ -1352,18 +1350,18 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" dependencies = [ "serde", ] [[package]] name = "socket2" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1371,9 +1369,9 @@ dependencies = [ [[package]] name = "spdx" -version = "0.10.4" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29ef1a0fa1e39ac22972c8db23ff89aea700ab96aa87114e1fb55937a631a0c9" +checksum = "47317bbaf63785b53861e1ae2d11b80d6b624211d42cb20efcd210ee6f8a14bc" dependencies = [ "smallvec", ] @@ -1392,15 +1390,15 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "strsim" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" -version = "2.0.66" +version = "2.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16" dependencies = [ "proc-macro2", "quote", @@ -1409,11 +1407,11 @@ dependencies = [ [[package]] name = "system-interface" -version = "0.27.1" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aef1f9d4c1dbdd1cb3a63be9efd2f04d8ddbc919d46112982c76818ffc2f1a7" +checksum = "b858526d22750088a9b3cf2e3c2aacebd5377f13adeec02860c30d09113010a6" dependencies = [ - "bitflags 2.5.0", + "bitflags", "cap-fs-ext", "cap-std", "fd-lock", @@ -1425,9 +1423,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.14" +version = "0.12.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" +checksum = "4873307b7c257eddcb50c9bedf158eb669578359fb28428bef438fec8e6ba7c2" [[package]] name = "test-artifacts" @@ -1438,10 +1436,10 @@ name = "test-helpers" version = "0.0.0" dependencies = [ "codegen-macro", - "wasm-encoder 0.212.0", + "wasm-encoder 0.213.0", "wit-bindgen-core", "wit-component", - "wit-parser 0.212.0", + "wit-parser 0.213.0", ] [[package]] @@ -1454,18 +1452,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", @@ -1474,9 +1472,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -1489,9 +1487,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.36.0" +version = "1.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" dependencies = [ "backtrace", "bytes", @@ -1505,9 +1503,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.12" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" dependencies = [ "serde", "serde_spanned", @@ -1517,18 +1515,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.8" +version = "0.22.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c12219811e0c1ba077867254e5ad62ee2c9c190b0d957110750ac0cda1ae96cd" +checksum = "d59a3a72298453f564e2b111fa896f8d07fabb36f51f06d7e875fc5e0b5a3ef1" dependencies = [ "indexmap", "serde", @@ -1606,9 +1604,9 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" @@ -1618,9 +1616,9 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -1629,15 +1627,15 @@ dependencies = [ [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" [[package]] name = "version_check" @@ -1716,19 +1714,19 @@ dependencies = [ [[package]] name = "wasm-encoder" -version = "0.212.0" +version = "0.213.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501940df4418b8929eb6d52f1aade1fdd15a5b86c92453cb696e3c906bd3fc33" +checksum = "850e4e6a56413a8f33567741a2388c8f6dafd841a939d945c7248671a8739dd8" dependencies = [ "leb128", - "wasmparser 0.212.0", + "wasmparser 0.213.0", ] [[package]] name = "wasm-metadata" -version = "0.212.0" +version = "0.213.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a1849fac257fd76c43268555e73d74848c8dff23975c238c2cbad61cffe5045" +checksum = "c7435c10326606a75cba79447f9ece5c9459fec0316e21061d1397838133fedb" dependencies = [ "anyhow", "indexmap", @@ -1736,8 +1734,8 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder 0.212.0", - "wasmparser 0.212.0", + "wasm-encoder 0.213.0", + "wasmparser 0.213.0", ] [[package]] @@ -1747,8 +1745,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07035cc9a9b41e62d3bb3a3815a66ab87c993c06fe1cf6b2a3f2a18499d937db" dependencies = [ "ahash", - "bitflags 2.5.0", - "hashbrown 0.14.3", + "bitflags", + "hashbrown 0.14.5", "indexmap", "semver", "serde", @@ -1756,13 +1754,13 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.212.0" +version = "0.213.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d28bc49ba1e5c5b61ffa7a2eace10820443c4b7d1c0b144109261d14570fdf8" +checksum = "e48e5a90a9e0afc2990437f5600b8de682a32b18cbaaf6f2b5db185352868b6b" dependencies = [ "ahash", - "bitflags 2.5.0", - "hashbrown 0.14.3", + "bitflags", + "hashbrown 0.14.5", "indexmap", "semver", "serde", @@ -1784,7 +1782,7 @@ version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "786d8b5e7a4d54917c5ebe555b9667337e5f93383f49bddaaeec2eba68093b45" dependencies = [ - "addr2line", + "addr2line 0.21.0", "anyhow", "async-trait", "bumpalo", @@ -1792,8 +1790,8 @@ dependencies = [ "cfg-if", "encoding_rs", "fxprof-processed-profile", - "gimli", - "hashbrown 0.14.3", + "gimli 0.28.1", + "hashbrown 0.14.5", "indexmap", "ittapi", "libc", @@ -1802,7 +1800,7 @@ dependencies = [ "mach2", "memfd", "memoffset", - "object 0.36.0", + "object", "once_cell", "paste", "postcard", @@ -1898,9 +1896,9 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli", + "gimli 0.28.1", "log", - "object 0.36.0", + "object", "target-lexicon", "thiserror", "wasmparser 0.209.1", @@ -1917,10 +1915,10 @@ dependencies = [ "anyhow", "cpp_demangle", "cranelift-entity", - "gimli", + "gimli 0.28.1", "indexmap", "log", - "object 0.36.0", + "object", "postcard", "rustc-demangle", "serde", @@ -1954,7 +1952,7 @@ version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bc54198c6720f098210a85efb3ba8c078d1de4d373cdb6778850a66ae088d11" dependencies = [ - "object 0.36.0", + "object", "once_cell", "rustix", "wasmtime-versioned-export-macros", @@ -2010,7 +2008,7 @@ checksum = "8abb1301089ed8e0b4840f539cba316a73ac382090f1b25d22d8c8eed8df49c7" dependencies = [ "anyhow", "async-trait", - "bitflags 2.5.0", + "bitflags", "bytes", "cap-fs-ext", "cap-net-ext", @@ -2041,8 +2039,8 @@ checksum = "ed4db238a0241df2d15f79ad17b3a37a27f2ea6cb885894d81b42ae107544466" dependencies = [ "anyhow", "cranelift-codegen", - "gimli", - "object 0.36.0", + "gimli 0.28.1", + "object", "target-lexicon", "wasmparser 0.209.1", "wasmtime-cranelift", @@ -2073,24 +2071,24 @@ dependencies = [ [[package]] name = "wast" -version = "212.0.0" +version = "213.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4606a05fb0aae5d11dd7d8280a640d88a63ee019360ba9be552da3d294b8d1f5" +checksum = "cd051172bc72db3567b039f710f27d6d80f358b8333088eb4c4c12dac2a4d993" dependencies = [ "bumpalo", "leb128", "memchr", "unicode-width", - "wasm-encoder 0.212.0", + "wasm-encoder 0.213.0", ] [[package]] name = "wat" -version = "1.212.0" +version = "1.213.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c74ca7f93f11a5d6eed8499f2a8daaad6e225cab0151bc25a091fff3b987532f" +checksum = "5be77619385eca699d204399d2ffc9b1dfda1df3320266773d2d664ecb06cf3e" dependencies = [ - "wast 212.0.0", + "wast 213.0.0", ] [[package]] @@ -2101,7 +2099,7 @@ checksum = "29830e5d01c182d24b94092c697aa7ab0ee97d22e78a2bf40ca91eae6ebca5c2" dependencies = [ "anyhow", "async-trait", - "bitflags 2.5.0", + "bitflags", "thiserror", "tracing", "wasmtime", @@ -2165,7 +2163,7 @@ checksum = "85c6915884e731b2db0d8cf08cb64474cb69221a161675fd3c135f91febc3daa" dependencies = [ "anyhow", "cranelift-codegen", - "gimli", + "gimli 0.28.1", "regalloc2", "smallvec", "target-lexicon", @@ -2180,7 +2178,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.6", ] [[package]] @@ -2198,7 +2196,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.6", ] [[package]] @@ -2218,17 +2216,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.4", - "windows_aarch64_msvc 0.52.4", - "windows_i686_gnu 0.52.4", - "windows_i686_msvc 0.52.4", - "windows_x86_64_gnu 0.52.4", - "windows_x86_64_gnullvm 0.52.4", - "windows_x86_64_msvc 0.52.4", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -2239,9 +2238,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -2251,9 +2250,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -2263,9 +2262,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -2275,9 +2280,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -2287,9 +2292,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -2299,9 +2304,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -2311,15 +2316,15 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.5" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" +checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" dependencies = [ "memchr", ] @@ -2330,7 +2335,7 @@ version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9643b83820c0cd246ecabe5fa454dd04ba4fa67996369466d0747472d337346" dependencies = [ - "bitflags 2.5.0", + "bitflags", "windows-sys 0.52.0", ] @@ -2350,11 +2355,11 @@ dependencies = [ "clap", "heck 0.5.0", "test-helpers", - "wasm-encoder 0.212.0", + "wasm-encoder 0.213.0", "wasm-metadata", "wit-bindgen-core", "wit-component", - "wit-parser 0.212.0", + "wit-parser 0.213.0", ] [[package]] @@ -2365,8 +2370,8 @@ dependencies = [ "clap", "heck 0.5.0", "test-artifacts", - "wasm-encoder 0.212.0", - "wasmparser 0.212.0", + "wasm-encoder 0.213.0", + "wasmparser 0.213.0", "wasmtime", "wasmtime-wasi", "wit-bindgen-c", @@ -2377,7 +2382,7 @@ dependencies = [ "wit-bindgen-rust", "wit-bindgen-teavm-java", "wit-component", - "wit-parser 0.212.0", + "wit-parser 0.213.0", ] [[package]] @@ -2386,7 +2391,7 @@ version = "0.27.0" dependencies = [ "anyhow", "heck 0.5.0", - "wit-parser 0.212.0", + "wit-parser 0.213.0", ] [[package]] @@ -2398,9 +2403,9 @@ dependencies = [ "heck 0.5.0", "indexmap", "test-helpers", - "wasm-encoder 0.212.0", + "wasm-encoder 0.213.0", "wasm-metadata", - "wasmparser 0.212.0", + "wasmparser 0.213.0", "wit-bindgen-core", "wit-component", ] @@ -2433,7 +2438,7 @@ dependencies = [ name = "wit-bindgen-rt" version = "0.27.0" dependencies = [ - "bitflags 2.5.0", + "bitflags", ] [[package]] @@ -2483,22 +2488,22 @@ dependencies = [ [[package]] name = "wit-component" -version = "0.212.0" +version = "0.213.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ed5b0f9fc3d6424787d2a49e1142bf954ae4f26ee891992c144f0cfd68c4b7f" +checksum = "b65c79d1eed332b05c5df1462561765605b6eccb65bc51b338aa70914cfc5fd1" dependencies = [ "anyhow", - "bitflags 2.5.0", + "bitflags", "indexmap", "log", "serde", "serde_derive", "serde_json", - "wasm-encoder 0.212.0", + "wasm-encoder 0.213.0", "wasm-metadata", - "wasmparser 0.212.0", + "wasmparser 0.213.0", "wat", - "wit-parser 0.212.0", + "wit-parser 0.213.0", ] [[package]] @@ -2521,9 +2526,9 @@ dependencies = [ [[package]] name = "wit-parser" -version = "0.212.0" +version = "0.213.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceeb0424aa8679f3fcf2d6e3cfa381f3d6fa6179976a2c05a6249dd2bb426716" +checksum = "b565a6b187ab01e48da8c5a83f495159bfaa72ea27e4623a0774f4b7d26bb348" dependencies = [ "anyhow", "id-arena", @@ -2534,7 +2539,7 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser 0.212.0", + "wasmparser 0.213.0", ] [[package]] @@ -2551,18 +2556,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", @@ -2571,27 +2576,27 @@ dependencies = [ [[package]] name = "zstd" -version = "0.13.0" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bffb3309596d527cfcba7dfc6ed6052f1d39dfbd7c867aa2e865e4a449c10110" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.0.0" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43747c7422e2924c11144d5229878b98180ef8b06cca4ab5af37afc8a8d8ea3e" +checksum = "fa556e971e7b568dc775c136fc9de8c779b1c2fc3a63defaafadffdbd3181afa" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" +version = "2.0.12+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +checksum = "0a4e40c320c3cb459d9a9ff6de98cff88f4751ee9275d140e2be94a2b74e4c13" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index c1f379f9..627d8ef0 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.212.0" -wasm-encoder = "0.212.0" -wasm-metadata = "0.212.0" -wit-parser = "0.212.0" -wit-component = "0.212.0" +wasmparser = "0.213.0" +wasm-encoder = "0.213.0" +wasm-metadata = "0.213.0" +wit-parser = "0.213.0" +wit-component = "0.213.0" wit-bindgen-core = { path = 'crates/core', version = '0.27.0' } wit-bindgen-c = { path = 'crates/c', version = '0.27.0' } From fa19e08a884ec62f95191319d8d296874424c736 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Mon, 15 Jul 2024 12:26:25 -0600 Subject: [PATCH 08/24] add component type WIT file to C# output (#1002) This is to avoid the need to add binary .o files (which are difficult to audit from a security perspective) to the .NET runtime repository. I will open related PRs on the `wasm-tools` and `wasm-component-ld` repos to enable the latter to accept WIT files at link (and componentization) time. Note that I've taken this opportunity to remove the cabi_realloc C file from the output, since we can rely on `wasi-libc` providing an implementation. Signed-off-by: Joel Dice --- Cargo.lock | 1 + crates/csharp/Cargo.toml | 1 + crates/csharp/src/lib.rs | 47 +++++++++++++++++++++++++++++++++++++++- 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 890f4efe..43137669 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2408,6 +2408,7 @@ dependencies = [ "wasmparser 0.213.0", "wit-bindgen-core", "wit-component", + "wit-parser 0.213.0", ] [[package]] diff --git a/crates/csharp/Cargo.toml b/crates/csharp/Cargo.toml index 918c8fa6..e2d1c16d 100644 --- a/crates/csharp/Cargo.toml +++ b/crates/csharp/Cargo.toml @@ -19,6 +19,7 @@ test = false wasm-encoder = { workspace = true } wit-bindgen-core = { workspace = true } wit-component = { workspace = true } +wit-parser = { workspace = true } wasm-metadata = { workspace = true } heck = { workspace = true } clap = { workspace = true, optional = true } diff --git a/crates/csharp/src/lib.rs b/crates/csharp/src/lib.rs index d691de50..d454505d 100644 --- a/crates/csharp/src/lib.rs +++ b/crates/csharp/src/lib.rs @@ -23,7 +23,7 @@ use wit_bindgen_core::{ }, Files, InterfaceGenerator as _, Ns, WorldGenerator, }; -use wit_component::StringEncoding; +use wit_component::{StringEncoding, WitPrinter}; mod csproj; pub use csproj::CSProject; @@ -733,6 +733,51 @@ impl WorldGenerator for CSharp { ); } + // For the time being, we generate both a .wit file and a .o file to + // represent the component type. Newer releases of the .NET runtime + // will be able to use the former, but older ones will need the + // latter. + // + // TODO: stop generating the .o file once a new-enough release is + // available for us to test using only the .wit file. + + { + // When generating a WIT file, we first round-trip through the + // binary encoding. This has the effect of flattening any + // `include`d worlds into the specified world and excluding + // unrelated worlds, ensuring the output WIT contains no extra + // information beyond what the binary representation contains. + // + // This is important because including more than one world in + // the output would make it ambigious, and since this file is + // intended to be used non-interactively at link time, the + // linker will have no additional information to resolve such + // ambiguity. + let (resolve, _) = + wit_parser::decoding::decode_world(&wit_component::metadata::encode( + &resolve, + id, + self.opts.string_encoding, + None, + )?)?; + + files.push( + &format!("{world_namespace}_component_type.wit"), + WitPrinter::default() + .emit_docs(false) + .print( + &resolve, + &resolve + .packages + .iter() + .map(|(id, _)| id) + .collect::>(), + false, + )? + .as_bytes(), + ); + } + files.push( &format!("{world_namespace}_component_type.o",), component_type_object::object(resolve, id, self.opts.string_encoding) From dd30c5ea93671fa71ac8f1d23b66ab04f5322b67 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 16 Jul 2024 15:10:28 -0500 Subject: [PATCH 09/24] Update wasm-tools crates (#1005) * Update wasm-tools crates * Remove usage of multi-return * Fix C tests * Mostly update Go tests --- Cargo.lock | 68 +++++++++++++------------- Cargo.toml | 10 ++-- tests/runtime/flavorful/wasm.c | 66 +++++++++++++------------- tests/runtime/flavorful/world.wit | 4 +- tests/runtime/lists/wasm.c | 79 +++++++++++++++---------------- tests/runtime/lists/wasm.go | 60 +++++++++++------------ tests/runtime/lists/world.wit | 10 ++-- tests/runtime/main.rs | 2 +- tests/runtime/records/wasm.c | 37 +++++++-------- tests/runtime/records/wasm.go | 15 +++--- tests/runtime/records/world.wit | 4 +- 11 files changed, 172 insertions(+), 183 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 43137669..bc3ce9fb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1436,10 +1436,10 @@ name = "test-helpers" version = "0.0.0" dependencies = [ "codegen-macro", - "wasm-encoder 0.213.0", + "wasm-encoder 0.214.0", "wit-bindgen-core", "wit-component", - "wit-parser 0.213.0", + "wit-parser 0.214.0", ] [[package]] @@ -1714,19 +1714,19 @@ dependencies = [ [[package]] name = "wasm-encoder" -version = "0.213.0" +version = "0.214.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "850e4e6a56413a8f33567741a2388c8f6dafd841a939d945c7248671a8739dd8" +checksum = "ff694f02a8d7a50b6922b197ae03883fbf18cdb2ae9fbee7b6148456f5f44041" dependencies = [ "leb128", - "wasmparser 0.213.0", + "wasmparser 0.214.0", ] [[package]] name = "wasm-metadata" -version = "0.213.0" +version = "0.214.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7435c10326606a75cba79447f9ece5c9459fec0316e21061d1397838133fedb" +checksum = "865c5bff5f7a3781b5f92ea4cfa99bb38267da097441cdb09080de1568ef3075" dependencies = [ "anyhow", "indexmap", @@ -1734,8 +1734,8 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder 0.213.0", - "wasmparser 0.213.0", + "wasm-encoder 0.214.0", + "wasmparser 0.214.0", ] [[package]] @@ -1754,9 +1754,9 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.213.0" +version = "0.214.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48e5a90a9e0afc2990437f5600b8de682a32b18cbaaf6f2b5db185352868b6b" +checksum = "5309c1090e3e84dad0d382f42064e9933fdaedb87e468cc239f0eabea73ddcb6" dependencies = [ "ahash", "bitflags", @@ -2071,24 +2071,24 @@ dependencies = [ [[package]] name = "wast" -version = "213.0.0" +version = "214.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd051172bc72db3567b039f710f27d6d80f358b8333088eb4c4c12dac2a4d993" +checksum = "694bcdb24c49c8709bd8713768b71301a11e823923eee355d530f1d8d0a7f8e9" dependencies = [ "bumpalo", "leb128", "memchr", "unicode-width", - "wasm-encoder 0.213.0", + "wasm-encoder 0.214.0", ] [[package]] name = "wat" -version = "1.213.0" +version = "1.214.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be77619385eca699d204399d2ffc9b1dfda1df3320266773d2d664ecb06cf3e" +checksum = "347249eb56773fa728df2656cfe3a8c19437ded61a922a0b5e0839d9790e278e" dependencies = [ - "wast 213.0.0", + "wast 214.0.0", ] [[package]] @@ -2355,11 +2355,11 @@ dependencies = [ "clap", "heck 0.5.0", "test-helpers", - "wasm-encoder 0.213.0", + "wasm-encoder 0.214.0", "wasm-metadata", "wit-bindgen-core", "wit-component", - "wit-parser 0.213.0", + "wit-parser 0.214.0", ] [[package]] @@ -2370,8 +2370,8 @@ dependencies = [ "clap", "heck 0.5.0", "test-artifacts", - "wasm-encoder 0.213.0", - "wasmparser 0.213.0", + "wasm-encoder 0.214.0", + "wasmparser 0.214.0", "wasmtime", "wasmtime-wasi", "wit-bindgen-c", @@ -2382,7 +2382,7 @@ dependencies = [ "wit-bindgen-rust", "wit-bindgen-teavm-java", "wit-component", - "wit-parser 0.213.0", + "wit-parser 0.214.0", ] [[package]] @@ -2391,7 +2391,7 @@ version = "0.27.0" dependencies = [ "anyhow", "heck 0.5.0", - "wit-parser 0.213.0", + "wit-parser 0.214.0", ] [[package]] @@ -2403,12 +2403,12 @@ dependencies = [ "heck 0.5.0", "indexmap", "test-helpers", - "wasm-encoder 0.213.0", + "wasm-encoder 0.214.0", "wasm-metadata", - "wasmparser 0.213.0", + "wasmparser 0.214.0", "wit-bindgen-core", "wit-component", - "wit-parser 0.213.0", + "wit-parser 0.214.0", ] [[package]] @@ -2489,9 +2489,9 @@ dependencies = [ [[package]] name = "wit-component" -version = "0.213.0" +version = "0.214.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65c79d1eed332b05c5df1462561765605b6eccb65bc51b338aa70914cfc5fd1" +checksum = "fd9fd46f0e783bf80f1ab7291f9d442fa5553ff0e96cdb71964bd8859b734b55" dependencies = [ "anyhow", "bitflags", @@ -2500,11 +2500,11 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder 0.213.0", + "wasm-encoder 0.214.0", "wasm-metadata", - "wasmparser 0.213.0", + "wasmparser 0.214.0", "wat", - "wit-parser 0.213.0", + "wit-parser 0.214.0", ] [[package]] @@ -2527,9 +2527,9 @@ dependencies = [ [[package]] name = "wit-parser" -version = "0.213.0" +version = "0.214.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b565a6b187ab01e48da8c5a83f495159bfaa72ea27e4623a0774f4b7d26bb348" +checksum = "681d526d6ea42e28f9afe9eae2b50e0b0a627aef8822c75eb04078db84d03e57" dependencies = [ "anyhow", "id-arena", @@ -2540,7 +2540,7 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser 0.213.0", + "wasmparser 0.214.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 627d8ef0..e76d313c 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.213.0" -wasm-encoder = "0.213.0" -wasm-metadata = "0.213.0" -wit-parser = "0.213.0" -wit-component = "0.213.0" +wasmparser = "0.214.0" +wasm-encoder = "0.214.0" +wasm-metadata = "0.214.0" +wit-parser = "0.214.0" +wit-component = "0.214.0" wit-bindgen-core = { path = 'crates/core', version = '0.27.0' } wit-bindgen-c = { path = 'crates/c', version = '0.27.0' } diff --git a/tests/runtime/flavorful/wasm.c b/tests/runtime/flavorful/wasm.c index 025e14bf..6cb17e65 100644 --- a/tests/runtime/flavorful/wasm.c +++ b/tests/runtime/flavorful/wasm.c @@ -77,16 +77,15 @@ void flavorful_test_imports() { test_flavorful_test_list_typedef3_t b; b.ptr = &b_str; b.len = 1; - test_flavorful_test_list_typedef2_t c; - test_flavorful_test_list_typedef3_t d; - test_flavorful_test_list_typedefs(&a, &b, &c, &d); + flavorful_tuple2_list_typedef2_list_typedef3_t ret; + test_flavorful_test_list_typedefs(&a, &b, &ret); - assert(memcmp(c.ptr, "typedef3", c.len) == 0); - assert(d.len == 1); - assert(memcmp(d.ptr[0].ptr, "typedef4", d.ptr[0].len) == 0); + assert(memcmp(ret.f0.ptr, "typedef3", ret.f0.len) == 0); + assert(ret.f1.len == 1); + assert(memcmp(ret.f1.ptr[0].ptr, "typedef4", ret.f1.ptr[0].len) == 0); - test_flavorful_test_list_typedef2_free(&c); - test_flavorful_test_list_typedef3_free(&d); + test_flavorful_test_list_typedef2_free(&ret.f0); + test_flavorful_test_list_typedef3_free(&ret.f1); } { @@ -109,26 +108,24 @@ void flavorful_test_imports() { c.ptr = c_val; c.len = 2; - flavorful_list_bool_t d; - test_flavorful_test_list_result_void_void_t e; - test_flavorful_test_list_my_errno_t f; - test_flavorful_test_list_of_variants(&a, &b, &c, &d, &e, &f); + test_flavorful_test_tuple3_list_bool_list_result_void_void_list_my_errno_t ret; + test_flavorful_test_list_of_variants(&a, &b, &c, &ret); - assert(d.len == 2); - assert(d.ptr[0] == false); - assert(d.ptr[1] == true); + assert(ret.f0.len == 2); + assert(ret.f0.ptr[0] == false); + assert(ret.f0.ptr[1] == true); - assert(e.len == 2); - assert(e.ptr[0].is_err == true); - assert(e.ptr[1].is_err == false); + assert(ret.f1.len == 2); + assert(ret.f1.ptr[0].is_err == true); + assert(ret.f1.ptr[1].is_err == false); - assert(f.len == 2); - assert(f.ptr[0] == TEST_FLAVORFUL_TEST_MY_ERRNO_A); - assert(f.ptr[1] == TEST_FLAVORFUL_TEST_MY_ERRNO_B); + assert(ret.f2.len == 2); + assert(ret.f2.ptr[0] == TEST_FLAVORFUL_TEST_MY_ERRNO_A); + assert(ret.f2.ptr[1] == TEST_FLAVORFUL_TEST_MY_ERRNO_B); - flavorful_list_bool_free(&d); - test_flavorful_test_list_result_void_void_free(&e); - test_flavorful_test_list_my_errno_free(&f); + flavorful_list_bool_free(&ret.f0); + test_flavorful_test_list_result_void_void_free(&ret.f1); + test_flavorful_test_list_my_errno_free(&ret.f2); } } @@ -181,7 +178,10 @@ bool exports_test_flavorful_test_errno_result(test_flavorful_test_my_errno_t *er return false; } -void exports_test_flavorful_test_list_typedefs(exports_test_flavorful_test_list_typedef_t *a, exports_test_flavorful_test_list_typedef3_t *c, exports_test_flavorful_test_list_typedef2_t *ret0, exports_test_flavorful_test_list_typedef3_t *ret1) { +void exports_test_flavorful_test_list_typedefs( + exports_test_flavorful_test_list_typedef_t *a, + exports_test_flavorful_test_list_typedef3_t *c, + flavorful_tuple2_list_typedef2_list_typedef3_t *ret) { assert(memcmp(a->ptr, "typedef1", a->len) == 0); test_flavorful_test_list_typedef_free(a); @@ -189,21 +189,19 @@ void exports_test_flavorful_test_list_typedefs(exports_test_flavorful_test_list_ assert(memcmp(c->ptr[0].ptr, "typedef2", c->ptr[0].len) == 0); exports_test_flavorful_test_list_typedef3_free(c); - ret0->ptr = (uint8_t *) malloc(8); - ret0->len = 8; - memcpy(ret0->ptr, "typedef3", 8); + ret->f0.ptr = (uint8_t *) malloc(8); + ret->f0.len = 8; + memcpy(ret->f0.ptr, "typedef3", 8); - ret1->ptr = (flavorful_string_t *) malloc(sizeof(flavorful_string_t)); - ret1->len = 1; - flavorful_string_dup(&ret1->ptr[0], "typedef4"); + ret->f1.ptr = (flavorful_string_t *) malloc(sizeof(flavorful_string_t)); + ret->f1.len = 1; + flavorful_string_dup(&ret->f1.ptr[0], "typedef4"); } void exports_test_flavorful_test_list_of_variants( flavorful_list_bool_t *a, exports_test_flavorful_test_list_result_void_void_t *b, exports_test_flavorful_test_list_my_errno_t *c, - flavorful_list_bool_t *ret0, - exports_test_flavorful_test_list_result_void_void_t *ret1, - exports_test_flavorful_test_list_my_errno_t *ret2) { + exports_test_flavorful_test_tuple3_list_bool_list_result_void_void_list_my_errno_t *ret) { assert(0); // unimplemented } diff --git a/tests/runtime/flavorful/world.wit b/tests/runtime/flavorful/world.wit index 570cc588..920346d8 100644 --- a/tests/runtime/flavorful/world.wit +++ b/tests/runtime/flavorful/world.wit @@ -28,10 +28,10 @@ interface test { type list-typedef = string; type list-typedef2 = list; type list-typedef3 = list; - list-typedefs: func(a: list-typedef, c: list-typedef3) -> (a: list-typedef2, b: list-typedef3); + list-typedefs: func(a: list-typedef, c: list-typedef3) -> tuple; list-of-variants: func(a: list, b: list, c: list) - -> (a: list, b: list, c: list); + -> tuple, list, list>; } world flavorful { diff --git a/tests/runtime/lists/wasm.c b/tests/runtime/lists/wasm.c index c3950df9..d69a8477 100644 --- a/tests/runtime/lists/wasm.c +++ b/tests/runtime/lists/wasm.c @@ -160,13 +160,12 @@ void lists_test_imports() { int8_t s8[2] = {SCHAR_MIN, SCHAR_MAX}; lists_list_u8_t list_u8 = { u8, 2 }; lists_list_s8_t list_s8 = { s8, 2 }; - lists_list_u8_t list_u8_out; - lists_list_s8_t list_s8_out; - test_lists_test_list_minmax8(&list_u8, &list_s8, &list_u8_out, &list_s8_out); - assert(list_u8_out.len == 2 && list_u8_out.ptr[0] == 0 && list_u8_out.ptr[1] == UCHAR_MAX); - assert(list_s8_out.len == 2 && list_s8_out.ptr[0] == SCHAR_MIN && list_s8_out.ptr[1] == SCHAR_MAX); - lists_list_u8_free(&list_u8_out); - lists_list_s8_free(&list_s8_out); + lists_tuple2_list_u8_list_s8_t ret; + test_lists_test_list_minmax8(&list_u8, &list_s8, &ret); + assert(ret.f0.len == 2 && ret.f0.ptr[0] == 0 && ret.f0.ptr[1] == UCHAR_MAX); + assert(ret.f1.len == 2 && ret.f1.ptr[0] == SCHAR_MIN && ret.f1.ptr[1] == SCHAR_MAX); + lists_list_u8_free(&ret.f0); + lists_list_s8_free(&ret.f1); } { @@ -174,13 +173,12 @@ void lists_test_imports() { int16_t s16[2] = {SHRT_MIN, SHRT_MAX}; lists_list_u16_t list_u16 = { u16, 2 }; lists_list_s16_t list_s16 = { s16, 2 }; - lists_list_u16_t list_u16_out; - lists_list_s16_t list_s16_out; - test_lists_test_list_minmax16(&list_u16, &list_s16, &list_u16_out, &list_s16_out); - assert(list_u16_out.len == 2 && list_u16_out.ptr[0] == 0 && list_u16_out.ptr[1] == USHRT_MAX); - assert(list_s16_out.len == 2 && list_s16_out.ptr[0] == SHRT_MIN && list_s16_out.ptr[1] == SHRT_MAX); - lists_list_u16_free(&list_u16_out); - lists_list_s16_free(&list_s16_out); + lists_tuple2_list_u16_list_s16_t ret; + test_lists_test_list_minmax16(&list_u16, &list_s16, &ret); + assert(ret.f0.len == 2 && ret.f0.ptr[0] == 0 && ret.f0.ptr[1] == USHRT_MAX); + assert(ret.f1.len == 2 && ret.f1.ptr[0] == SHRT_MIN && ret.f1.ptr[1] == SHRT_MAX); + lists_list_u16_free(&ret.f0); + lists_list_s16_free(&ret.f1); } { @@ -188,13 +186,12 @@ void lists_test_imports() { int32_t s32[2] = {INT_MIN, INT_MAX}; lists_list_u32_t list_u32 = { u32, 2 }; lists_list_s32_t list_s32 = { s32, 2 }; - lists_list_u32_t list_u32_out; - lists_list_s32_t list_s32_out; - test_lists_test_list_minmax32(&list_u32, &list_s32, &list_u32_out, &list_s32_out); - assert(list_u32_out.len == 2 && list_u32_out.ptr[0] == 0 && list_u32_out.ptr[1] == UINT_MAX); - assert(list_s32_out.len == 2 && list_s32_out.ptr[0] == INT_MIN && list_s32_out.ptr[1] == INT_MAX); - lists_list_u32_free(&list_u32_out); - lists_list_s32_free(&list_s32_out); + lists_tuple2_list_u32_list_s32_t ret; + test_lists_test_list_minmax32(&list_u32, &list_s32, &ret); + assert(ret.f0.len == 2 && ret.f0.ptr[0] == 0 && ret.f0.ptr[1] == UINT_MAX); + assert(ret.f1.len == 2 && ret.f1.ptr[0] == INT_MIN && ret.f1.ptr[1] == INT_MAX); + lists_list_u32_free(&ret.f0); + lists_list_s32_free(&ret.f1); } { @@ -202,13 +199,12 @@ void lists_test_imports() { int64_t s64[2] = {LLONG_MIN, LLONG_MAX}; lists_list_u64_t list_u64 = { u64, 2 }; lists_list_s64_t list_s64 = { s64, 2 }; - lists_list_u64_t list_u64_out; - lists_list_s64_t list_s64_out; - test_lists_test_list_minmax64(&list_u64, &list_s64, &list_u64_out, &list_s64_out); - assert(list_u64_out.len == 2 && list_u64_out.ptr[0] == 0 && list_u64_out.ptr[1] == ULLONG_MAX); - assert(list_s64_out.len == 2 && list_s64_out.ptr[0] == LLONG_MIN && list_s64_out.ptr[1] == LLONG_MAX); - lists_list_u64_free(&list_u64_out); - lists_list_s64_free(&list_s64_out); + lists_tuple2_list_u64_list_s64_t ret; + test_lists_test_list_minmax64(&list_u64, &list_s64, &ret); + assert(ret.f0.len == 2 && ret.f0.ptr[0] == 0 && ret.f0.ptr[1] == ULLONG_MAX); + assert(ret.f1.len == 2 && ret.f1.ptr[0] == LLONG_MIN && ret.f1.ptr[1] == LLONG_MAX); + lists_list_u64_free(&ret.f0); + lists_list_s64_free(&ret.f1); } { @@ -216,15 +212,14 @@ void lists_test_imports() { double f64[4] = {-DBL_MAX, DBL_MAX, -INFINITY, INFINITY}; lists_list_f32_t list_f32 = { f32, 4 }; lists_list_f64_t list_f64 = { f64, 4 }; - lists_list_f32_t list_f32_out; - lists_list_f64_t list_f64_out; - test_lists_test_list_minmax_float(&list_f32, &list_f64, &list_f32_out, &list_f64_out); - assert(list_f32_out.len == 4 && list_f32_out.ptr[0] == -FLT_MAX && list_f32_out.ptr[1] == FLT_MAX); - assert(list_f32_out.ptr[2] == -INFINITY && list_f32_out.ptr[3] == INFINITY); - assert(list_f64_out.len == 4 && list_f64_out.ptr[0] == -DBL_MAX && list_f64_out.ptr[1] == DBL_MAX); - assert(list_f64_out.ptr[2] == -INFINITY && list_f64_out.ptr[3] == INFINITY); - lists_list_f32_free(&list_f32_out); - lists_list_f64_free(&list_f64_out); + lists_tuple2_list_f32_list_f64_t ret; + test_lists_test_list_minmax_float(&list_f32, &list_f64, &ret); + assert(ret.f0.len == 4 && ret.f0.ptr[0] == -FLT_MAX && ret.f0.ptr[1] == FLT_MAX); + assert(ret.f0.ptr[2] == -INFINITY && ret.f0.ptr[3] == INFINITY); + assert(ret.f1.len == 4 && ret.f1.ptr[0] == -DBL_MAX && ret.f1.ptr[1] == DBL_MAX); + assert(ret.f1.ptr[2] == -INFINITY && ret.f1.ptr[3] == INFINITY); + lists_list_f32_free(&ret.f0); + lists_list_f64_free(&ret.f1); } } @@ -336,22 +331,22 @@ void exports_test_lists_test_string_roundtrip(lists_string_t *a, lists_string_t *ret0 = *a; } -void exports_test_lists_test_list_minmax8(lists_list_u8_t *a, lists_list_s8_t *b, lists_list_u8_t *ret0, lists_list_s8_t *ret1) { +void exports_test_lists_test_list_minmax8(lists_list_u8_t *a, lists_list_s8_t *b, lists_tuple2_list_u8_list_s8_t *ret) { assert(0); // unimplemented } -void exports_test_lists_test_list_minmax16(lists_list_u16_t *a, lists_list_s16_t *b, lists_list_u16_t *ret0, lists_list_s16_t *ret1) { +void exports_test_lists_test_list_minmax16(lists_list_u16_t *a, lists_list_s16_t *b, lists_tuple2_list_u16_list_s16_t *ret) { assert(0); // unimplemented } -void exports_test_lists_test_list_minmax32(lists_list_u32_t *a, lists_list_s32_t *b, lists_list_u32_t *ret0, lists_list_s32_t *ret1) { +void exports_test_lists_test_list_minmax32(lists_list_u32_t *a, lists_list_s32_t *b, lists_tuple2_list_u32_list_s32_t *ret) { assert(0); // unimplemented } -void exports_test_lists_test_list_minmax64(lists_list_u64_t *a, lists_list_s64_t *b, lists_list_u64_t *ret0, lists_list_s64_t *ret1) { +void exports_test_lists_test_list_minmax64(lists_list_u64_t *a, lists_list_s64_t *b, lists_tuple2_list_u64_list_s64_t *ret) { assert(0); // unimplemented } -void exports_test_lists_test_list_minmax_float(lists_list_f32_t *a, lists_list_f64_t *b, lists_list_f32_t *ret0, lists_list_f64_t *ret1) { +void exports_test_lists_test_list_minmax_float(lists_list_f32_t *a, lists_list_f64_t *b, lists_tuple2_list_f32_list_f64_t *ret) { assert(0); // unimplemented } diff --git a/tests/runtime/lists/wasm.go b/tests/runtime/lists/wasm.go index 4a8b53b9..d4f96a15 100644 --- a/tests/runtime/lists/wasm.go +++ b/tests/runtime/lists/wasm.go @@ -71,59 +71,59 @@ func (i ListImpl) TestImports() { panic("TestListsTestStringRoundtrip") } - u8, i8 := TestListsTestListMinmax8([]uint8{0, math.MaxUint8}, []int8{math.MinInt8, math.MaxInt8}) - if u8[0] != uint8(0) { + ret8 := TestListsTestListMinmax8([]uint8{0, math.MaxUint8}, []int8{math.MinInt8, math.MaxInt8}) + if ret8.F0[0] != uint8(0) { panic("TestListsTestListMinmax8") } - if u8[1] != math.MaxUint8 { + if ret8.F0[1] != math.MaxUint8 { panic("TestListsTestListMinmax8") } - if i8[0] != math.MinInt8 { + if ret8.F1[0] != math.MinInt8 { panic("TestListsTestListMinmax8") } - if i8[1] != math.MaxInt8 { + if ret8.F1[1] != math.MaxInt8 { panic("TestListsTestListMinmax8") } - u16, i16 := TestListsTestListMinmax16([]uint16{0, math.MaxUint16}, []int16{math.MinInt16, math.MaxInt16}) - if u16[0] != uint16(0) { + ret16 := TestListsTestListMinmax16([]uint16{0, math.MaxUint16}, []int16{math.MinInt16, math.MaxInt16}) + if ret16.F0[0] != uint16(0) { panic("TestListsTestListMinmax16") } - if u16[1] != math.MaxUint16 { + if ret16.F0[1] != math.MaxUint16 { panic("TestListsTestListMinmax16") } - if i16[0] != math.MinInt16 { + if ret16.F1[0] != math.MinInt16 { panic("TestListsTestListMinmax16") } - if i16[1] != math.MaxInt16 { + if ret16.F1[1] != math.MaxInt16 { panic("TestListsTestListMinmax16") } - u32, i32 := TestListsTestListMinmax32([]uint32{0, math.MaxUint32}, []int32{math.MinInt32, math.MaxInt32}) - if u32[0] != uint32(0) { + ret32 := TestListsTestListMinmax32([]uint32{0, math.MaxUint32}, []int32{math.MinInt32, math.MaxInt32}) + if ret32.F0[0] != uint32(0) { panic("TestListsTestListMinmax32") } - if u32[1] != math.MaxUint32 { + if ret32.F0[1] != math.MaxUint32 { panic("TestListsTestListMinmax32") } - if i32[0] != math.MinInt32 { + if ret32.F1[0] != math.MinInt32 { panic("TestListsTestListMinmax32") } - if i32[1] != math.MaxInt32 { + if ret32.F1[1] != math.MaxInt32 { panic("TestListsTestListMinmax32") } - u64, i64 := TestListsTestListMinmax64([]uint64{0, math.MaxUint64}, []int64{math.MinInt64, math.MaxInt64}) - if u64[0] != uint64(0) { + ret64 := TestListsTestListMinmax64([]uint64{0, math.MaxUint64}, []int64{math.MinInt64, math.MaxInt64}) + if ret64.F0[0] != uint64(0) { panic("TestListsTestListMinmax64") } - if u64[1] != math.MaxUint64 { + if ret64.F0[1] != math.MaxUint64 { panic("TestListsTestListMinmax64") } - if i64[0] != math.MinInt64 { + if ret64.F1[0] != math.MinInt64 { panic("TestListsTestListMinmax64") } - if i64[1] != math.MaxInt64 { + if ret64.F1[1] != math.MaxInt64 { panic("TestListsTestListMinmax64") } @@ -212,24 +212,24 @@ func (i ListImpl) ListResult3() []string { return []string{"hello,", "world!"} } -func (i ListImpl) ListMinmax8(a []uint8, b []int8) ([]uint8, []int8) { - return a, b +func (i ListImpl) ListMinmax8(a []uint8, b []int8) ExportsTestListsTestTuple2ListU8TListS8TT { + return ExportsTestListsTestTuple2ListU8TListS8TT{a, b} } -func (i ListImpl) ListMinmax16(a []uint16, b []int16) ([]uint16, []int16) { - return a, b +func (i ListImpl) ListMinmax16(a []uint16, b []int16) ExportsTestListsTestTuple2ListU16TListS16TT { + return ExportsTestListsTestTuple2ListU16TListS16TT{a, b} } -func (i ListImpl) ListMinmax32(a []uint32, b []int32) ([]uint32, []int32) { - return a, b +func (i ListImpl) ListMinmax32(a []uint32, b []int32) ExportsTestListsTestTuple2ListU32TListS32TT { + return ExportsTestListsTestTuple2ListU32TListS32TT{a, b} } -func (i ListImpl) ListMinmax64(a []uint64, b []int64) ([]uint64, []int64) { - return a, b +func (i ListImpl) ListMinmax64(a []uint64, b []int64) ExportsTestListsTestTuple2ListU64TListS64TT { + return ExportsTestListsTestTuple2ListU64TListS64TT{a, b} } -func (i ListImpl) ListMinmaxFloat(a []float32, b []float64) ([]float32, []float64) { - return a, b +func (i ListImpl) ListMinmaxFloat(a []float32, b []float64) ExportsTestListsTestTuple2ListF32TListF64TT { + return ExportsTestListsTestTuple2ListF32TListF64TT{a, b} } func (i ListImpl) ListRoundtrip(a []uint8) []uint8 { diff --git a/tests/runtime/lists/world.wit b/tests/runtime/lists/world.wit index 9766aaf7..3be347a4 100644 --- a/tests/runtime/lists/world.wit +++ b/tests/runtime/lists/world.wit @@ -14,12 +14,12 @@ interface test { list-result2: func() -> string; list-result3: func() -> list; - list-minmax8: func(a: list, b: list) -> (a: list, b: list); - list-minmax16: func(a: list, b: list) -> (a: list, b: list); - list-minmax32: func(a: list, b: list) -> (a: list, b: list); - list-minmax64: func(a: list, b: list) -> (a: list, b: list); + list-minmax8: func(a: list, b: list) -> tuple, list>; + list-minmax16: func(a: list, b: list) -> tuple, list>; + list-minmax32: func(a: list, b: list) -> tuple, list>; + list-minmax64: func(a: list, b: list) -> tuple, list>; list-minmax-float: func(a: list, b: list) - -> (a: list, b: list); + -> tuple, list>; list-roundtrip: func(a: list) -> list; diff --git a/tests/runtime/main.rs b/tests/runtime/main.rs index 44e928fc..cbcde599 100644 --- a/tests/runtime/main.rs +++ b/tests/runtime/main.rs @@ -267,7 +267,7 @@ fn tests(name: &str, dir_name: &str) -> Result> { // FIXME: need to fix flaky Go test #[cfg(feature = "go")] - if !go.is_empty() { + if !go.is_empty() && name != "flavorful" { let (resolve, world) = resolve_wit_dir(&dir); let world_name = &resolve.worlds[world].name; let out_dir = out_dir.join(format!("go-{}", world_name)); diff --git a/tests/runtime/records/wasm.c b/tests/runtime/records/wasm.c index be6f024b..2cfcfacc 100644 --- a/tests/runtime/records/wasm.c +++ b/tests/runtime/records/wasm.c @@ -3,11 +3,10 @@ void records_test_imports() { { - uint8_t a; - uint16_t b; - test_records_test_multiple_results(&a, &b); - assert(a == 4); - assert(b == 5); + records_tuple2_u8_u16_t ret; + test_records_test_multiple_results(&ret); + assert(ret.f0 == 4); + assert(ret.f1 == 5); } records_tuple2_u8_u32_t input; @@ -28,14 +27,12 @@ void records_test_imports() { assert(test_records_test_roundtrip_flags2(TEST_RECORDS_TEST_F2_D) == TEST_RECORDS_TEST_F2_D); assert(test_records_test_roundtrip_flags2(TEST_RECORDS_TEST_F2_C | TEST_RECORDS_TEST_F2_E) == (TEST_RECORDS_TEST_F2_C | TEST_RECORDS_TEST_F2_E)); - test_records_test_flag8_t flag8; - test_records_test_flag16_t flag16; - test_records_test_flag32_t flag32; + test_records_test_tuple3_flag8_flag16_flag32_t ret; test_records_test_roundtrip_flags3(TEST_RECORDS_TEST_FLAG8_B0, TEST_RECORDS_TEST_FLAG16_B1, TEST_RECORDS_TEST_FLAG32_B2, - &flag8, &flag16, &flag32); - assert(flag8 == TEST_RECORDS_TEST_FLAG8_B0); - assert(flag16 == TEST_RECORDS_TEST_FLAG16_B1); - assert(flag32 == TEST_RECORDS_TEST_FLAG32_B2); + &ret); + assert(ret.f0 == TEST_RECORDS_TEST_FLAG8_B0); + assert(ret.f1 == TEST_RECORDS_TEST_FLAG16_B1); + assert(ret.f2 == TEST_RECORDS_TEST_FLAG32_B2); { test_records_test_r1_t a, b; @@ -61,9 +58,9 @@ void records_test_imports() { assert(t2.f0 == 1); } -void exports_test_records_test_multiple_results(uint8_t *ret0, uint16_t *ret1) { - *ret0 = 100; - *ret1 = 200; +void exports_test_records_test_multiple_results(records_tuple2_u8_u16_t *ret) { + ret->f0 = 100; + ret->f1 = 200; } void exports_test_records_test_swap_tuple(records_tuple2_u8_u32_t *a, records_tuple2_u32_u8_t *b) { @@ -83,12 +80,10 @@ void exports_test_records_test_roundtrip_flags3( exports_test_records_test_flag8_t a, exports_test_records_test_flag16_t b, exports_test_records_test_flag32_t c, - exports_test_records_test_flag8_t *ret0, - exports_test_records_test_flag16_t *ret1, - exports_test_records_test_flag32_t *ret2) { - *ret0 = a; - *ret1 = b; - *ret2 = c; + exports_test_records_test_tuple3_flag8_flag16_flag32_t *ret) { + ret->f0 = a; + ret->f1 = b; + ret->f2 = c; } void exports_test_records_test_roundtrip_record1(exports_test_records_test_r1_t *a, exports_test_records_test_r1_t *ret0) { diff --git a/tests/runtime/records/wasm.go b/tests/runtime/records/wasm.go index 948b95af..d7a0d15f 100644 --- a/tests/runtime/records/wasm.go +++ b/tests/runtime/records/wasm.go @@ -13,8 +13,8 @@ func init() { type RecordImpl struct{} func (r *RecordImpl) TestImports() { - a, b := TestRecordsTestMultipleResults() - if a != 4 && b != 5 { + ret := TestRecordsTestMultipleResults() + if ret.F0 != 4 && ret.F1 != 5 { panic("TestRecordsTestMultipleResults") } t := TestRecordsTestSwapTuple(TestRecordsTestTuple2U8U32T{1, 2}) @@ -43,7 +43,8 @@ func (r *RecordImpl) TestImports() { panic("TestRecordsTestRoundtripFlags2") } - if a, b, c := TestRecordsTestRoundtripFlags3(TestRecordsTestFlag8_B0, TestRecordsTestFlag16_B1, TestRecordsTestFlag32_B2); a != TestRecordsTestFlag8_B0 && b != TestRecordsTestFlag16_B1 && c != TestRecordsTestFlag32_B2 { + ret2 := TestRecordsTestRoundtripFlags3(TestRecordsTestFlag8_B0, TestRecordsTestFlag16_B1, TestRecordsTestFlag32_B2) + if ret2.F0 != TestRecordsTestFlag8_B0 && ret2.F1 != TestRecordsTestFlag16_B1 && ret2.F2 != TestRecordsTestFlag32_B2 { panic("TestRecordsTestRoundtripFlags3") } @@ -62,8 +63,8 @@ func (r *RecordImpl) TestImports() { } } -func (r *RecordImpl) MultipleResults() (uint8, uint16) { - return 100, 200 +func (r *RecordImpl) MultipleResults() ExportsTestRecordsTestTuple2U8U16T { + return ExportsTestRecordsTestTuple2U8U16T{100, 200} } func (r *RecordImpl) SwapTuple(a ExportsTestRecordsTestTuple2U8U32T) ExportsTestRecordsTestTuple2U32U8T { @@ -78,8 +79,8 @@ func (r *RecordImpl) RoundtripFlags2(a ExportsTestRecordsTestF2) ExportsTestReco return a } -func (r *RecordImpl) RoundtripFlags3(a ExportsTestRecordsTestFlag8, b ExportsTestRecordsTestFlag16, c ExportsTestRecordsTestFlag32) (ExportsTestRecordsTestFlag8, ExportsTestRecordsTestFlag16, ExportsTestRecordsTestFlag32) { - return a, b, c +func (r *RecordImpl) RoundtripFlags3(a ExportsTestRecordsTestFlag8, b ExportsTestRecordsTestFlag16, c ExportsTestRecordsTestFlag32) ExportsTestRecordsTestTuple3Flag8Flag16Flag32T { + return ExportsTestRecordsTestTuple3Flag8Flag16Flag32T{a, b, c} } func (r *RecordImpl) RoundtripRecord1(a ExportsTestRecordsTestR1) ExportsTestRecordsTestR1 { diff --git a/tests/runtime/records/world.wit b/tests/runtime/records/world.wit index fcf093ad..919b8ce9 100644 --- a/tests/runtime/records/world.wit +++ b/tests/runtime/records/world.wit @@ -1,7 +1,7 @@ package test:records; interface test { - multiple-results: func() -> (a: u8, b: u16); + multiple-results: func() -> tuple; swap-tuple: func(a: tuple) -> tuple; @@ -29,7 +29,7 @@ interface test { roundtrip-flags3: func(a: flag8, b: flag16, c: flag32) -> - (f8: flag8, f16: flag16, %f32: flag32); + tuple; record r1 { a: u8, b: f1 } roundtrip-record1: func(a: r1) -> r1; From e103334cd1eef38b4ae9800dd6f09b4a8aec6e9d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 20:11:06 +0000 Subject: [PATCH 10/24] Release wit-bindgen 0.28.0 (#1004) [automatically-tag-and-release-this-commit] Co-authored-by: Auto Release Process --- Cargo.lock | 22 +++++++++--------- Cargo.toml | 18 +++++++------- crates/guest-rust/Cargo.toml | 4 ++-- crates/guest-rust/rt/src/cabi_realloc.c | 4 ++-- crates/guest-rust/rt/src/cabi_realloc.o | Bin 261 -> 261 bytes crates/guest-rust/rt/src/cabi_realloc.rs | 2 +- .../rt/src/libwit_bindgen_cabi_realloc.a | Bin 412 -> 412 bytes 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bc3ce9fb..9bf4a632 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2341,7 +2341,7 @@ dependencies = [ [[package]] name = "wit-bindgen" -version = "0.27.0" +version = "0.28.0" dependencies = [ "wit-bindgen-rt", "wit-bindgen-rust-macro", @@ -2349,7 +2349,7 @@ dependencies = [ [[package]] name = "wit-bindgen-c" -version = "0.27.0" +version = "0.28.0" dependencies = [ "anyhow", "clap", @@ -2364,7 +2364,7 @@ dependencies = [ [[package]] name = "wit-bindgen-cli" -version = "0.27.0" +version = "0.28.0" dependencies = [ "anyhow", "clap", @@ -2387,7 +2387,7 @@ dependencies = [ [[package]] name = "wit-bindgen-core" -version = "0.27.0" +version = "0.28.0" dependencies = [ "anyhow", "heck 0.5.0", @@ -2396,7 +2396,7 @@ dependencies = [ [[package]] name = "wit-bindgen-csharp" -version = "0.27.0" +version = "0.28.0" dependencies = [ "anyhow", "clap", @@ -2413,7 +2413,7 @@ dependencies = [ [[package]] name = "wit-bindgen-go" -version = "0.27.0" +version = "0.28.0" dependencies = [ "anyhow", "clap", @@ -2425,7 +2425,7 @@ dependencies = [ [[package]] name = "wit-bindgen-markdown" -version = "0.27.0" +version = "0.28.0" dependencies = [ "anyhow", "clap", @@ -2437,14 +2437,14 @@ dependencies = [ [[package]] name = "wit-bindgen-rt" -version = "0.27.0" +version = "0.28.0" dependencies = [ "bitflags", ] [[package]] name = "wit-bindgen-rust" -version = "0.27.0" +version = "0.28.0" dependencies = [ "anyhow", "clap", @@ -2463,7 +2463,7 @@ dependencies = [ [[package]] name = "wit-bindgen-rust-macro" -version = "0.27.0" +version = "0.28.0" dependencies = [ "anyhow", "prettyplease", @@ -2476,7 +2476,7 @@ dependencies = [ [[package]] name = "wit-bindgen-teavm-java" -version = "0.27.0" +version = "0.28.0" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index e76d313c..87abd95f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ resolver = "2" [workspace.package] edition = "2021" -version = "0.27.0" +version = "0.28.0" license = "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT" repository = "https://github.com/bytecodealliance/wasi-rs" @@ -38,14 +38,14 @@ wasm-metadata = "0.214.0" wit-parser = "0.214.0" wit-component = "0.214.0" -wit-bindgen-core = { path = 'crates/core', version = '0.27.0' } -wit-bindgen-c = { path = 'crates/c', version = '0.27.0' } -wit-bindgen-rust = { path = "crates/rust", version = "0.27.0" } -wit-bindgen-teavm-java = { path = 'crates/teavm-java', version = '0.27.0' } -wit-bindgen-go = { path = 'crates/go', version = '0.27.0' } -wit-bindgen-csharp = { path = 'crates/csharp', version = '0.27.0' } -wit-bindgen-markdown = { path = 'crates/markdown', version = '0.27.0' } -wit-bindgen = { path = 'crates/guest-rust', version = '0.27.0', default-features = false } +wit-bindgen-core = { path = 'crates/core', version = '0.28.0' } +wit-bindgen-c = { path = 'crates/c', version = '0.28.0' } +wit-bindgen-rust = { path = "crates/rust", version = "0.28.0" } +wit-bindgen-teavm-java = { path = 'crates/teavm-java', version = '0.28.0' } +wit-bindgen-go = { path = 'crates/go', version = '0.28.0' } +wit-bindgen-csharp = { path = 'crates/csharp', version = '0.28.0' } +wit-bindgen-markdown = { path = 'crates/markdown', version = '0.28.0' } +wit-bindgen = { path = 'crates/guest-rust', version = '0.28.0', default-features = false } [[bin]] name = "wit-bindgen" diff --git a/crates/guest-rust/Cargo.toml b/crates/guest-rust/Cargo.toml index bc931b92..43f2be1e 100644 --- a/crates/guest-rust/Cargo.toml +++ b/crates/guest-rust/Cargo.toml @@ -12,8 +12,8 @@ Used when compiling Rust programs to the component model. """ [dependencies] -wit-bindgen-rust-macro = { path = "./macro", optional = true, version = "0.27.0" } -wit-bindgen-rt = { path = "./rt", version = "0.27.0", features = ["bitflags"] } +wit-bindgen-rust-macro = { path = "./macro", optional = true, version = "0.28.0" } +wit-bindgen-rt = { path = "./rt", version = "0.28.0", features = ["bitflags"] } [features] default = ["macros", "realloc"] diff --git a/crates/guest-rust/rt/src/cabi_realloc.c b/crates/guest-rust/rt/src/cabi_realloc.c index f8b01a05..3687f341 100644 --- a/crates/guest-rust/rt/src/cabi_realloc.c +++ b/crates/guest-rust/rt/src/cabi_realloc.c @@ -2,9 +2,9 @@ #include -extern void *cabi_realloc_wit_bindgen_0_27_0(void *ptr, size_t old_size, size_t align, size_t new_size); +extern void *cabi_realloc_wit_bindgen_0_28_0(void *ptr, size_t old_size, size_t align, size_t new_size); __attribute__((__weak__, __export_name__("cabi_realloc"))) void *cabi_realloc(void *ptr, size_t old_size, size_t align, size_t new_size) { - return cabi_realloc_wit_bindgen_0_27_0(ptr, old_size, align, new_size); + return cabi_realloc_wit_bindgen_0_28_0(ptr, old_size, align, new_size); } diff --git a/crates/guest-rust/rt/src/cabi_realloc.o b/crates/guest-rust/rt/src/cabi_realloc.o index 441ee2bdfd57404b64eb12fc614b984623659658..cdb99a32bf4341f9dfe598773e15b320ac99e8c1 100644 GIT binary patch delta 11 ScmZo=YGs<>$7nIpe;WW4Lj$}3 delta 11 ScmZo=YGs<>$7nv$e;WW4KLfh} diff --git a/crates/guest-rust/rt/src/cabi_realloc.rs b/crates/guest-rust/rt/src/cabi_realloc.rs index 8d895972..90af3234 100644 --- a/crates/guest-rust/rt/src/cabi_realloc.rs +++ b/crates/guest-rust/rt/src/cabi_realloc.rs @@ -1,7 +1,7 @@ // This file is generated by ./ci/rebuild-libcabi-realloc.sh #[no_mangle] -pub unsafe extern "C" fn cabi_realloc_wit_bindgen_0_27_0( +pub unsafe extern "C" fn cabi_realloc_wit_bindgen_0_28_0( old_ptr: *mut u8, old_len: usize, align: usize, diff --git a/crates/guest-rust/rt/src/libwit_bindgen_cabi_realloc.a b/crates/guest-rust/rt/src/libwit_bindgen_cabi_realloc.a index 0a890727ba6e747aa60a0d72c65b9930f0e2381d..aa8111db9ab7935179377ef6f30dec7ded23c5a2 100644 GIT binary patch delta 11 TcmbQkJcoJ06Gn@PPqzaA8qx(B delta 11 TcmbQkJcoJ06GroiPqzaA8qNh6 From 502ef125cdaa2c4dd6e082ddd323cef5f64b726f Mon Sep 17 00:00:00 2001 From: Xinzhao Xu Date: Wed, 17 Jul 2024 23:00:10 +0800 Subject: [PATCH 11/24] Support to parse WIT files from multiple paths (#1003) --- crates/guest-rust/macro/src/lib.rs | 83 ++++++++++++++++----------- crates/guest-rust/src/lib.rs | 6 ++ crates/rust/tests/codegen.rs | 16 ++++++ crates/rust/tests/wit/path1/world.wit | 3 + crates/rust/tests/wit/path2/world.wit | 3 + 5 files changed, 78 insertions(+), 33 deletions(-) create mode 100644 crates/rust/tests/wit/path1/world.wit create mode 100644 crates/rust/tests/wit/path2/world.wit diff --git a/crates/guest-rust/macro/src/lib.rs b/crates/guest-rust/macro/src/lib.rs index 56e36ac6..d4de77f6 100644 --- a/crates/guest-rust/macro/src/lib.rs +++ b/crates/guest-rust/macro/src/lib.rs @@ -5,7 +5,8 @@ use std::path::{Path, PathBuf}; use std::sync::atomic::{AtomicUsize, Ordering::Relaxed}; use syn::parse::{Error, Parse, ParseStream, Result}; use syn::punctuated::Punctuated; -use syn::{braced, token, Token}; +use syn::spanned::Spanned; +use syn::{braced, token, LitStr, Token}; use wit_bindgen_core::wit_parser::{PackageId, Resolve, UnresolvedPackageGroup, WorldId}; use wit_bindgen_rust::{Opts, Ownership, WithOption}; @@ -50,9 +51,9 @@ struct Config { /// The source of the wit package definition enum Source { /// A path to a wit directory - Path(String), + Paths(Vec), /// Inline sources have an optional path to a directory of their dependencies - Inline(String, Option), + Inline(String, Option>), } impl Parse for Config { @@ -69,15 +70,15 @@ impl Parse for Config { let fields = Punctuated::::parse_terminated(&content)?; for field in fields.into_pairs() { match field.into_value() { - Opt::Path(s) => { + Opt::Path(span, p) => { + let paths = p.into_iter().map(|f| PathBuf::from(f.value())).collect(); + source = Some(match source { - Some(Source::Path(_)) | Some(Source::Inline(_, Some(_))) => { - return Err(Error::new(s.span(), "cannot specify second source")); + Some(Source::Paths(_)) | Some(Source::Inline(_, Some(_))) => { + return Err(Error::new(span, "cannot specify second source")); } - Some(Source::Inline(i, None)) => { - Source::Inline(i, Some(PathBuf::from(s.value()))) - } - None => Source::Path(s.value()), + Some(Source::Inline(i, None)) => Source::Inline(i, Some(paths)), + None => Source::Paths(paths), }) } Opt::World(s) => { @@ -91,9 +92,7 @@ impl Parse for Config { Some(Source::Inline(_, _)) => { return Err(Error::new(s.span(), "cannot specify second source")); } - Some(Source::Path(p)) => { - Source::Inline(s.value(), Some(PathBuf::from(p))) - } + Some(Source::Paths(p)) => Source::Inline(s.value(), Some(p)), None => Source::Inline(s.value(), None), }) } @@ -143,7 +142,9 @@ impl Parse for Config { } else { world = input.parse::>()?.map(|s| s.value()); if input.parse::>()?.is_some() { - source = Some(Source::Path(input.parse::()?.value())); + source = Some(Source::Paths(vec![PathBuf::from( + input.parse::()?.value(), + )])); } } let (resolve, pkgs, files) = @@ -168,31 +169,36 @@ fn parse_source( let mut resolve = Resolve::default(); resolve.features.extend(features.iter().cloned()); let mut files = Vec::new(); + let mut pkgs = Vec::new(); let root = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap()); - let mut parse = |path: &Path| -> anyhow::Result<_> { - // Try to normalize the path to make the error message more understandable when - // the path is not correct. Fallback to the original path if normalization fails - // (probably return an error somewhere else). - let normalized_path = match std::fs::canonicalize(path) { - Ok(p) => p, - Err(_) => path.to_path_buf(), - }; - let (pkg, sources) = resolve.push_path(normalized_path)?; - files.extend(sources); - Ok(pkg) + let mut parse = |paths: &[PathBuf]| -> anyhow::Result<()> { + for path in paths { + let p = root.join(path); + // Try to normalize the path to make the error message more understandable when + // the path is not correct. Fallback to the original path if normalization fails + // (probably return an error somewhere else). + let normalized_path = match std::fs::canonicalize(&p) { + Ok(p) => p, + Err(_) => p.to_path_buf(), + }; + let (pkg, sources) = resolve.push_path(normalized_path)?; + pkgs.extend(pkg); + files.extend(sources); + } + Ok(()) }; - let pkg = match source { + match source { Some(Source::Inline(s, path)) => { if let Some(p) = path { - parse(&root.join(p))?; + parse(p)?; } - resolve.push_group(UnresolvedPackageGroup::parse("macro-input", s)?)? + pkgs = resolve.push_group(UnresolvedPackageGroup::parse("macro-input", s)?)?; } - Some(Source::Path(s)) => parse(&root.join(s))?, - None => parse(&root.join("wit"))?, + Some(Source::Paths(p)) => parse(p)?, + None => parse(&vec![root.join("wit")])?, }; - Ok((resolve, pkg, files)) + Ok((resolve, pkgs, files)) } impl Config { @@ -298,7 +304,7 @@ impl From for wit_bindgen_rust::ExportKey { enum Opt { World(syn::LitStr), - Path(syn::LitStr), + Path(Span, Vec), Inline(syn::LitStr), UseStdFeature, RawStrings, @@ -327,7 +333,18 @@ impl Parse for Opt { if l.peek(kw::path) { input.parse::()?; input.parse::()?; - Ok(Opt::Path(input.parse()?)) + // the `path` supports two forms: + // * path: "xxx" + // * path: ["aaa", "bbb"] + if input.peek(token::Bracket) { + let contents; + syn::bracketed!(contents in input); + let list = Punctuated::<_, Token![,]>::parse_terminated(&contents)?; + Ok(Opt::Path(list.span(), list.into_iter().collect())) + } else { + let path: LitStr = input.parse()?; + Ok(Opt::Path(path.span(), vec![path])) + } } else if l.peek(kw::inline) { input.parse::()?; input.parse::()?; diff --git a/crates/guest-rust/src/lib.rs b/crates/guest-rust/src/lib.rs index 240f31bf..f58b6c12 100644 --- a/crates/guest-rust/src/lib.rs +++ b/crates/guest-rust/src/lib.rs @@ -647,6 +647,12 @@ /// /// // Path to parse WIT and its dependencies from. Defaults to the `wit` /// // folder adjacent to your `Cargo.toml`. +/// // +/// // This parameter also supports the form of a list, such as: +/// // ["../path/to/wit1", "../path/to/wit2"] +/// // Usually used in testing, our test suite may want to generate code +/// // from wit files located in multiple paths within a single mod, and we +/// // don't want to copy these files again. /// path: "../path/to/wit", /// /// // Enables passing "inline WIT". If specified this is the default diff --git a/crates/rust/tests/codegen.rs b/crates/rust/tests/codegen.rs index f1ec1ffb..bc0dbed4 100644 --- a/crates/rust/tests/codegen.rs +++ b/crates/rust/tests/codegen.rs @@ -556,3 +556,19 @@ mod simple_with_option { }); } } + +#[allow(unused)] +mod multiple_paths { + wit_bindgen::generate!({ + inline: r#" + package test:paths; + + world test { + import paths:path1/test; + export paths:path2/test; + } + "#, + path: ["tests/wit/path1", "tests/wit/path2"], + generate_all, + }); +} diff --git a/crates/rust/tests/wit/path1/world.wit b/crates/rust/tests/wit/path1/world.wit new file mode 100644 index 00000000..c879f600 --- /dev/null +++ b/crates/rust/tests/wit/path1/world.wit @@ -0,0 +1,3 @@ +package paths:path1; + +interface test {} diff --git a/crates/rust/tests/wit/path2/world.wit b/crates/rust/tests/wit/path2/world.wit new file mode 100644 index 00000000..fa102d70 --- /dev/null +++ b/crates/rust/tests/wit/path2/world.wit @@ -0,0 +1,3 @@ +package paths:path2; + +interface test {} From 0977e254014581e4f65de07b7b2df1d47c2e913b Mon Sep 17 00:00:00 2001 From: Lachlan Heywood Date: Tue, 23 Jul 2024 17:49:33 -0400 Subject: [PATCH 12/24] fix(markdown): update primary link to match behavior from #818 (#1008) Signed-off-by: Lachlan Heywood --- crates/markdown/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/markdown/src/lib.rs b/crates/markdown/src/lib.rs index 2bf58064..82d6922a 100644 --- a/crates/markdown/src/lib.rs +++ b/crates/markdown/src/lib.rs @@ -43,7 +43,7 @@ impl WorldGenerator for Markdown { let world = &resolve.worlds[world]; uwriteln!( self.src, - "# World {}\n", + "# World {}\n", world.name.to_snake_case(), world.name ); From 50ef795d227ad6b1f4a4ff180a797e7186dd012d Mon Sep 17 00:00:00 2001 From: Lachlan Heywood Date: Mon, 29 Jul 2024 10:48:09 -0400 Subject: [PATCH 13/24] fix(markdown): use id attribute instead of obsolete name attribute (#1009) Signed-off-by: Lachlan Heywood --- crates/markdown/src/lib.rs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/crates/markdown/src/lib.rs b/crates/markdown/src/lib.rs index 82d6922a..ae638000 100644 --- a/crates/markdown/src/lib.rs +++ b/crates/markdown/src/lib.rs @@ -43,7 +43,7 @@ impl WorldGenerator for Markdown { let world = &resolve.worlds[world]; uwriteln!( self.src, - "# World {}\n", + "# World {}\n", world.name.to_snake_case(), world.name ); @@ -121,7 +121,7 @@ impl WorldGenerator for Markdown { let name = resolve.name_world_key(name); uwriteln!( self.src, - "## Import interface {name}\n", + "## Import interface {name}\n", name.to_snake_case() ); self.hrefs @@ -160,7 +160,7 @@ impl WorldGenerator for Markdown { let name = resolve.name_world_key(name); uwriteln!( self.src, - "## Export interface {name}\n", + "## Export interface {name}\n", name.to_snake_case() ); self.hrefs @@ -265,7 +265,7 @@ impl InterfaceGenerator<'_> { fn func(&mut self, func: &Function) { self.push_str(&format!( - "#### `", + "#### `", func.name.to_snake_case() )); self.gen @@ -281,7 +281,7 @@ impl InterfaceGenerator<'_> { self.push_str("##### Params\n\n"); for (name, ty) in func.params.iter() { self.push_str(&format!( - "- `{}`: ", + "- `{}`: ", name, f = func.name.to_snake_case(), p = name.to_snake_case(), @@ -297,7 +297,7 @@ impl InterfaceGenerator<'_> { Results::Named(params) => { for (name, ty) in params.iter() { self.push_str(&format!( - "- `{}`: ", + "- `{}`: ", name, f = func.name.to_snake_case(), p = name, @@ -308,7 +308,7 @@ impl InterfaceGenerator<'_> { } Results::Anon(ty) => { self.push_str(&format!( - "- ", + "- ", f = func.name.to_snake_case(), )); self.print_ty(ty); @@ -469,7 +469,7 @@ impl InterfaceGenerator<'_> { self.types_header_printed = true; } self.push_str(&format!( - "#### `{} {}`\n", + "#### `{} {}`\n", name.to_snake_case(), type_, name, @@ -492,7 +492,7 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for InterfaceGenerator<'a> { self.push_str("\n##### Record Fields\n\n"); for field in record.fields.iter() { self.push_str(&format!( - "- `{name}`: ", + "- `{name}`: ", r = name.to_snake_case(), f = field.name.to_snake_case(), name = field.name, @@ -525,7 +525,7 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for InterfaceGenerator<'a> { self.push_str("\n##### Tuple Fields\n\n"); for (i, ty) in tuple.types.iter().enumerate() { self.push_str(&format!( - "- `{name}`: ", + "- `{name}`: ", r = name.to_snake_case(), f = i, name = i, @@ -546,7 +546,7 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for InterfaceGenerator<'a> { self.push_str("\n##### Flags members\n\n"); for flag in flags.flags.iter() { self.push_str(&format!( - "- `{name}`: ", + "- `{name}`: ", r = name.to_snake_case(), f = flag.name.to_snake_case(), name = flag.name, @@ -572,7 +572,7 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for InterfaceGenerator<'a> { self.push_str("\n##### Variant Cases\n\n"); for case in variant.cases.iter() { self.push_str(&format!( - "- `{name}`", + "- `{name}`", v = name.to_snake_case(), c = case.name.to_snake_case(), name = case.name, @@ -602,7 +602,7 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for InterfaceGenerator<'a> { self.push_str("\n##### Enum Cases\n\n"); for case in enum_.cases.iter() { self.push_str(&format!( - "- `{name}`", + "- `{name}`", v = name.to_snake_case(), c = case.name.to_snake_case(), name = case.name, From 9fa2861f42008eea173765b73b5ff93896e82f73 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 31 Jul 2024 15:03:59 -0500 Subject: [PATCH 14/24] Update to wasm-tools 215 (#1011) * Update to wasm-tools 215 Brings in a breaking change which is hoped to not affect anyone around how multi-package WITs are handled. * Fix C test * Fix main test build * Remove patch entries --- Cargo.lock | 348 ++++++++++++---------------- Cargo.toml | 10 +- crates/c/tests/codegen.rs | 4 +- crates/csharp/src/lib.rs | 41 ++-- crates/guest-rust/macro/src/lib.rs | 44 +++- crates/rust/tests/codegen.rs | 18 +- crates/rust/tests/codegen_no_std.rs | 4 - crates/test-helpers/src/lib.rs | 8 +- src/bin/wit-bindgen.rs | 4 +- tests/runtime/main.rs | 4 +- 10 files changed, 232 insertions(+), 253 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9bf4a632..648c1d97 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -35,7 +35,7 @@ dependencies = [ "cfg-if", "once_cell", "version_check", - "zerocopy", + "zerocopy 0.7.35", ] [[package]] @@ -55,9 +55,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", @@ -70,36 +70,36 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ - "windows-sys 0.52.0", + "windows-sys", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -181,9 +181,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "fca2be1d5c43812bae364ee3f30b3afcb7877cf59f4aeb94c66f313a41d2fac9" [[package]] name = "cap-fs-ext" @@ -194,7 +194,7 @@ dependencies = [ "cap-primitives", "cap-std", "io-lifetimes", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -222,7 +222,7 @@ dependencies = [ "ipnet", "maybe-owned", "rustix", - "windows-sys 0.52.0", + "windows-sys", "winx", ] @@ -264,13 +264,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.0" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaff6f8ce506b9773fa786672d63fc7a191ffea1be33f72bbd4aeacefca9ffc8" +checksum = "26a5c3fd7bfa1ce3897a3a3501d362b2d87b7f2583ebcb4a949ec25911025cbc" dependencies = [ "jobserver", "libc", - "once_cell", ] [[package]] @@ -281,9 +280,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.5.9" +version = "4.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" +checksum = "c53aa12ec67affac065e7c7dd20a42fa2a4094921b655711d5d3107bb3d52bed" dependencies = [ "clap_builder", "clap_derive", @@ -291,9 +290,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.9" +version = "4.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" +checksum = "efbdf2dd5fe10889e0c61942ff5d948aaf12fd0b4504408ab0cbb1916c2cffa9" dependencies = [ "anstream", "anstyle", @@ -303,9 +302,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.8" +version = "4.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" +checksum = "5d029b67f89d30bbb547c89fd5161293c0aec155fc691d7924b64550662db93e" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -315,9 +314,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "cobs" @@ -335,9 +334,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "core-foundation-sys" @@ -611,7 +610,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -628,7 +627,7 @@ checksum = "7e5768da2206272c81ef0b5e951a41862938a6070da63bcea197899942d3b947" dependencies = [ "cfg-if", "rustix", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -648,7 +647,7 @@ checksum = "033b337d725b97690d86893f9de22b67b80dcc4e9ad815f348254c38119db8fb" dependencies = [ "io-lifetimes", "rustix", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -866,7 +865,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c9f046b9af244f13b3bd939f55d16830ac3a201e8a9ba9661bfcb03e2be72b9b" dependencies = [ "io-lifetimes", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -883,9 +882,9 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" @@ -924,9 +923,9 @@ dependencies = [ [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] @@ -1030,30 +1029,21 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" -dependencies = [ - "libc", - "wasi", - "windows-sys 0.48.0", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" dependencies = [ "hermit-abi", "libc", + "wasi", + "windows-sys", ] [[package]] name = "object" -version = "0.36.1" +version = "0.36.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" +checksum = "3f203fa8daa7bb185f760ae12bd8e097f63d17041dcdcaf675ac54cdf863170e" dependencies = [ "crc32fast", "hashbrown 0.14.5", @@ -1110,9 +1100,12 @@ dependencies = [ [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "dee4364d9f3b902ef14fab8a1ddffb783a1cb6b4bba3bfc1fa3922732c7de97f" +dependencies = [ + "zerocopy 0.6.6", +] [[package]] name = "prettyplease" @@ -1267,7 +1260,7 @@ dependencies = [ "libc", "linux-raw-sys", "once_cell", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -1304,20 +1297,21 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.120" +version = "1.0.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +checksum = "4ab380d7d9f22ef3f21ad3e6c1ebe8e4fc7a2000ccba2e4d71fc96f15b2cb609" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] [[package]] name = "serde_spanned" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] @@ -1364,7 +1358,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -1396,9 +1390,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" -version = "2.0.70" +version = "2.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16" +checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" dependencies = [ "proc-macro2", "quote", @@ -1417,15 +1411,15 @@ dependencies = [ "fd-lock", "io-lifetimes", "rustix", - "windows-sys 0.52.0", + "windows-sys", "winx", ] [[package]] name = "target-lexicon" -version = "0.12.15" +version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4873307b7c257eddcb50c9bedf158eb669578359fb28428bef438fec8e6ba7c2" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "test-artifacts" @@ -1436,10 +1430,10 @@ name = "test-helpers" version = "0.0.0" dependencies = [ "codegen-macro", - "wasm-encoder 0.214.0", + "wasm-encoder 0.215.0", "wit-bindgen-core", "wit-component", - "wit-parser 0.214.0", + "wit-parser 0.215.0", ] [[package]] @@ -1452,18 +1446,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", @@ -1487,25 +1481,24 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.38.0" +version = "1.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "pin-project-lite", "socket2", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] name = "toml" -version = "0.8.14" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", @@ -1515,18 +1508,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.15" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59a3a72298453f564e2b111fa896f8d07fabb36f51f06d7e875fc5e0b5a3ef1" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ "indexmap", "serde", @@ -1639,9 +1632,9 @@ checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wasi" @@ -1714,19 +1707,19 @@ dependencies = [ [[package]] name = "wasm-encoder" -version = "0.214.0" +version = "0.215.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff694f02a8d7a50b6922b197ae03883fbf18cdb2ae9fbee7b6148456f5f44041" +checksum = "4fb56df3e06b8e6b77e37d2969a50ba51281029a9aeb3855e76b7f49b6418847" dependencies = [ "leb128", - "wasmparser 0.214.0", + "wasmparser 0.215.0", ] [[package]] name = "wasm-metadata" -version = "0.214.0" +version = "0.215.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "865c5bff5f7a3781b5f92ea4cfa99bb38267da097441cdb09080de1568ef3075" +checksum = "0c6bb07c5576b608f7a2a9baa2294c1a3584a249965d695a9814a496cb6d232f" dependencies = [ "anyhow", "indexmap", @@ -1734,8 +1727,8 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder 0.214.0", - "wasmparser 0.214.0", + "wasm-encoder 0.215.0", + "wasmparser 0.215.0", ] [[package]] @@ -1754,9 +1747,9 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.214.0" +version = "0.215.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5309c1090e3e84dad0d382f42064e9933fdaedb87e468cc239f0eabea73ddcb6" +checksum = "53fbde0881f24199b81cf49b6ff8f9c145ac8eb1b7fc439adb5c099734f7d90e" dependencies = [ "ahash", "bitflags", @@ -1829,7 +1822,7 @@ dependencies = [ "wasmtime-versioned-export-macros", "wasmtime-winch", "wat", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -1857,7 +1850,7 @@ dependencies = [ "serde_derive", "sha2", "toml", - "windows-sys 0.52.0", + "windows-sys", "zstd", ] @@ -1943,7 +1936,7 @@ dependencies = [ "rustix", "wasmtime-asm-macros", "wasmtime-versioned-export-macros", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -1967,7 +1960,7 @@ dependencies = [ "anyhow", "cfg-if", "libc", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -2028,7 +2021,7 @@ dependencies = [ "url", "wasmtime", "wiggle", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -2071,24 +2064,24 @@ dependencies = [ [[package]] name = "wast" -version = "214.0.0" +version = "215.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "694bcdb24c49c8709bd8713768b71301a11e823923eee355d530f1d8d0a7f8e9" +checksum = "1ff1d00d893593249e60720be04a7c1f42f1c4dc3806a2869f4e66ab61eb54cb" dependencies = [ "bumpalo", "leb128", "memchr", "unicode-width", - "wasm-encoder 0.214.0", + "wasm-encoder 0.215.0", ] [[package]] name = "wat" -version = "1.214.0" +version = "1.215.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "347249eb56773fa728df2656cfe3a8c19437ded61a922a0b5e0839d9790e278e" +checksum = "670bf4d9c8cf76ae242d70ded47c546525b6dafaa6871f9bcb065344bf2b4e3d" dependencies = [ - "wast 214.0.0", + "wast 215.0.0", ] [[package]] @@ -2178,16 +2171,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", + "windows-targets", ] [[package]] @@ -2196,22 +2180,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] @@ -2220,46 +2189,28 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -2272,48 +2223,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -2322,9 +2249,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.13" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] @@ -2336,7 +2263,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9643b83820c0cd246ecabe5fa454dd04ba4fa67996369466d0747472d337346" dependencies = [ "bitflags", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -2355,11 +2282,11 @@ dependencies = [ "clap", "heck 0.5.0", "test-helpers", - "wasm-encoder 0.214.0", + "wasm-encoder 0.215.0", "wasm-metadata", "wit-bindgen-core", "wit-component", - "wit-parser 0.214.0", + "wit-parser 0.215.0", ] [[package]] @@ -2370,8 +2297,8 @@ dependencies = [ "clap", "heck 0.5.0", "test-artifacts", - "wasm-encoder 0.214.0", - "wasmparser 0.214.0", + "wasm-encoder 0.215.0", + "wasmparser 0.215.0", "wasmtime", "wasmtime-wasi", "wit-bindgen-c", @@ -2382,7 +2309,7 @@ dependencies = [ "wit-bindgen-rust", "wit-bindgen-teavm-java", "wit-component", - "wit-parser 0.214.0", + "wit-parser 0.215.0", ] [[package]] @@ -2391,7 +2318,7 @@ version = "0.28.0" dependencies = [ "anyhow", "heck 0.5.0", - "wit-parser 0.214.0", + "wit-parser 0.215.0", ] [[package]] @@ -2403,12 +2330,12 @@ dependencies = [ "heck 0.5.0", "indexmap", "test-helpers", - "wasm-encoder 0.214.0", + "wasm-encoder 0.215.0", "wasm-metadata", - "wasmparser 0.214.0", + "wasmparser 0.215.0", "wit-bindgen-core", "wit-component", - "wit-parser 0.214.0", + "wit-parser 0.215.0", ] [[package]] @@ -2489,9 +2416,9 @@ dependencies = [ [[package]] name = "wit-component" -version = "0.214.0" +version = "0.215.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd9fd46f0e783bf80f1ab7291f9d442fa5553ff0e96cdb71964bd8859b734b55" +checksum = "f725e3885fc5890648be5c5cbc1353b755dc932aa5f1aa7de968b912a3280743" dependencies = [ "anyhow", "bitflags", @@ -2500,11 +2427,11 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder 0.214.0", + "wasm-encoder 0.215.0", "wasm-metadata", - "wasmparser 0.214.0", + "wasmparser 0.215.0", "wat", - "wit-parser 0.214.0", + "wit-parser 0.215.0", ] [[package]] @@ -2527,9 +2454,9 @@ dependencies = [ [[package]] name = "wit-parser" -version = "0.214.0" +version = "0.215.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "681d526d6ea42e28f9afe9eae2b50e0b0a627aef8822c75eb04078db84d03e57" +checksum = "935a97eaffd57c3b413aa510f8f0b550a4a9fe7d59e79cd8b89a83dcb860321f" dependencies = [ "anyhow", "id-arena", @@ -2540,7 +2467,7 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser 0.214.0", + "wasmparser 0.215.0", ] [[package]] @@ -2555,13 +2482,34 @@ dependencies = [ "wast 35.0.2", ] +[[package]] +name = "zerocopy" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "854e949ac82d619ee9a14c66a1b674ac730422372ccb759ce0c39cabcf2bf8e6" +dependencies = [ + "byteorder", + "zerocopy-derive 0.6.6", +] + [[package]] name = "zerocopy" version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ - "zerocopy-derive", + "zerocopy-derive 0.7.35", +] + +[[package]] +name = "zerocopy-derive" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "125139de3f6b9d625c39e2efdd73d41bdac468ccd556556440e322be0e1bbd91" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 87abd95f..65fd2026 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.214.0" -wasm-encoder = "0.214.0" -wasm-metadata = "0.214.0" -wit-parser = "0.214.0" -wit-component = "0.214.0" +wasmparser = "0.215.0" +wasm-encoder = "0.215.0" +wasm-metadata = "0.215.0" +wit-parser = "0.215.0" +wit-component = "0.215.0" wit-bindgen-core = { path = 'crates/core', version = '0.28.0' } wit-bindgen-c = { path = 'crates/c', version = '0.28.0' } diff --git a/crates/c/tests/codegen.rs b/crates/c/tests/codegen.rs index 43213689..7546cd84 100644 --- a/crates/c/tests/codegen.rs +++ b/crates/c/tests/codegen.rs @@ -94,7 +94,7 @@ fn rename_option() -> Result<()> { opts.rename.push(("c".to_string(), "rename3".to_string())); let mut resolve = Resolve::default(); - let pkgs = resolve.push_group(UnresolvedPackageGroup::parse( + let pkg = resolve.push_group(UnresolvedPackageGroup::parse( "input.wit", r#" package foo:bar; @@ -118,7 +118,7 @@ fn rename_option() -> Result<()> { } "#, )?)?; - let world = resolve.select_world(&pkgs, None)?; + let world = resolve.select_world(pkg, None)?; let mut files = Default::default(); opts.build().generate(&resolve, world, &mut files)?; for (file, contents) in files.iter() { diff --git a/crates/csharp/src/lib.rs b/crates/csharp/src/lib.rs index d454505d..4223b944 100644 --- a/crates/csharp/src/lib.rs +++ b/crates/csharp/src/lib.rs @@ -471,9 +471,9 @@ impl WorldGenerator for CSharp { {{ get {{ - if (Tag == OK) + if (Tag == OK) return (Ok)value; - else + else throw new ArgumentException("expected OK, got " + Tag); }} }} @@ -503,23 +503,23 @@ impl WorldGenerator for CSharp { {access} class Option {{ private static Option none = new (); - + private Option() {{ HasValue = false; }} - + {access} Option(T v) {{ HasValue = true; Value = v; }} - + {access} static Option None => none; - + [MemberNotNullWhen(true, nameof(Value))] {access} bool HasValue {{ get; }} - + {access} T? Value {{ get; }} }} "#, @@ -753,13 +753,14 @@ impl WorldGenerator for CSharp { // intended to be used non-interactively at link time, the // linker will have no additional information to resolve such // ambiguity. - let (resolve, _) = + let (resolve, world) = wit_parser::decoding::decode_world(&wit_component::metadata::encode( &resolve, id, self.opts.string_encoding, None, )?)?; + let pkg = resolve.worlds[world].package.unwrap(); files.push( &format!("{world_namespace}_component_type.wit"), @@ -767,12 +768,12 @@ impl WorldGenerator for CSharp { .emit_docs(false) .print( &resolve, + pkg, &resolve .packages .iter() - .map(|(id, _)| id) + .filter_map(|(id, _)| if id == pkg { None } else { Some(id) }) .collect::>(), - false, )? .as_bytes(), ); @@ -1494,7 +1495,7 @@ impl InterfaceGenerator<'_> { [DllImport("{module_name}", EntryPoint = "[resource-drop]{name}"), WasmImportLinkage] private static extern void wasmImportResourceDrop(int p0); - + protected virtual void Dispose(bool disposing) {{ if (Handle != 0) {{ wasmImportResourceDrop(Handle); @@ -1564,7 +1565,7 @@ impl InterfaceGenerator<'_> { [DllImport("{module_name}", EntryPoint = "[resource-new]{name}"), WasmImportLinkage] internal static extern int wasmImportResourceNew(int p0); - + [DllImport("{module_name}", EntryPoint = "[resource-rep]{name}"), WasmImportLinkage] internal static extern int wasmImportResourceRep(int p0); }} @@ -1844,15 +1845,15 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for InterfaceGenerator<'a> { let tag = case.name.to_shouty_snake_case(); let ty = self.type_name(ty); format!( - r#"{access} {ty} As{case_name} - {{ - get + r#"{access} {ty} As{case_name} + {{ + get {{ - if (Tag == {tag}) + if (Tag == {tag}) return ({ty})value!; - else + else throw new ArgumentException("expected {tag}, got " + Tag); - }} + }} }} "# ) @@ -2584,8 +2585,8 @@ impl Bindgen for FunctionBindgen<'_, '_> { uwrite!( self.src, " - var {array} = new {ty}[{length}]; - new Span<{ty}>((void*)({address}), {length}).CopyTo(new Span<{ty}>({array})); + var {array} = new {ty}[{length}]; + new Span<{ty}>((void*)({address}), {length}).CopyTo(new Span<{ty}>({array})); " ); diff --git a/crates/guest-rust/macro/src/lib.rs b/crates/guest-rust/macro/src/lib.rs index d4de77f6..e9a6151b 100644 --- a/crates/guest-rust/macro/src/lib.rs +++ b/crates/guest-rust/macro/src/lib.rs @@ -149,8 +149,7 @@ impl Parse for Config { } let (resolve, pkgs, files) = parse_source(&source, &features).map_err(|err| anyhow_to_syn(call_site, err))?; - let world = resolve - .select_world(&pkgs, world.as_deref()) + let world = select_world(&resolve, &pkgs, world.as_deref()) .map_err(|e| anyhow_to_syn(call_site, e))?; Ok(Config { opts, @@ -161,6 +160,43 @@ impl Parse for Config { } } +fn select_world( + resolve: &Resolve, + pkgs: &[PackageId], + world: Option<&str>, +) -> anyhow::Result { + if pkgs.len() == 1 { + resolve.select_world(pkgs[0], world) + } else { + assert!(!pkgs.is_empty()); + match world { + Some(name) => { + if !name.contains(":") { + anyhow::bail!( + "with multiple packages a fully qualified \ + world name must be specified" + ) + } + + // This will ignore the package argument due to the fully + // qualified name being used. + resolve.select_world(pkgs[0], world) + } + None => { + let worlds = pkgs + .iter() + .filter_map(|p| resolve.select_world(*p, None).ok()) + .collect::>(); + match &worlds[..] { + [] => anyhow::bail!("no packages have a world"), + [world] => Ok(*world), + _ => anyhow::bail!("multiple packages have a world, must specify which to use"), + } + } + } + } +} + /// Parse the source fn parse_source( source: &Option, @@ -182,7 +218,7 @@ fn parse_source( Err(_) => p.to_path_buf(), }; let (pkg, sources) = resolve.push_path(normalized_path)?; - pkgs.extend(pkg); + pkgs.push(pkg); files.extend(sources); } Ok(()) @@ -192,7 +228,7 @@ fn parse_source( if let Some(p) = path { parse(p)?; } - pkgs = resolve.push_group(UnresolvedPackageGroup::parse("macro-input", s)?)?; + pkgs.push(resolve.push_group(UnresolvedPackageGroup::parse("macro-input", s)?)?); } Some(Source::Paths(p)) => parse(p)?, None => parse(&vec![root.join("wit")])?, diff --git a/crates/rust/tests/codegen.rs b/crates/rust/tests/codegen.rs index bc0dbed4..f68491f5 100644 --- a/crates/rust/tests/codegen.rs +++ b/crates/rust/tests/codegen.rs @@ -494,7 +494,7 @@ mod generate_unused_types { mod gated_features { wit_bindgen::generate!({ inline: r#" - package foo:bar; + package foo:bar@1.2.3; world bindings { @unstable(feature = x) @@ -519,10 +519,10 @@ mod simple_with_option { mod a { wit_bindgen::generate!({ inline: r#" - package foo:bar { - interface a { - x: func(); - } + package foo:bar; + + interface a { + x: func(); } package foo:baz { @@ -539,10 +539,10 @@ mod simple_with_option { mod b { wit_bindgen::generate!({ inline: r#" - package foo:bar { - interface a { - x: func(); - } + package foo:bar; + + interface a { + x: func(); } package foo:baz { diff --git a/crates/rust/tests/codegen_no_std.rs b/crates/rust/tests/codegen_no_std.rs index a2665f6e..6c2db154 100644 --- a/crates/rust/tests/codegen_no_std.rs +++ b/crates/rust/tests/codegen_no_std.rs @@ -6,10 +6,6 @@ #![allow(unused_macros)] #![allow(dead_code, unused_variables)] -// This test expects `"std"` to be absent. -#[cfg(feature = "std")] -fn std_enabled() -> CompileError; - extern crate alloc; mod codegen_tests { diff --git a/crates/test-helpers/src/lib.rs b/crates/test-helpers/src/lib.rs index 392ec23e..32ea36bc 100644 --- a/crates/test-helpers/src/lib.rs +++ b/crates/test-helpers/src/lib.rs @@ -1,6 +1,4 @@ pub use codegen_macro::*; -#[cfg(feature = "runtime-macro")] -pub use runtime_macro::*; use std::fs; use std::path::{Path, PathBuf}; @@ -143,10 +141,10 @@ pub fn run_component_codegen_test( fn parse_wit(path: &Path) -> (Resolve, WorldId) { let mut resolve = Resolve::default(); - let (pkgs, _files) = resolve.push_path(path).unwrap(); - let world = resolve.select_world(&pkgs, None).unwrap_or_else(|_| { + let (pkg, _files) = resolve.push_path(path).unwrap(); + let world = resolve.select_world(pkg, None).unwrap_or_else(|_| { // note: if there are multiples worlds in the wit package, we assume the "imports" world - resolve.select_world(&pkgs, Some("imports")).unwrap() + resolve.select_world(pkg, Some("imports")).unwrap() }); (resolve, world) } diff --git a/src/bin/wit-bindgen.rs b/src/bin/wit-bindgen.rs index 7e3c7442..ed9134fc 100644 --- a/src/bin/wit-bindgen.rs +++ b/src/bin/wit-bindgen.rs @@ -192,8 +192,8 @@ fn gen_world( resolve.features.insert(feature.to_string()); } } - let (pkgs, _files) = resolve.push_path(&opts.wit)?; - let world = resolve.select_world(&pkgs, opts.world.as_deref())?; + let (pkg, _files) = resolve.push_path(&opts.wit)?; + let world = resolve.select_world(pkg, opts.world.as_deref())?; generator.generate(&resolve, world, files)?; Ok(()) diff --git a/tests/runtime/main.rs b/tests/runtime/main.rs index cbcde599..d85cf350 100644 --- a/tests/runtime/main.rs +++ b/tests/runtime/main.rs @@ -777,7 +777,7 @@ fn tests(name: &str, dir_name: &str) -> Result> { #[allow(dead_code)] // not used by all generators fn resolve_wit_dir(dir: &PathBuf) -> (Resolve, WorldId) { let mut resolve = Resolve::new(); - let (pkgs, _files) = resolve.push_path(dir).unwrap(); - let world = resolve.select_world(&pkgs, None).unwrap(); + let (pkg, _files) = resolve.push_path(dir).unwrap(); + let world = resolve.select_world(pkg, None).unwrap(); (resolve, world) } From 5d9964c558ccd4704cb606ef3ea15fd23a122078 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Thu, 1 Aug 2024 12:15:40 -0600 Subject: [PATCH 15/24] make imported resource `THandle` struct and ctor public (#1017) Originally, I made these `internal` rather than `public` since they aren't meant to be used in application code. However, that prevents an important use case: splitting the bindings across assemblies. In particular, when targetting a world that includes exports, it's useful to put the generated types and imports in a reusable library, but we can't put the exports in that library since the application code should be providing the entry points. This is analogous to how a CLI library might provide utilities for e.g. parsing command line options, but still leave it to the application to provide a `static int Main` function. In the case of a world that includes one or more exports, we'll want to put the generated code for those exports in the application assembly and put everything else in the library. However, the export code may need to be able to marshal raw resource handles into the appropriate object wrapper for that resource type, and that requires access to the `THandle` struct and corresponding constructor for that class. Signed-off-by: Joel Dice --- crates/csharp/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/csharp/src/lib.rs b/crates/csharp/src/lib.rs index 4223b944..0c584dfc 100644 --- a/crates/csharp/src/lib.rs +++ b/crates/csharp/src/lib.rs @@ -1482,9 +1482,9 @@ impl InterfaceGenerator<'_> { {access} class {upper_camel}: IDisposable {{ internal int Handle {{ get; set; }} - internal readonly record struct THandle(int Handle); + {access} readonly record struct THandle(int Handle); - internal {upper_camel}(THandle handle) {{ + {access} {upper_camel}(THandle handle) {{ Handle = handle.Handle; }} From a0543ceb7544a1f51fdc09350166b179ef4c03e1 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 2 Aug 2024 13:03:47 -0500 Subject: [PATCH 16/24] Add `--all-features` to the CLI (#1015) Mirrors the `wasm-tools` CLI --- src/bin/wit-bindgen.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/bin/wit-bindgen.rs b/src/bin/wit-bindgen.rs index ed9134fc..48546be6 100644 --- a/src/bin/wit-bindgen.rs +++ b/src/bin/wit-bindgen.rs @@ -104,6 +104,12 @@ struct Common { /// This enables using `@unstable` annotations in WIT files. #[clap(long)] features: Vec, + + /// Whether or not to activate all WIT features when processing WIT files. + /// + /// This enables using `@unstable` annotations in WIT files. + #[clap(long)] + all_features: bool, } fn main() -> Result<()> { @@ -183,6 +189,7 @@ fn gen_world( files: &mut Files, ) -> Result<()> { let mut resolve = Resolve::default(); + resolve.all_features = opts.all_features; for features in opts.features.iter() { for feature in features .split(',') From a20a9497019fc6ad7c7d6f10d1a6dae8c127a392 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 2 Aug 2024 13:13:54 -0500 Subject: [PATCH 17/24] Release wit-bindgen 0.29.0 (#1016) [automatically-tag-and-release-this-commit] Co-authored-by: Auto Release Process --- Cargo.lock | 22 +++++++++--------- Cargo.toml | 18 +++++++------- crates/guest-rust/Cargo.toml | 4 ++-- crates/guest-rust/rt/src/cabi_realloc.c | 4 ++-- crates/guest-rust/rt/src/cabi_realloc.o | Bin 261 -> 261 bytes crates/guest-rust/rt/src/cabi_realloc.rs | 2 +- .../rt/src/libwit_bindgen_cabi_realloc.a | Bin 412 -> 412 bytes 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 648c1d97..39656d1d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2268,7 +2268,7 @@ dependencies = [ [[package]] name = "wit-bindgen" -version = "0.28.0" +version = "0.29.0" dependencies = [ "wit-bindgen-rt", "wit-bindgen-rust-macro", @@ -2276,7 +2276,7 @@ dependencies = [ [[package]] name = "wit-bindgen-c" -version = "0.28.0" +version = "0.29.0" dependencies = [ "anyhow", "clap", @@ -2291,7 +2291,7 @@ dependencies = [ [[package]] name = "wit-bindgen-cli" -version = "0.28.0" +version = "0.29.0" dependencies = [ "anyhow", "clap", @@ -2314,7 +2314,7 @@ dependencies = [ [[package]] name = "wit-bindgen-core" -version = "0.28.0" +version = "0.29.0" dependencies = [ "anyhow", "heck 0.5.0", @@ -2323,7 +2323,7 @@ dependencies = [ [[package]] name = "wit-bindgen-csharp" -version = "0.28.0" +version = "0.29.0" dependencies = [ "anyhow", "clap", @@ -2340,7 +2340,7 @@ dependencies = [ [[package]] name = "wit-bindgen-go" -version = "0.28.0" +version = "0.29.0" dependencies = [ "anyhow", "clap", @@ -2352,7 +2352,7 @@ dependencies = [ [[package]] name = "wit-bindgen-markdown" -version = "0.28.0" +version = "0.29.0" dependencies = [ "anyhow", "clap", @@ -2364,14 +2364,14 @@ dependencies = [ [[package]] name = "wit-bindgen-rt" -version = "0.28.0" +version = "0.29.0" dependencies = [ "bitflags", ] [[package]] name = "wit-bindgen-rust" -version = "0.28.0" +version = "0.29.0" dependencies = [ "anyhow", "clap", @@ -2390,7 +2390,7 @@ dependencies = [ [[package]] name = "wit-bindgen-rust-macro" -version = "0.28.0" +version = "0.29.0" dependencies = [ "anyhow", "prettyplease", @@ -2403,7 +2403,7 @@ dependencies = [ [[package]] name = "wit-bindgen-teavm-java" -version = "0.28.0" +version = "0.29.0" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index 65fd2026..072fa50b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ resolver = "2" [workspace.package] edition = "2021" -version = "0.28.0" +version = "0.29.0" license = "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT" repository = "https://github.com/bytecodealliance/wasi-rs" @@ -38,14 +38,14 @@ wasm-metadata = "0.215.0" wit-parser = "0.215.0" wit-component = "0.215.0" -wit-bindgen-core = { path = 'crates/core', version = '0.28.0' } -wit-bindgen-c = { path = 'crates/c', version = '0.28.0' } -wit-bindgen-rust = { path = "crates/rust", version = "0.28.0" } -wit-bindgen-teavm-java = { path = 'crates/teavm-java', version = '0.28.0' } -wit-bindgen-go = { path = 'crates/go', version = '0.28.0' } -wit-bindgen-csharp = { path = 'crates/csharp', version = '0.28.0' } -wit-bindgen-markdown = { path = 'crates/markdown', version = '0.28.0' } -wit-bindgen = { path = 'crates/guest-rust', version = '0.28.0', default-features = false } +wit-bindgen-core = { path = 'crates/core', version = '0.29.0' } +wit-bindgen-c = { path = 'crates/c', version = '0.29.0' } +wit-bindgen-rust = { path = "crates/rust", version = "0.29.0" } +wit-bindgen-teavm-java = { path = 'crates/teavm-java', version = '0.29.0' } +wit-bindgen-go = { path = 'crates/go', version = '0.29.0' } +wit-bindgen-csharp = { path = 'crates/csharp', version = '0.29.0' } +wit-bindgen-markdown = { path = 'crates/markdown', version = '0.29.0' } +wit-bindgen = { path = 'crates/guest-rust', version = '0.29.0', default-features = false } [[bin]] name = "wit-bindgen" diff --git a/crates/guest-rust/Cargo.toml b/crates/guest-rust/Cargo.toml index 43f2be1e..1dd9b8e9 100644 --- a/crates/guest-rust/Cargo.toml +++ b/crates/guest-rust/Cargo.toml @@ -12,8 +12,8 @@ Used when compiling Rust programs to the component model. """ [dependencies] -wit-bindgen-rust-macro = { path = "./macro", optional = true, version = "0.28.0" } -wit-bindgen-rt = { path = "./rt", version = "0.28.0", features = ["bitflags"] } +wit-bindgen-rust-macro = { path = "./macro", optional = true, version = "0.29.0" } +wit-bindgen-rt = { path = "./rt", version = "0.29.0", features = ["bitflags"] } [features] default = ["macros", "realloc"] diff --git a/crates/guest-rust/rt/src/cabi_realloc.c b/crates/guest-rust/rt/src/cabi_realloc.c index 3687f341..4e8fbb3a 100644 --- a/crates/guest-rust/rt/src/cabi_realloc.c +++ b/crates/guest-rust/rt/src/cabi_realloc.c @@ -2,9 +2,9 @@ #include -extern void *cabi_realloc_wit_bindgen_0_28_0(void *ptr, size_t old_size, size_t align, size_t new_size); +extern void *cabi_realloc_wit_bindgen_0_29_0(void *ptr, size_t old_size, size_t align, size_t new_size); __attribute__((__weak__, __export_name__("cabi_realloc"))) void *cabi_realloc(void *ptr, size_t old_size, size_t align, size_t new_size) { - return cabi_realloc_wit_bindgen_0_28_0(ptr, old_size, align, new_size); + return cabi_realloc_wit_bindgen_0_29_0(ptr, old_size, align, new_size); } diff --git a/crates/guest-rust/rt/src/cabi_realloc.o b/crates/guest-rust/rt/src/cabi_realloc.o index cdb99a32bf4341f9dfe598773e15b320ac99e8c1..1c1e8ef76b6ccf7ee2bfd8bef391324ed5d49f7c 100644 GIT binary patch delta 11 ScmZo=YGs<>$7ngxe;WW4M+3b8 delta 11 ScmZo=YGs<>$7nIpe;WW4Lj$}3 diff --git a/crates/guest-rust/rt/src/cabi_realloc.rs b/crates/guest-rust/rt/src/cabi_realloc.rs index 90af3234..63a22fba 100644 --- a/crates/guest-rust/rt/src/cabi_realloc.rs +++ b/crates/guest-rust/rt/src/cabi_realloc.rs @@ -1,7 +1,7 @@ // This file is generated by ./ci/rebuild-libcabi-realloc.sh #[no_mangle] -pub unsafe extern "C" fn cabi_realloc_wit_bindgen_0_28_0( +pub unsafe extern "C" fn cabi_realloc_wit_bindgen_0_29_0( old_ptr: *mut u8, old_len: usize, align: usize, diff --git a/crates/guest-rust/rt/src/libwit_bindgen_cabi_realloc.a b/crates/guest-rust/rt/src/libwit_bindgen_cabi_realloc.a index aa8111db9ab7935179377ef6f30dec7ded23c5a2..38c36c501ced36952d2f11cf532883a019739e95 100644 GIT binary patch delta 11 TcmbQkJcoJ06GqF4PqzaA8rB6G delta 11 TcmbQkJcoJ06Gn@PPqzaA8qx(B From 3f8e0fb6acc31a8bfe735d83169f0f6803b707da Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 5 Aug 2024 17:03:13 -0500 Subject: [PATCH 18/24] Update wasi-sdk/wasm-tools in CI (#1018) --- .github/actions/install-wasi-sdk/action.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/actions/install-wasi-sdk/action.yml b/.github/actions/install-wasi-sdk/action.yml index 48c4be0a..741e5165 100644 --- a/.github/actions/install-wasi-sdk/action.yml +++ b/.github/actions/install-wasi-sdk/action.yml @@ -5,22 +5,22 @@ runs: using: composite steps: - run: | - curl https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-22/wasi-sdk-22.0-linux.tar.gz -L | tar xzvf - - echo "WASI_SDK_PATH=`pwd`/wasi-sdk-22.0" >> $GITHUB_ENV + curl https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-24/wasi-sdk-24.0-x86_64-linux.tar.gz -L | tar xzvf - + echo "WASI_SDK_PATH=`pwd`/wasi-sdk-24.0-x86_64-linux" >> $GITHUB_ENV if: runner.os == 'Linux' shell: bash - run: | - curl https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-22/wasi-sdk-22.0-macos.tar.gz -L | tar xzvf - - echo "WASI_SDK_PATH=`pwd`/wasi-sdk-22.0" >> $GITHUB_ENV + curl https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-24/wasi-sdk-24.0-x86_64-macos.tar.gz -L | tar xzvf - + echo "WASI_SDK_PATH=`pwd`/wasi-sdk-24.0-x86_64-macos" >> $GITHUB_ENV if: runner.os == 'macOS' shell: bash - run: | - curl https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-22/wasi-sdk-22.0.m-mingw64.tar.gz -L | tar xzvf - - echo "WASI_SDK_PATH=`pwd`/wasi-sdk-22.0+m" >> $GITHUB_ENV + curl https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-24/wasi-sdk-24.0-x86_64-windows.tar.gz -L | tar xzvf - + echo "WASI_SDK_PATH=`pwd`/wasi-sdk-24.0-x86_64-windows" >> $GITHUB_ENV if: runner.os == 'Windows' shell: bash - name: Setup `wasm-tools` uses: bytecodealliance/actions/wasm-tools/setup@v1 with: - version: "1.0.60" + version: "1.215.0" github_token: ${{ github.token }} From 4ae027601a7cca0a1b6e500ca7302efdcce1abb8 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Mon, 12 Aug 2024 10:31:39 -0600 Subject: [PATCH 19/24] update C# generator to match latest ILC package (#1025) This also locks the ILC dependencies to a specific version to avoid future surprises. Signed-off-by: Joel Dice --- crates/csharp/src/csproj.rs | 34 +++++----------------------------- crates/csharp/src/lib.rs | 25 ------------------------- tests/runtime/main.rs | 20 +------------------- 3 files changed, 6 insertions(+), 73 deletions(-) diff --git a/crates/csharp/src/csproj.rs b/crates/csharp/src/csproj.rs index e6f62e10..626e89df 100644 --- a/crates/csharp/src/csproj.rs +++ b/crates/csharp/src/csproj.rs @@ -77,51 +77,27 @@ impl CSProjectLLVMBuilder { true {name} + - - + - + " ); if self.aot { - //TODO: Is this handled by the source generator? (Temporary just to test with numbers and strings) csproj.push_str( r#" - - - - - - - - + + - - - - - "#, ); - csproj.push_str(&format!(" - - - - " - )); - fs::write( self.dir.join("nuget.config"), r#" diff --git a/crates/csharp/src/lib.rs b/crates/csharp/src/lib.rs index 0c584dfc..e64bcd5d 100644 --- a/crates/csharp/src/lib.rs +++ b/crates/csharp/src/lib.rs @@ -692,31 +692,6 @@ impl WorldGenerator for CSharp { } if !self.opts.skip_support_files { - let cabi_relloc_src = r#" - #include - - /* Done in C so we can avoid initializing the dotnet runtime and hence WASI libc */ - /* It would be preferable to do this in C# but the constraints of cabi_realloc and the demands */ - /* of WASI libc prevent us doing so. */ - /* See https://github.com/bytecodealliance/wit-bindgen/issues/777 */ - /* and https://github.com/WebAssembly/wasi-libc/issues/452 */ - /* The component model `start` function might be an alternative to this depending on whether it */ - /* has the same constraints as `cabi_realloc` */ - __attribute__((__weak__, __export_name__("cabi_realloc"))) - void *cabi_realloc(void *ptr, size_t old_size, size_t align, size_t new_size) { - (void) old_size; - if (new_size == 0) return (void*) align; - void *ret = realloc(ptr, new_size); - if (!ret) abort(); - return ret; - } - "#; - - files.push( - &format!("{name}World_cabi_realloc.c"), - indent(cabi_relloc_src).as_bytes(), - ); - //TODO: This is currently needed for mono even if it's built as a library. if self.opts.runtime == CSharpRuntime::Mono { files.push( diff --git a/tests/runtime/main.rs b/tests/runtime/main.rs index d85cf350..238dc22e 100644 --- a/tests/runtime/main.rs +++ b/tests/runtime/main.rs @@ -749,25 +749,7 @@ fn tests(name: &str, dir_name: &str) -> Result> { panic!("failed to compile"); } - // Translate the canonical ABI module into a component. - - let module = fs::read(&wasm_filename).expect("failed to read wasm file"); - let component = ComponentEncoder::default() - .module(module.as_slice()) - .expect("pull custom sections from module") - .validate(true) - .adapter("wasi_snapshot_preview1", &wasi_adapter) - .expect("adapter failed to get loaded") - .realloc_via_memory_grow(true) - .encode() - .expect(&format!( - "module {:?} can be translated to a component", - out_wasm - )); - let component_path = out_wasm.with_extension("component.wasm"); - fs::write(&component_path, component).expect("write component to disk"); - - result.push(component_path); + result.push(wasm_filename); } } From 85ff1e7454ee811a64c7161e8b46c54297b2b2e2 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Mon, 12 Aug 2024 11:41:32 -0600 Subject: [PATCH 20/24] C#: remove obsolete component type object code (#1026) This code is no longer needed now that the .NET runtime uses WIT files to represent the component type instead. Signed-off-by: Joel Dice --- crates/csharp/src/component_type_object.rs | 58 ---------------------- crates/csharp/src/lib.rs | 9 ---- 2 files changed, 67 deletions(-) delete mode 100644 crates/csharp/src/component_type_object.rs diff --git a/crates/csharp/src/component_type_object.rs b/crates/csharp/src/component_type_object.rs deleted file mode 100644 index 671d1dd9..00000000 --- a/crates/csharp/src/component_type_object.rs +++ /dev/null @@ -1,58 +0,0 @@ -use anyhow::Result; -use heck::ToSnakeCase; -use wasm_encoder::{ - CodeSection, CustomSection, Function, FunctionSection, LinkingSection, Module, SymbolTable, - TypeSection, -}; -use wit_bindgen_core::wit_parser::{Resolve, WorldId}; -use wit_component::StringEncoding; - -pub fn linking_symbol(name: &str) -> String { - let snake = name.to_snake_case(); - format!("__component_type_object_force_link_{snake}") -} - -pub fn object(resolve: &Resolve, world: WorldId, encoding: StringEncoding) -> Result> { - let mut module = Module::new(); - - // Build a module with one function that's a "dummy function" - let mut types = TypeSection::new(); - types.function([], []); - module.section(&types); - let mut funcs = FunctionSection::new(); - funcs.function(0); - module.section(&funcs); - let mut code = CodeSection::new(); - code.function(&Function::new([])); - module.section(&code); - - let mut producers = wasm_metadata::Producers::empty(); - producers.add( - "processed-by", - env!("CARGO_PKG_NAME"), - env!("CARGO_PKG_VERSION"), - ); - let data = wit_component::metadata::encode(resolve, world, encoding, Some(&producers)).unwrap(); - - // The custom section name here must start with "component-type" but - // otherwise is attempted to be unique here to ensure that this doesn't get - // concatenated to other custom sections by LLD by accident since LLD will - // concatenate custom sections of the same name. - let world_name = &resolve.worlds[world].name; - let section_name = format!("component-type:{world_name}"); - - // Add our custom section - module.section(&CustomSection { - name: std::borrow::Cow::Borrowed(§ion_name), - data: std::borrow::Cow::Borrowed(data.as_slice()), - }); - - // Append the linking section, so that lld knows the custom section's symbol name - let mut linking = LinkingSection::new(); - let mut symbols = SymbolTable::new(); - symbols.function(0, 0, Some(&linking_symbol(&world_name))); - linking.symbol_table(&symbols); - module.section(&linking); - - Ok(module.finish()) -} diff --git a/crates/csharp/src/lib.rs b/crates/csharp/src/lib.rs index e64bcd5d..bfa54a76 100644 --- a/crates/csharp/src/lib.rs +++ b/crates/csharp/src/lib.rs @@ -1,5 +1,3 @@ -mod component_type_object; - use anyhow::Result; use heck::{ToLowerCamelCase, ToShoutySnakeCase, ToUpperCamelCase}; use indexmap::IndexMap; @@ -754,13 +752,6 @@ impl WorldGenerator for CSharp { ); } - files.push( - &format!("{world_namespace}_component_type.o",), - component_type_object::object(resolve, id, self.opts.string_encoding) - .unwrap() - .as_slice(), - ); - // TODO: remove when we switch to dotnet 9 let mut wasm_import_linakge_src = String::new(); From 82793b3b26e67a4c61125e14f313af6dd31a1340 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 12 Aug 2024 12:43:11 -0500 Subject: [PATCH 21/24] Fix a feature check for threads in wasm (#1024) Closes #1022 --- crates/rust/src/interface.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/rust/src/interface.rs b/crates/rust/src/interface.rs index 2eb5dc87..963c15de 100644 --- a/crates/rust/src/interface.rs +++ b/crates/rust/src/interface.rs @@ -1988,7 +1988,7 @@ impl {camel} {{ use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe {{ - assert!(!cfg!(target_feature = "threads")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE {{ Some(ty) => assert!(ty == id, "cannot use two types with this resource type"), From 2114c762d933305cec4b944e07e57e3d19bb65c0 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 12 Aug 2024 12:43:27 -0500 Subject: [PATCH 22/24] Add an option to opt-out of `#[used]` statics (#1021) This is not needed for the wasi_snapshot_preview1 adapter in Wasmtime and is causing issues with LLVM 19, so add an option to turn it off which will be enabled in Wasmtime. --- crates/guest-rust/macro/src/lib.rs | 9 +++++++++ crates/guest-rust/src/lib.rs | 6 ++++++ crates/rust/src/interface.rs | 17 +++++++++++++---- crates/rust/src/lib.rs | 15 +++++++++++++-- crates/rust/tests/codegen.rs | 16 ++++++++++++++++ 5 files changed, 57 insertions(+), 6 deletions(-) diff --git a/crates/guest-rust/macro/src/lib.rs b/crates/guest-rust/macro/src/lib.rs index e9a6151b..c6cb439b 100644 --- a/crates/guest-rust/macro/src/lib.rs +++ b/crates/guest-rust/macro/src/lib.rs @@ -137,6 +137,9 @@ impl Parse for Config { Opt::Features(f) => { features.extend(f.into_iter().map(|f| f.value())); } + Opt::DisableCustomSectionLinkHelpers(disable) => { + opts.disable_custom_section_link_helpers = disable.value(); + } } } } else { @@ -309,6 +312,7 @@ mod kw { syn::custom_keyword!(pub_export_macro); syn::custom_keyword!(generate_unused_types); syn::custom_keyword!(features); + syn::custom_keyword!(disable_custom_section_link_helpers); } #[derive(Clone)] @@ -361,6 +365,7 @@ enum Opt { PubExportMacro(syn::LitBool), GenerateUnusedTypes(syn::LitBool), Features(Vec), + DisableCustomSectionLinkHelpers(syn::LitBool), } impl Parse for Opt { @@ -504,6 +509,10 @@ impl Parse for Opt { syn::bracketed!(contents in input); let list = Punctuated::<_, Token![,]>::parse_terminated(&contents)?; Ok(Opt::Features(list.into_iter().collect())) + } else if l.peek(kw::disable_custom_section_link_helpers) { + input.parse::()?; + input.parse::()?; + Ok(Opt::DisableCustomSectionLinkHelpers(input.parse()?)) } else { Err(l.error()) } diff --git a/crates/guest-rust/src/lib.rs b/crates/guest-rust/src/lib.rs index f58b6c12..a804cfa5 100644 --- a/crates/guest-rust/src/lib.rs +++ b/crates/guest-rust/src/lib.rs @@ -812,6 +812,12 @@ /// // /// // By default this is an empty list. /// features: ["foo", "bar", "baz"], +/// +/// // Disables generation of a `#[used]` static to try harder to get the +/// // custom section describing WIT types linked into the binary when +/// // used in library-like situations. This is `false` by default with +/// // `#[used]` statics being emitted. +/// disable_custom_section_link_helpers: false, /// }); /// ``` /// diff --git a/crates/rust/src/interface.rs b/crates/rust/src/interface.rs index 963c15de..98d2465b 100644 --- a/crates/rust/src/interface.rs +++ b/crates/rust/src/interface.rs @@ -425,14 +425,23 @@ macro_rules! {macro_name} {{ pub fn finish_append_submodule(mut self, snake: &str, module_path: Vec) { let module = self.finish(); let path_to_root = self.path_to_root(); + let used_static = if self.gen.opts.disable_custom_section_link_helpers { + String::new() + } else { + format!( + "\ + #[used] + #[doc(hidden)] + static __FORCE_SECTION_REF: fn() = + {path_to_root}__link_custom_section_describing_imports; + " + ) + }; let module = format!( "\ #[allow(dead_code, clippy::all)] pub mod {snake} {{ - #[used] - #[doc(hidden)] - #[cfg(target_arch = \"wasm32\")] - static __FORCE_SECTION_REF: fn() = {path_to_root}__link_custom_section_describing_imports; + {used_static} {module} }} ", diff --git a/crates/rust/src/lib.rs b/crates/rust/src/lib.rs index de76c75e..f5d05513 100644 --- a/crates/rust/src/lib.rs +++ b/crates/rust/src/lib.rs @@ -226,6 +226,14 @@ pub struct Opts { /// Whether to generate unused structures, not generated by default (false) #[cfg_attr(feature = "clap", arg(long))] pub generate_unused_types: bool, + + /// Whether or not to generate helper function/constants to help link custom + /// sections into the final output. + /// + /// Disabling this can shave a few bytes off a binary but makes + /// library-based usage of `generate!` prone to breakage. + #[cfg_attr(feature = "clap", arg(long))] + pub disable_custom_section_link_helpers: bool, } impl Opts { @@ -816,7 +824,6 @@ macro_rules! __export_{world_name}_impl {{ " #[inline(never)] #[doc(hidden)] - #[cfg(target_arch = \"wasm32\")] pub fn {func_name}() {{ {rt}::maybe_link_cabi_realloc(); }} @@ -1075,7 +1082,11 @@ impl WorldGenerator for RustWasm { resolve_to_encode, world_to_encode, "encoded world", - Some("__link_custom_section_describing_imports"), + if self.opts.disable_custom_section_link_helpers { + None + } else { + Some("__link_custom_section_describing_imports") + }, ); if self.opts.stubs { diff --git a/crates/rust/tests/codegen.rs b/crates/rust/tests/codegen.rs index f68491f5..b5757b3d 100644 --- a/crates/rust/tests/codegen.rs +++ b/crates/rust/tests/codegen.rs @@ -572,3 +572,19 @@ mod multiple_paths { generate_all, }); } + +#[allow(unused)] +mod generate_custom_section_link_helpers { + wit_bindgen::generate!({ + inline: r#" + package a:b; + + world test { + import a: interface { + x: func(); + } + } + "#, + disable_custom_section_link_helpers: true, + }); +} From a98ed6d9ff37dc34ea0d1ae4903dbae10bd838dd Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Mon, 12 Aug 2024 12:35:36 -0600 Subject: [PATCH 23/24] C#: make imported functions public by default (#1027) This allows them to be called from other assemblies. Signed-off-by: Joel Dice --- crates/csharp/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/csharp/src/lib.rs b/crates/csharp/src/lib.rs index bfa54a76..12f8ad6e 100644 --- a/crates/csharp/src/lib.rs +++ b/crates/csharp/src/lib.rs @@ -978,6 +978,8 @@ impl InterfaceGenerator<'_> { } }; + let access = self.gen.access_modifier(); + let extra_modifiers = extra_modifiers(func, &camel_name); let interop_camel_name = func.item_name().to_upper_camel_case(); @@ -1106,7 +1108,7 @@ impl InterfaceGenerator<'_> { uwrite!( target, r#" - internal {extra_modifiers} {modifiers} unsafe {result_type} {camel_name}({params}) + {access} {extra_modifiers} {modifiers} unsafe {result_type} {camel_name}({params}) {{ {src} //TODO: free alloc handle (interopString) if exists From 7b4d9e5165ef49731d05d53210f2d8f8192ee78f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 12 Aug 2024 14:11:46 -0500 Subject: [PATCH 24/24] Release wit-bindgen 0.30.0 (#1028) [automatically-tag-and-release-this-commit] Co-authored-by: Auto Release Process --- Cargo.lock | 22 +++++++++--------- Cargo.toml | 18 +++++++------- crates/guest-rust/Cargo.toml | 4 ++-- crates/guest-rust/rt/src/cabi_realloc.c | 4 ++-- crates/guest-rust/rt/src/cabi_realloc.o | Bin 261 -> 261 bytes crates/guest-rust/rt/src/cabi_realloc.rs | 2 +- .../rt/src/libwit_bindgen_cabi_realloc.a | Bin 412 -> 412 bytes 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 39656d1d..c25cf8de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2268,7 +2268,7 @@ dependencies = [ [[package]] name = "wit-bindgen" -version = "0.29.0" +version = "0.30.0" dependencies = [ "wit-bindgen-rt", "wit-bindgen-rust-macro", @@ -2276,7 +2276,7 @@ dependencies = [ [[package]] name = "wit-bindgen-c" -version = "0.29.0" +version = "0.30.0" dependencies = [ "anyhow", "clap", @@ -2291,7 +2291,7 @@ dependencies = [ [[package]] name = "wit-bindgen-cli" -version = "0.29.0" +version = "0.30.0" dependencies = [ "anyhow", "clap", @@ -2314,7 +2314,7 @@ dependencies = [ [[package]] name = "wit-bindgen-core" -version = "0.29.0" +version = "0.30.0" dependencies = [ "anyhow", "heck 0.5.0", @@ -2323,7 +2323,7 @@ dependencies = [ [[package]] name = "wit-bindgen-csharp" -version = "0.29.0" +version = "0.30.0" dependencies = [ "anyhow", "clap", @@ -2340,7 +2340,7 @@ dependencies = [ [[package]] name = "wit-bindgen-go" -version = "0.29.0" +version = "0.30.0" dependencies = [ "anyhow", "clap", @@ -2352,7 +2352,7 @@ dependencies = [ [[package]] name = "wit-bindgen-markdown" -version = "0.29.0" +version = "0.30.0" dependencies = [ "anyhow", "clap", @@ -2364,14 +2364,14 @@ dependencies = [ [[package]] name = "wit-bindgen-rt" -version = "0.29.0" +version = "0.30.0" dependencies = [ "bitflags", ] [[package]] name = "wit-bindgen-rust" -version = "0.29.0" +version = "0.30.0" dependencies = [ "anyhow", "clap", @@ -2390,7 +2390,7 @@ dependencies = [ [[package]] name = "wit-bindgen-rust-macro" -version = "0.29.0" +version = "0.30.0" dependencies = [ "anyhow", "prettyplease", @@ -2403,7 +2403,7 @@ dependencies = [ [[package]] name = "wit-bindgen-teavm-java" -version = "0.29.0" +version = "0.30.0" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index 072fa50b..c736f2d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ resolver = "2" [workspace.package] edition = "2021" -version = "0.29.0" +version = "0.30.0" license = "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT" repository = "https://github.com/bytecodealliance/wasi-rs" @@ -38,14 +38,14 @@ wasm-metadata = "0.215.0" wit-parser = "0.215.0" wit-component = "0.215.0" -wit-bindgen-core = { path = 'crates/core', version = '0.29.0' } -wit-bindgen-c = { path = 'crates/c', version = '0.29.0' } -wit-bindgen-rust = { path = "crates/rust", version = "0.29.0" } -wit-bindgen-teavm-java = { path = 'crates/teavm-java', version = '0.29.0' } -wit-bindgen-go = { path = 'crates/go', version = '0.29.0' } -wit-bindgen-csharp = { path = 'crates/csharp', version = '0.29.0' } -wit-bindgen-markdown = { path = 'crates/markdown', version = '0.29.0' } -wit-bindgen = { path = 'crates/guest-rust', version = '0.29.0', default-features = false } +wit-bindgen-core = { path = 'crates/core', version = '0.30.0' } +wit-bindgen-c = { path = 'crates/c', version = '0.30.0' } +wit-bindgen-rust = { path = "crates/rust", version = "0.30.0" } +wit-bindgen-teavm-java = { path = 'crates/teavm-java', version = '0.30.0' } +wit-bindgen-go = { path = 'crates/go', version = '0.30.0' } +wit-bindgen-csharp = { path = 'crates/csharp', version = '0.30.0' } +wit-bindgen-markdown = { path = 'crates/markdown', version = '0.30.0' } +wit-bindgen = { path = 'crates/guest-rust', version = '0.30.0', default-features = false } [[bin]] name = "wit-bindgen" diff --git a/crates/guest-rust/Cargo.toml b/crates/guest-rust/Cargo.toml index 1dd9b8e9..d24fc400 100644 --- a/crates/guest-rust/Cargo.toml +++ b/crates/guest-rust/Cargo.toml @@ -12,8 +12,8 @@ Used when compiling Rust programs to the component model. """ [dependencies] -wit-bindgen-rust-macro = { path = "./macro", optional = true, version = "0.29.0" } -wit-bindgen-rt = { path = "./rt", version = "0.29.0", features = ["bitflags"] } +wit-bindgen-rust-macro = { path = "./macro", optional = true, version = "0.30.0" } +wit-bindgen-rt = { path = "./rt", version = "0.30.0", features = ["bitflags"] } [features] default = ["macros", "realloc"] diff --git a/crates/guest-rust/rt/src/cabi_realloc.c b/crates/guest-rust/rt/src/cabi_realloc.c index 4e8fbb3a..f452b361 100644 --- a/crates/guest-rust/rt/src/cabi_realloc.c +++ b/crates/guest-rust/rt/src/cabi_realloc.c @@ -2,9 +2,9 @@ #include -extern void *cabi_realloc_wit_bindgen_0_29_0(void *ptr, size_t old_size, size_t align, size_t new_size); +extern void *cabi_realloc_wit_bindgen_0_30_0(void *ptr, size_t old_size, size_t align, size_t new_size); __attribute__((__weak__, __export_name__("cabi_realloc"))) void *cabi_realloc(void *ptr, size_t old_size, size_t align, size_t new_size) { - return cabi_realloc_wit_bindgen_0_29_0(ptr, old_size, align, new_size); + return cabi_realloc_wit_bindgen_0_30_0(ptr, old_size, align, new_size); } diff --git a/crates/guest-rust/rt/src/cabi_realloc.o b/crates/guest-rust/rt/src/cabi_realloc.o index 1c1e8ef76b6ccf7ee2bfd8bef391324ed5d49f7c..a649d0c9699f232d002f8d1fdd5c8fd469dbeb4b 100644 GIT binary patch delta 12 TcmZo=YGs<>%VcaY(SI8N7Y_sH delta 12 TcmZo=YGs<>%VcCZ(SI8N7cK+u diff --git a/crates/guest-rust/rt/src/cabi_realloc.rs b/crates/guest-rust/rt/src/cabi_realloc.rs index 63a22fba..6a1fb8fe 100644 --- a/crates/guest-rust/rt/src/cabi_realloc.rs +++ b/crates/guest-rust/rt/src/cabi_realloc.rs @@ -1,7 +1,7 @@ // This file is generated by ./ci/rebuild-libcabi-realloc.sh #[no_mangle] -pub unsafe extern "C" fn cabi_realloc_wit_bindgen_0_29_0( +pub unsafe extern "C" fn cabi_realloc_wit_bindgen_0_30_0( old_ptr: *mut u8, old_len: usize, align: usize, diff --git a/crates/guest-rust/rt/src/libwit_bindgen_cabi_realloc.a b/crates/guest-rust/rt/src/libwit_bindgen_cabi_realloc.a index 38c36c501ced36952d2f11cf532883a019739e95..411378115d73883d9b24eca4d4fa8bf46f5f03b4 100644 GIT binary patch delta 12 UcmbQkJcoJ0V