Skip to main content

Crate omnia_wasi_keyvalue

Crate omnia_wasi_keyvalue 

Source
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 WasiKeyValueView trait for the store context.

Structs§

BucketProxy
Proxy for a Key-Value bucket.
Cas
CAS (Compare-And-Swap) operation handle.
KeyValueDefault
Default implementation for wasi:keyvalue.
WasiKeyValue
Host-side service for wasi:keyvalue.
WasiKeyValueCtxView
View into WasiKeyValueCtx implementation and ResourceTable.

Traits§

Bucket
Providers implement the Bucket trait to allow the host to interact with different backend buckets (stores).
WasiKeyValueCtx
A trait which provides internal WASI Key-Value context.
WasiKeyValueView
A trait which provides internal WASI Key-Value state.

Type Aliases§

FutureResult
Result type for asynchronous operations.
Result
Result type for key-value operations.