Skip to content
shelf logo

shelf

Fast in-memory access with automatic disk persistence for the BEAM, targeting the Erlang runtime.

ETS Speed + DETS Persistence

Microsecond reads from ETS with durable storage on disk via DETS. The classic Erlang persistence pattern, wrapped in a type-safe Gleam API.

Write Modes

Choose WriteBack for high-throughput batched persistence, or WriteThrough for immediate durability on every write.

Table Types

Set, bag, and duplicate bag tables — all with persistent backing. Pick the right data model for your use case.

Safe Resource Management

The with_table callback ensures tables are always properly closed. Atomic counters for lock-free integer updates.