Expand description
oxistore — Pure Rust storage facade for the COOLJAPAN ecosystem.
This crate re-exports the core traits from oxistore_core and provides
the open / open_with / open_in_memory convenience functions
that return a Box<dyn KvStore> backed by the selected engine.
§Default backend
The kv-redb feature (enabled by default) selects redb as the backing
store. Pass --features kv-sled to use sled instead (or in addition).
§Feature flags
| Feature | Description |
|---|---|
kv-redb | redb backend (default) |
kv-sled | sled backend |
kv-fjall | fjall LSM-tree backend |
columnar | Parquet/Arrow columnar storage |
cache | LRU and ARC cache primitives |
blob | Blob storage with local + memory backends |
encrypt | Cell-level AEAD encryption decorator |
§Example
use oxistore::{open, KvStore};
let store = open(&path).expect("open failed");
store.put(b"hello", b"world").expect("put failed");
let val = store.get(b"hello").expect("get failed");
assert_eq!(val.as_deref(), Some(b"world".as_ref()));Modules§
- kv_redb
- Re-exports for the redb backend (available when the
kv-redbfeature is enabled). - prelude
- Prelude module — import commonly used types with
use oxistore::prelude::*.
Structs§
- Store
Config - Backend-agnostic configuration for opening a store.
- Store
Metrics - Runtime statistics for a store (reads, writes, cache hits, etc.).
Enums§
- Backend
- Unified backend type discriminant covering all storage engine types.
- Store
Error - Errors that can be returned by any OxiStore backend.
- Store
Kind - Which backend engine to use when opening a store.
Traits§
- Blob
Store - Marker trait for blob stores that is compatible with
oxistore-blob::BlobStore. - Columnar
Store - Stub trait for M2+ columnar store — defined here so facade re-exports remain stable.
- KvSnapshot
- A point-in-time read-only view of the store obtained from
KvStore::snapshot. - KvStore
- Core key-value store trait.
- KvTxn
- An explicit write transaction obtained from
KvStore::transaction.
Functions§
- backup_
store - Create a backup of the store at
src(opened withkind) todst. - destroy
- Destroy (remove) the store at
pathfor the givenkind. - detect_
backend - Attempt to detect which backend engine created the store at
path. - expiry_
epoch_ millis - Encode a TTL as an expiry unix-epoch-milliseconds
u64. - is_
expired - Return
trueif an epoch-milliseconds timestamp is in the past. - open
- Open a
KvStoreatpathusing the default backend (redb). - open_
config - Open a
KvStoreatpathwith aStoreConfigusing the default backend (redb). - open_
in_ memory - Open an ephemeral in-memory
KvStorefor the specified backend. - open_
read_ only - Open an existing
KvStoreatpathin read-only mode (default backend: redb). - open_
with - Open a
KvStoreatpathusing the specifiedkind. - prefix_
upper_ bound - Compute the exclusive upper-bound key for a prefix scan.
- restore_
store - Restore a store at
dstfrom a backup atbackup_pathusingkind.