How chuck-ie/lamellae works
lamellae is a Rust bounded SPSC queue whose defining behavior is cache-line-granular publication: writes remain producer-owned until a line is advanced or explicitly flushed. Users create paired endpoints with channel!, send or batch-fill data (including a zero-copy closure API), publish it, then receive individual or batched data. The graph captures that runtime path and the ring-buffer, cache-line, and interruption-tracking layers supported by sampled source; zero-copy and documented constraints are included, while unsampled internal wiring is omitted.
Main entry points: buffer.rs Ring buffer · producer.rs Producer endpoint · consumer.rs Consumer endpoint · lib.rs Channel macro
Components 8
Queue API
- Channel macro
src/lib.rs - Producer endpoint
src/producer.rs - Consumer endpoint
src/consumer.rs
Buffer and layout
- Ring buffer
src/buffer.rs - Cache-line slots
src/wrapper.rs
Publication synchronization
- Interruption tracker
src/interruption_tracker.rs - Backoff helper
src/spinlock.rs
Other components
- Queue user
Connections 9
- Queue user → Channel macro: creates channel
- Channel macro → Ring buffer: allocates endpoints
- Ring buffer → Producer endpoint: returns endpoint
- Ring buffer → Consumer endpoint: returns endpoint
- Producer endpoint → Ring buffer: writes and publishes
- Consumer endpoint → Ring buffer: reads published data
- Ring buffer → Cache-line slots: stores slots
- Producer endpoint → Interruption tracker: records flush boundary
- Consumer endpoint → Interruption tracker: reads boundaries