Picket
A lightweight, serde-compatible generational arena allocator for Rust.
Picket provides a Vec-like data structure (Arena) where items are accessed via a stable, generational Index rather than a raw integer offset. This solves the ABA problem: if you remove an item and insert a new one in its place, old indices referencing the removed item will correctly fail to retrieve the new one.
Features
- Lightweight:
Indexis 8 bytes.Option<Index>is also 8 bytes usingNonZeroU32. serdeSupport: TheArenacan be serialized and deserialized through theserdefeature.- no_std: Supports
no_stdenvironments. (stdis enabled by default)
Usage
use Arena;