-
Notifications
You must be signed in to change notification settings - Fork 275
Comparing changes
Open a pull request
base repository: bytecodealliance/wit-bindgen
base: v0.55.0
head repository: bytecodealliance/wit-bindgen
compare: v0.56.0
- 9 commits
- 68 files changed
- 10 contributors
Commits on Apr 7, 2026
-
[C#] Add cancel support for futures and streams (#1580)
* add future/stream cancel support Clear up some debug use same package location for codegen and runtime tests. * feedback - remove dead code Make sure writables are not dropped after cancellation. * Apply suggestions from code review Co-authored-by: Joel Dice <joel.dice@akamai.com> --------- Co-authored-by: Joel Dice <joel.dice@akamai.com>
Configuration menu - View commit details
-
Copy full SHA for a55ad81 - Browse repository at this point
Copy the full SHA a55ad81View commit details
Commits on Apr 9, 2026
-
moonbit: lay groundwork for async runtime support (#1581)
* refactor(moonbit): lay groundwork for async runtime * style(moonbit): fix fmt and clippy * test(moonbit): restore async expected failures * fix(moonbit): keep async import codegen working
Configuration menu - View commit details
-
Copy full SHA for 81ce0de - Browse repository at this point
Copy the full SHA 81ce0deView commit details -
* feat: add map support across backends Implement map type rendering plus lowering/lifting/deallocation support across the C, C++, C#, Go, MoonBit, and Markdown backends, and add map codegen/runtime tests. This aligns non-Rust generators with core map ABI support and fixes the Go test harness module replacement path needed for map codegen verification. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com> * revert: remove map support from non-Rust backends Defer map codegen for MoonBit, Go, C#, C++, and C to future PRs that include runtime tests and review from language-specific maintainers. Only todo!() stubs for the new MapLower/MapLift/ IterMapKey/IterMapValue/GuestDeallocateMap instruction variants are kept so exhaustive matches compile. * revert: drop unrelated go.mod replace path fix This change was a fix for a latent bug from the vanity imports migration but is unrelated to map support. Removing to keep the PR focused on Rust. * refactor: clean up map type support across backends - Make `InterfaceGenerator::type_map` a required trait method instead of providing a default `todo!()` impl, so missing implementations are caught at compile time rather than runtime. - Remove `RuntimeItem::MapType` indirection in the Rust backend; reference `{rt}::Map` directly instead of emitting a `pub use` re-export. - Fix borrowed map rendering to use `&Map<K, V>` instead of the incorrect `&[(K, V)]` slice syntax that was copy-pasted from lists. - Add explanatory comments on map ABI methods that reuse list read/write helpers (maps share the list<tuple<K, V>> memory layout). - Add explicit `type_map` todo stubs to C, C++, C#, Go, and MoonBit backends. * Address PR review: make anonymous_type_map required and fix runner test - Make `anonymous_type_map` a required method on `AnonymousTypeGenerator` trait (no default impl), consistent with all other methods in the trait. - Add explicit `anonymous_type_map` todo!() implementation to C backend. - Fix map runner test to construct proper Map types instead of passing slice literals, matching the generated `&Map<K, V>` parameter signatures. * Mark map.wit codegen test as expected failure for unsupported backends The map.wit codegen test hits todo!() panics in backends that don't yet implement map support (C, C++, C#, Go, MoonBit). Add map.wit to each backend's should_fail_verify so CI treats these as expected failures. * Fix rustfmt and use starts_with for C map.wit codegen variants - Run cargo fmt to fix formatting in c/lib.rs, test/c.rs, test/moonbit.rs. - Use starts_with("map.wit") for the C backend's should_fail_verify to catch all codegen test variants (no-sig-flattening, autodrop, async). * Add comment back Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com> * Expand map test coverage with additional runtime and codegen tests Add runtime tests for empty maps, option values, maps inside records, inline anonymous map types, and a 100-entry stress test. Expand codegen tests with option values, nested maps, record values, bool keys, and char keys. * Add map tests for nested maps, multi-param, variant, and result types Exercise additional ABI code paths: nested map<K, map<K2, V>> with recursive lower/lift blocks, multiple map parameters with independent ptr/len pairs, map as a variant arm payload, map inside result<ok, err>, and tuple-with-map in codegen. * Add tuple-with-map and single-entry map runtime tests Exercise map inside an anonymous tuple (filter_mode_preserve_top path) and the single-entry boundary case. * Add WitMap trait and configurable map_type for Rust bindings Instead of hardcoding HashMap/BTreeMap, introduce a WitMap trait that generated code delegates to for map construction, insertion, and length. This lets users swap in their own map type via the new `map_type` bindgen option. The default is BTreeMap (always, regardless of std). * Format code Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com> * Add tests for WitMap trait and map_type codegen option - Unit tests for WitMap trait impls (BTreeMap, HashMap, reference blanket) - Proc-macro integration tests exercising map_type with HashMap and default - Codegen test variant running all .wit files with --map-type=HashMap * Fix &&BTreeMap WitMap trait resolution for borrowed map variants Remove `type Iter` and `wit_map_into_iter` from the `WitMap` trait and drop the `IntoIterator` bound from the blanket `&T` impl. This allows the blanket impl to apply at any reference depth (e.g. `&&BTreeMap`) which is needed when codegen emits `WitMap::wit_map_len(&map)` on an already-borrowed map. Generated lowering code now uses `IntoIterator::into_iter(map)` for iteration, which the standard library already provides for both owned and borrowed map types. * Fix map codegen for borrowed ownership mode Use method syntax (.wit_map_len() and .into_iter()) in generated MapLower code instead of UFCS. This lets Rust's auto-deref handle &&BTreeMap operands that arise when the borrow-mode param wrapper adds an extra & prefix to already-borrowed map arguments. A scoped `use WitMap;` import is emitted so method resolution finds the trait's wit_map_len method. * Use .len() and .into_iter() in MapLower codegen Revert MapLower to use method syntax for length and iteration, matching the original pre-WitMap code. Method syntax auto-derefs through &&Map operands that arise in borrowed ownership modes. Simplify WitMap trait to just new/push (used only in MapLift). The map type must also provide .len() and implement IntoIterator, which all standard map types already do. * Route MapLower .len() through WitMap trait via module-level import Instead of calling .len() directly (which bypasses the WitMap trait and would break custom map types), generated code now calls .wit_map_len() using method syntax. The WitMap trait is brought into scope via a module-level `use _rt::WitMap;` import, avoiding the scoping issues that arose from emitting `use` inside nested blocks. * Format code --------- Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>Configuration menu - View commit details
-
Copy full SHA for 958027c - Browse repository at this point
Copy the full SHA 958027cView commit details
Commits on Apr 10, 2026
-
[cpp] Add missing doc strings for some types (#1573)
* Add documentation for namespaces and fixup newlines * Format
Configuration menu - View commit details
-
Copy full SHA for 2ca3b8c - Browse repository at this point
Copy the full SHA 2ca3b8cView commit details -
C# Fixes wasi http header bug and adds a test for it (#1215)
* Fixes wasi http header bug and adds a test for it * Fixes alignment * refactored test to work with new test structure * fmt * Fixes review comments and allows mac builds pointing to locally built ILC * fmt * fixed go test * reverted macos changes and moved to separate pr * Fixed int to nint that I had missed * fmt * Changed int to nint --------- Co-authored-by: Timmy Silesmo <timmy@raybrowser.com>
Configuration menu - View commit details
-
Copy full SHA for 4992ae6 - Browse repository at this point
Copy the full SHA 4992ae6View commit details -
feat(go): add map type support (#1583)
* feat(go): add map type support to Go backend * refactor(go): combine duplicate GuestDeallocate match arms
Configuration menu - View commit details
-
Copy full SHA for 7b5c1c6 - Browse repository at this point
Copy the full SHA 7b5c1c6View commit details
Commits on Apr 14, 2026
-
feat(moonbit): add map type support (#1584)
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for a4b3eb1 - Browse repository at this point
Copy the full SHA a4b3eb1View commit details -
Limit async stream read/write lengths (#1588)
The canonical ABI requires that the maximum size of any one stream operation is `(1 << 28) - 1`, so this commit places that limit on the runtime implementation. This generally isn't applicable but it does get used for `stream` without a payload where otherwise the capacity of vectors is `usize::MAX`, hence large reads/writes.
Configuration menu - View commit details
-
Copy full SHA for d1eab2f - Browse repository at this point
Copy the full SHA d1eab2fView commit details -
Release wit-bindgen 0.56.0 (#1589)
[automatically-tag-and-release-this-commit] Co-authored-by: Auto Release Process <auto-release-process@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 9f20dc3 - Browse repository at this point
Copy the full SHA 9f20dc3View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v0.55.0...v0.56.0