jrandolf opened PR #14834 from jrandolf:map-codegen-tests to bytecodealliance:main:
This adds a
map.witcodegen test, which gets compiled with each of thebindgen!option variants and snapshotted intests/expanded, plus runtime tests that useHashMapthroughTypedFuncand a typed host function. Neither path had any coverage outside of fuzzing.The snapshots intentionally record the current output (including
std::collections::HashMapand the by-value map parameters), so the follow-up PRs for those show up as snapshot diffs.Closes #14813
jrandolf has marked PR #14834 as ready for review.
jrandolf removed the review request for wasmtime-core-reviewers from PR #14834.
jrandolf requested dicej for a review on PR #14834.
jrandolf requested wasmtime-core-reviewers for a review on PR #14834.
:memo: alexcrichton submitted PR review.
:speech_balloon: alexcrichton created PR review comment:
Could this and the above test be folded together? Not much of a reason to keep them separate
:speech_balloon: alexcrichton created PR review comment:
Could this actually be added as a
*.wasttest instead? That'll I suspect require adding map support to thewasmtime-wastcrate, but I think tests like this would be best supported elsewhere rather than in thefunc.rssuite
jrandolf updated PR #14834.
:memo: jrandolf submitted PR review.
:speech_balloon: jrandolf created PR review comment:
Makes sense. The wast tooling doesn't support map values yet (neither
wastnorwasmtime-wast), so I've dropped this test here and I'll add a.wastversion together with map support there.
:memo: jrandolf submitted PR review.
:speech_balloon: jrandolf created PR review comment:
Done
:speech_balloon: jrandolf edited PR review comment.
jrandolf requested alexcrichton for a review on PR #14834.
:thumbs_up: alexcrichton submitted PR review.
alexcrichton added PR #14834 Add tests for map<K, V> in bindgen! and the typed API to the merge queue.
:check: alexcrichton merged PR #14834.
alexcrichton removed PR #14834 Add tests for map<K, V> in bindgen! and the typed API from the merge queue.
:memo: jrandolf submitted PR review.
:speech_balloon: jrandolf created PR review comment:
Added in #14890, along with map support in
wast(bytecodealliance/wasm-tools#2784).
Last updated: Oct 31 2026 at 23:03 UTC