cratestack-client-store-sqlite
SQLite-backed ClientStateStore implementation for the CrateStack Rust client.
Overview
cratestack-client-store-sqlite persists the client-side request journal in a local SQLite database. It is the right choice for single-device deployments — desktop apps, headless agents, or the Rust core of an offline-first mobile app.
The store implements the ClientStateStore trait from cratestack-client-rust and bundles SQLite via rusqlite's bundled feature so no system library is required.
Installation
[]
= "0.2.2"
= "0.2.2"
Usage
use Arc;
use ;
use SqliteStateStore;
let store: = new;
let base_url = parse?;
let client = new
.with_state_store;
The store creates parent directories on open, applies its schema migration on first use, and serialises access through an internal Mutex.
Storage Schema
(
singleton INTEGER PRIMARY KEY CHECK (singleton = 1),
schema_version INTEGER NOT NULL,
state_version INTEGER NOT NULL,
updated_at TEXT NOT NULL
);
(
seq INTEGER PRIMARY KEY AUTOINCREMENT,
method TEXT NOT NULL,
path TEXT NOT NULL,
status_code INTEGER NOT NULL,
content_type TEXT,
recorded_at TEXT NOT NULL
);
See Also
cratestack-client-rust— client runtime andClientStateStoretraitcratestack-client-store-redis— Redis-backed alternative for multi-instance deployments- Client Runtime
License
MIT