#arc #ffi #sync #data-structure

elysees

A fork of triomphe, now with more pointer trickery

14 releases

Uses new Rust 2021

0.3.0 Nov 15, 2021
0.2.4 Sep 28, 2020
0.2.2 Jul 7, 2020
0.1.2 Jun 28, 2020
0.0.6 Jun 28, 2020

#85 in Concurrency

Download history 23/week @ 2021-08-10 3/week @ 2021-08-17 6/week @ 2021-08-24 8/week @ 2021-09-07 6/week @ 2021-09-14 4/week @ 2021-09-21 15/week @ 2021-09-28 4/week @ 2021-10-05 18/week @ 2021-10-12 6/week @ 2021-10-19 5/week @ 2021-10-26 8/week @ 2021-11-02 26/week @ 2021-11-09 16/week @ 2021-11-16 6/week @ 2021-11-23

56 downloads per month
Used in 4 crates

MIT/Apache

74KB
1.5K SLoC

Elysees

Fork of triomphe, which is a fork of Arc. This has the following advantages over std::sync::Arc:

  • elysees::Arc doesn't support weak references: we save space by excluding the weak reference count, and we don't do extra read-modify-update operations to handle the possibility of weak references.
  • elysees::ArcBox allows one to construct a temporarily-mutable Arc which can be converted to a regular elysees::Arc later
  • elysees::OffsetArc can be used transparently from C++ code and is compatible with (and can be converted to/from) elysees::Arc
  • elysees::ArcBorrow is functionally similar to &elysees::Arc<T>, however in memory it's simply a (non-owned) pointer to the inner Arc. This helps avoid pointer-chasing.
  • elysees::OffsetArcBorrow is functionally similar to &elysees::Arc<T>, however in memory it's simply &T. This makes it more flexible for FFI; the source of the borrow need not be an Arc pinned on the stack (and can instead be a pointer from C++, or an OffsetArc). Additionally, this helps avoid pointer-chasing.
  • elysees::ArcRef is a union of an Arc and an ArcBorrow

Dependencies

~250–415KB

"ǒa