cynosure

Crates.iocynosure
lib.rscynosure
version0.3.0
created_at2025-07-30 10:34:54.675354+00
updated_at2025-09-25 15:37:30.91907+00
descriptionHigh performance data structures & primitives from beyond the Blackwall
homepage
repositoryhttps://github.com/zk2u/cynosure
max_upload_size
id1773364
size265,287
azz (Zk2u)

documentation

README

Cynosure

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
Commit count: 26

cargo fmt