A Rust library that abstracts over Rc and Arc smart pointers, enabling data structures with parameterizable pointer types.
Archery is a Rust library that provides abstraction over reference-counting smart pointers, specifically `Rc` and `Arc`. It allows developers to create data structures where the pointer type is parameterizable, enabling optimization by avoiding the overhead of thread-safe `Arc` when data doesn't need to be shared across threads.
Rust developers building data structures or libraries that need to support both single-threaded and multi-threaded reference counting without code duplication.
Developers choose Archery because it provides an ergonomic way to mimic higher-kinded polymorphism in Rust, offering better usability than alternative trait-based methods while maintaining performance and flexibility.
Abstract over the atomicity of reference-counting pointers in rust
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides SharedPointer that parameterizes over Rc and Arc, allowing data structures to switch between thread-safe and non-thread-safe pointers without code changes, as shown in the KeyValuePair example.
Enables use of Rc to avoid Arc overhead in single-threaded apps, and supports triomphe::Arc via an optional feature for faster multi-threaded performance, as detailed in the README.
Mimics higher-kinded polymorphism with better usability than trait-based alternatives, as highlighted in the README's comparison with other approaches.
Offers serialization support through the serde crate with an optional feature, making it easy to serialize data structures with reference-counted pointers.
Cannot directly store unsized types in SharedPointer; the workaround involves using Box, adding extra allocation and complexity, as admitted in the limitations section.
Specifically designed for abstracting Rc and Arc, so it's not a general-purpose solution for all smart pointer needs, limiting applicability to scenarios requiring pointer type parameterization.
Key features like triomphe::Arc support and serde serialization require enabling optional features, complicating dependency management and potentially increasing build times.