bytecodealliance / bytecodealliance/wasmtime
Persist Wasmtime keyvalue
- Dominant language
- Rust
- Stars
- 18.6k
- Forks
- 1.8k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 121
Description
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)?
Contributor guide
Assessment
This issue has not been assessed yet.