Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: bytecodealliance/wit-bindgen
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.55.0
Choose a base ref
...
head repository: bytecodealliance/wit-bindgen
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.56.0
Choose a head ref
  • 9 commits
  • 68 files changed
  • 10 contributors

Commits on Apr 7, 2026

  1. [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>
    yowl and dicej authored Apr 7, 2026
    Configuration menu
    Copy the full SHA
    a55ad81 View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2026

  1. 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
    peter-jerry-ye authored Apr 9, 2026
    Configuration menu
    Copy the full SHA
    81ce0de View commit details
    Browse the repository at this point in the history
  2. Add map support (#1562)

    * 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>
    yordis authored Apr 9, 2026
    Configuration menu
    Copy the full SHA
    958027c View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2026

  1. [cpp] Add missing doc strings for some types (#1573)

    * Add documentation for namespaces and fixup newlines
    
    * Format
    Lucky1313 authored Apr 10, 2026
    Configuration menu
    Copy the full SHA
    2ca3b8c View commit details
    Browse the repository at this point in the history
  2. 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>
    silesmo and Timmy Silesmo authored Apr 10, 2026
    Configuration menu
    Copy the full SHA
    4992ae6 View commit details
    Browse the repository at this point in the history
  3. feat(go): add map type support (#1583)

    * feat(go): add map type support to Go backend
    
    * refactor(go): combine duplicate GuestDeallocate match arms
    yordis authored Apr 10, 2026
    Configuration menu
    Copy the full SHA
    7b5c1c6 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2026

  1. feat(moonbit): add map type support (#1584)

    Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
    yordis authored Apr 14, 2026
    Configuration menu
    Copy the full SHA
    a4b3eb1 View commit details
    Browse the repository at this point in the history
  2. 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.
    alexcrichton authored Apr 14, 2026
    Configuration menu
    Copy the full SHA
    d1eab2f View commit details
    Browse the repository at this point in the history
  3. 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>
    github-actions[bot] and Auto Release Process authored Apr 14, 2026
    Configuration menu
    Copy the full SHA
    9f20dc3 View commit details
    Browse the repository at this point in the history
Loading