Add the host-side std `tines-store` crate implementing the `tines_core::Store` trait over a durable, append-only single-file log so a robot's memory survives reboot. - Log format: length-prefixed `[u32 LE][postcard]` records (Obs/Trim/Meta). - On load the index is rebuilt by replaying the log, then every age is rebased to load time: elapsed time since the last persisted clock marker is folded into `age_ms` and `stored_at` reset to load `now`, so ages continue instead of freezing across a reboot. - Persisted state: released-id set, `next_seq`, and a clock marker in a `Meta` record; dedupe to the oldest Obs and let the last event per id win so a re-inserted id survives a trim. - Implements `next_seq` and `flush`; `trim` writes Trim records best-effort. - Registered as a workspace member; std-only, `#![forbid(unsafe_code)]`. - Adds persistence tests (append durability, rebase-on-load, released/seq persistence). Full gate (fmt, clippy, docs, tests, no_std thumb build) is green.
18 lines
662 B
TOML
18 lines
662 B
TOML
[package]
|
|
name = "tines-store"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
description = "Persistent append-only LogStore backend for tines: memory survives reboot with rebased ages and persisted release/sequence state."
|
|
authors.workspace = true
|
|
repository.workspace = true
|
|
readme.workspace = true
|
|
documentation = "https://docs.rs/tines-store"
|
|
keywords = ["robotics", "gossip", "delay-tolerant", "store", "persistent"]
|
|
categories = ["science::robotics"]
|
|
|
|
[dependencies]
|
|
tines-core = { path = "../tines-core", version = "0.3.0" }
|
|
postcard = { version = "1", features = ["use-std"] }
|
|
serde = { version = "1", features = ["derive"] }
|