ministore

Crates.ioministore
lib.rsministore
version0.1.4
created_at2025-11-03 07:10:54.924151+00
updated_at2026-01-05 17:03:02.308394+00
descriptionWAL-based embedded state store for Rust-application
homepage
repositoryhttps://github.com/ArcellaTeam/mini-rs/
max_upload_size
id1914062
size67,604
Alexey Rybakov (rybakov-an)

documentation

README

ministore

Minimal WAL engine for durable, replayable event logging
Part of the mini-rs embeddable toolkit

crates.io
docs.rs
License: Apache-2.0/MIT

ministore gives you just enough: atomic, durable, human-readable WAL with zero hidden machinery.


🎯 Purpose

ministore is a Write-Ahead Log (WAL) engine that guarantees every record you write is:

  • ✅ Atomic — written entirely or not at all.
  • ✅ Durable — fsynced to disk before the call returns.
  • ✅ Replayable — readable back in exact order.
  • ✅ Human-readable — stored in JSONL format.

It is not a state manager — just a reliable log. You define the record type and apply it to your state.

Perfect for:

  • Event sourcing and state machines
  • Metadata stores (e.g., in Arcella)
  • Local queues, caches, or audit logs on edge/IoT devices

📦 Quick Start

[dependencies]
ministore = "0.1"
serde = { version = "1.0", features = ["derive"] }
use ministore::MiniStore;
use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize)]
struct Set { value: u32 }

// Write
let mut store = MiniStore::open("state/journal.jsonl").await?;
store.append(&Set { value: 42 }).await?; // fsync guaranteed

// Replay
let records: Vec<Set> = MiniStore::replay("state/journal.jsonl").await?;

💡 Journal format:

// MINISTORE JOURNAL v0.1.0
{"Set":{"value":42}}

✅ Guarantees

Property Guarantee
Durability After append().await, data survives crashes and power loss.
Atomicity Each record is one valid JSON line — no partial writes.
Ordering Records replay in exact append order.
Format Human-readable JSONL + magic header for validation.

🧩 Part of mini-rs

  • ministore — durable WAL engine (this crate)
  • minisnap — snapshotting & log compaction
  • ministate — ready-to-use state manager (built on ministore + minisnap)
  • miniqueue — local durable message queue

Used in:

  • Arcella — component registry
  • walmq — message broker metadata

📄 License

Dual-licensed under:

  • Apache License 2.0
  • MIT License

Choose the one that best fits your project.


ministore — because if your data matters, it must survive a crash.
Part of the mini-rs family: simple, embeddable, reliable.

Commit count: 0

cargo fmt