Expand description
Distributed data structures backed by leased fabric memory.
This crate provides collection types that store their data in remote
memory regions obtained through grafos_std::mem::MemLease or block
storage via grafos_std::block::BlockLease. Each collection owns its
lease and releases it automatically on drop.
§Collections
| Type | Backing | Description |
|---|---|---|
FabricVec<T> | Memory | Growable array with fixed-stride slots |
FabricHashMap<K,V> | Memory | Hash map with open addressing and linear probing |
FabricQueue<T> | Memory | Bounded SPSC ring buffer |
Durable<T> | Block | Checkpoint/restore wrapper |
§Quick start
use grafos_collections::vec::FabricVec;
use grafos_std::mem::MemBuilder;
let lease = MemBuilder::new().min_bytes(4096).acquire()?;
let mut v: FabricVec<u32> = FabricVec::new(lease, 16)?;
v.push(&42)?;
assert_eq!(v.get(0)?, 42);§Feature flags
| Feature | Default | Effect |
|---|---|---|
std | Yes | Enables std in grafos-std (thread-local mock state) |