Skip to content

Add map support#1562

Draft
yordis wants to merge 1 commit intobytecodealliance:mainfrom
yordis:yordis/feat-map-support
Draft

Add map support#1562
yordis wants to merge 1 commit intobytecodealliance:mainfrom
yordis:yordis/feat-map-support

Conversation

@yordis
Copy link

@yordis yordis commented Mar 11, 2026

Summary

  • add end-to-end map<K, V> support in wit-bindgen core ABI and backend codegen paths (C, C++, C#, Go, MoonBit), plus Markdown type rendering
  • add map-focused codegen/runtime coverage in tests/codegen/map.wit and tests/runtime/map/*
  • fix Go test harness module replacement in crates/test/src/go.rs so generated map bindings resolve go.bytecodealliance.org/pkg/wit/* correctly

Test plan

  • cargo fmt
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo check
  • cargo check -p wit-bindgen-core
  • cargo check -p wit-bindgen-c
  • cargo check -p wit-bindgen-cpp
  • cargo check -p wit-bindgen-csharp
  • cargo check -p wit-bindgen-go
  • cargo check -p wit-bindgen-moonbit
  • cargo check -p wit-bindgen-markdown
  • cargo run test --artifacts target/artifacts --runner cargo --languages go --filter map.wit tests/codegen

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>
@yordis yordis marked this pull request as draft March 11, 2026 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant