dakom opened issue #11187:
The keyvalue implementation supports an in-memory lookup out of the box.
However, I don't see how to persist values across instantiations, or share the same lookup between component instances.
It looks to me like this is an intentional choice, where the bucket is always created anew, and data is always cloned upon bucket opening: https://github.com/bytecodealliance/wasmtime/blob/5bb5d0080c97d291a7127436884cc50cce084716/crates/wasi-keyvalue/src/lib.rs#L170
Am I missing something here? If it's always created fresh, isn't this essentially the same as a component just creating it's own
HashMap(albeit with some initial values populated)?
bjorn3 commented on issue #11187:
bjorn3 edited a comment on issue #11187:
cc https://github.com/bytecodealliance/wasmtime/pull/9062 and https://github.com/bytecodealliance/meetings/blob/main/wasmtime/2024/wasmtime-08-01.md#new-wasikeyvalue-store-bringing-in-redis-nick
alexcrichton commented on issue #11187:
It's worth noting that the wasi-keyvalue implementation in Wasmtime has not seen much implementation work beyond the initial inception. The upstream proposal itself is still a draft and not finalized as well.
alexcrichton added the wasi:api label to Issue #11187.
alexcrichton added the wasi label to Issue #11187.
dakom commented on issue #11187:
Thanks @alexcrichton... from my perspective it was more of a question to understand where things are at - and you've answered it. Ofc it'll be cool to see it mature along with the spec, but no pressure :)
Last updated: Dec 06 2025 at 07:03 UTC