Crates.io | cynosure |
lib.rs | cynosure |
version | 0.3.0 |
created_at | 2025-07-30 10:34:54.675354+00 |
updated_at | 2025-09-25 15:37:30.91907+00 |
description | High performance data structures & primitives from beyond the Blackwall |
homepage | |
repository | https://github.com/zk2u/cynosure |
max_upload_size | |
id | 1773364 |
size | 265,287 |
A group of high performance, lightweight datastructures mostly optimized for usage in single-threaded async executors, but some structures can be used elsewhere. Zero dependencies by default.
The crate is split into site_c
and site_d
. site_c
are single-thread only, and site_d
primitives work across multiple threads.
site_c
LocalCell
: Rc<RefCell<T>>
-like structure without runtime checks with scoped mutable access.
Intentionally doesn't work over await points.LocalMutex
: Fast single-threaded mutex. Use when you do want to hold over await points.LocalRwLock
: Fast single-threaded reader-writer lock. Allows multiple concurrent readers or one exclusive writer.Queue
: Double-ended queue that stores up to N items inline before spilling to heap.site_d
RingBuf
: lock-free SPSC ring buffer with async and sync support.TripleBuffer
: lock-free SPSC asynchronous triple buffer