Stream: git-wasmtime

Topic: wasmtime / PR #14837 Use Wasmtime's own map type in bindg...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 19 2026 at 19:18):

jrandolf opened PR #14837 from jrandolf:bindgen-map-path to bytecodealliance:main:

bindgen! generated std::collections::HashMap<K, V> for WIT maps, but the ComponentType/Lift/Lower impls are on Wasmtime's internal HashMap, which is hashbrown::HashMap when the std feature is disabled, so any WIT using map failed to compile in that configuration. This re-exports that type from component::__internal and uses it in generated code like Vec and String already are.

To cover this in CI, the min-platform example gains a small world using a map, since that's the build that runs without std (it fails with cannot find module or crate std without this change). I'm not attached to that location if there's a better place for a no_std bindgen check.

This is based on #14834; only the last commit is new.

Closes #14830

view this post on Zulip Wasmtime GitHub notifications bot (Oct 19 2026 at 19:26):

jrandolf has marked PR #14837 as ready for review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 19 2026 at 19:26):

jrandolf requested wasmtime-core-reviewers for a review on PR #14837.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 19 2026 at 19:26):

jrandolf requested pchickey for a review on PR #14837.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 19 2026 at 19:26):

jrandolf removed the review request for wasmtime-core-reviewers from PR #14837.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 19 2026 at 19:29):

jrandolf updated PR #14837.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 19 2026 at 21:44):

github-actions[bot] added the label wasmtime:api on PR #14837.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 20 2026 at 16:34):

:memo: alexcrichton submitted PR review:

I'm not sure about this personally, I think this can lead to subtle breakages and confusion. This means that the output of bindgen! is dependent on features enabled in wasmtime, but if there's multiple dependencies on the wasmtime crate then you're not in full control over the features enabled. IIRC there was a similar discussion about this on the wit-bindgen repository, but I forget the exact outcome there -- would you be up for searching over there and seeing how this relates to that solution?

view this post on Zulip Wasmtime GitHub notifications bot (Oct 20 2026 at 16:34):

alexcrichton removed the review request for pchickey from PR #14837.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 20 2026 at 22:47):

jrandolf commented on PR #14837:

I looked at wit-bindgen as you suggested. You pushed back on switching on std there for the same reason, and it ended up with a map_type option that defaults to BTreeMap. #14870 now does the same thing here, BTreeMap is in alloc so the generated code doesn't depend on Wasmtime's features, so I'm closing this in favor of that.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 20 2026 at 22:47):

:cross_mark: jrandolf closed without merge PR #14837.


Last updated: Oct 31 2026 at 23:03 UTC