Expand description
§Omnia WASI Key-Value
This crate provides the Key-Value interface for the Omnia runtime.
§Interface
Implements the wasi:keyvalue WIT interface.
§Backend
- Default: In-memory cache using
moka. Data is not persisted across restarts.
§Usage
Add this crate to your Cargo.toml and use it in your runtime configuration:
ⓘ
use omnia::runtime;
use omnia_wasi_keyvalue::KeyValueDefault;
omnia::runtime!({
"keyvalue": KeyValueDefault,
});§License
MIT OR Apache-2.0
§WASI Key-Value
This module implements a runtime service for wasi:keyvalue
(https://github.com/WebAssembly/wasi-keyvalue).
Macros§
- omnia_
wasi_ view - Implementation of the
WasiKeyValueViewtrait for the store context.
Structs§
- Bucket
Proxy - Proxy for a Key-Value bucket.
- Cas
- CAS (Compare-And-Swap) operation handle.
- KeyValue
Default - Default implementation for
wasi:keyvalue. - Wasi
KeyValue - Host-side service for
wasi:keyvalue. - Wasi
KeyValue CtxView - View into
WasiKeyValueCtximplementation andResourceTable.
Traits§
- Bucket
- Providers implement the
Buckettrait to allow the host to interact with different backend buckets (stores). - Wasi
KeyValue Ctx - A trait which provides internal WASI Key-Value context.
- Wasi
KeyValue View - A trait which provides internal WASI Key-Value state.
Type Aliases§
- Future
Result - Result type for asynchronous operations.
- Result
- Result type for key-value operations.