synwire-checkpoint-sqlite
SQLite-backed checkpoint storage for Synwire graphs. Persist workflow snapshots across process restarts with zero system dependencies — SQLite is bundled.
What this crate provides
SqliteSaver— implementsBaseCheckpointSaverwith WAL-mode SQLite persistenceSqliteSaver::new(path)— open or create a checkpoint database (permissions: 0600)SqliteSaver::with_max_size(path, max_bytes)— cap the stored checkpoint JSON size- Connection pooling via
r2d2for safe concurrent access - No
libsqlite3system dependency — usesrusqlitewith thebundledfeature
Quick start
[]
= "0.1"
= "0.1"
= "0.1"
= { = "1", = ["full"] }
Create a persistent checkpoint saver and wire it into a graph:
use SqliteSaver;
use CheckpointConfig;
use Path;
use Arc;
async
When to use this vs InMemoryCheckpointSaver
| Scenario | Use |
|---|---|
| Tests, short-lived workflows | InMemoryCheckpointSaver |
| Persistence across process restarts | SqliteSaver |
| Distributed / multi-process | Implement BaseCheckpointSaver for PostgreSQL, Redis, etc. |
Documentation
- Checkpointing Tutorial
synwire-checkpoint— trait definitions- Full API docs
- Synwire documentation