Files
Maofeng 5edf185c90 feat(wit): add versioned KV store package
Define wasmeld:kv/store@0.1.0 with get, set, and delete operations.

Expose explicit invalid-key, value-too-large, and operation-failed variants so components can handle bounded storage failures without relying on host-specific errors.
2026-07-29 19:37:00 +08:00

18 lines
371 B
Plaintext

package wasmeld:kv@0.1.0;
interface store {
variant kv-error {
invalid-key(string),
value-too-large(u64),
operation-failed(string),
}
get: func(key: string) -> result<option<list<u8>>, kv-error>;
set: func(key: string, value: list<u8>) -> result<_, kv-error>;
delete: func(key: string) -> result<_, kv-error>;
}
world kv-host {
import store;
}