neuron-state-memory
In-memory
StateStoreimplementation for neuron
Overview
neuron-state-memory provides a thread-safe, async-ready in-memory implementation of the
StateStore trait from layer0. State is stored as a HashMap behind a RwLock,
scoped to the process lifetime.
Use it for:
- Tests and CI (no disk I/O, no cleanup required)
- Short-lived operator runs where durability is not needed
- Development and prototyping
For durable persistence, use neuron-state-fs instead.
Usage
[]
= "0.4"
use MemoryStateStore;
use StateStore;
use Arc;
let store: = new;
store.write.await?;
let val = store.read.await?;
Part of the neuron workspace
neuron is a composable async agentic AI framework for Rust. See the book for architecture and guides.