jrandolf opened issue #14830:
bindgen!emitsstd::collections::HashMap<K, V>formap<K, V>, but Wasmtime only implementsComponentType/Lift/Lowerfor theHashMapbehind its internalhash_mapalias, which ishashbrown::HashMapwhen wasmtime'sstdfeature is off. So any WIT usingmapfails to compile with, for example:wasmtime = { version = "...", default-features = false, features = ["runtime", "component-model"] }wasmtime::component::bindgen!({ inline: "package a:b; interface i { f: func(m: map<string, u32>); } world w { import i; }", });error[E0277]: the trait `ComponentType` is not implemented for `HashMap<String, u32>`The generated path also doesn't go through
wasmtime_crate/__internallikeVecandStringdo, so it doesn't work from#![no_std]crates either. The existingcodegen_no_std.rstest doesn't catch this since it re-addsextern crate stdand builds wasmtime with default features.
alexcrichton added the wasm-proposal:component-model-map label to Issue #14830.
fitzgen closed issue #14830:
bindgen!emitsstd::collections::HashMap<K, V>formap<K, V>, but Wasmtime only implementsComponentType/Lift/Lowerfor theHashMapbehind its internalhash_mapalias, which ishashbrown::HashMapwhen wasmtime'sstdfeature is off. So any WIT usingmapfails to compile with, for example:wasmtime = { version = "...", default-features = false, features = ["runtime", "component-model"] }wasmtime::component::bindgen!({ inline: "package a:b; interface i { f: func(m: map<string, u32>); } world w { import i; }", });error[E0277]: the trait `ComponentType` is not implemented for `HashMap<String, u32>`The generated path also doesn't go through
wasmtime_crate/__internallikeVecandStringdo, so it doesn't work from#![no_std]crates either. The existingcodegen_no_std.rstest doesn't catch this since it re-addsextern crate stdand builds wasmtime with default features.
Last updated: Oct 31 2026 at 23:03 UTC