bytecodealliance / bytecodealliance/wasmtime

Persist Wasmtime keyvalue

Open
#11,187 3 comments 0 reactions 0 assignees View on GitHub
wasi wasi:api
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.