#reference-counting #rc #weak #arc

no-std wobbly

wobbly-owned reference counting pointers that mostly behave like Weak but can also keep a value alive

2 releases

0.1.1 Feb 25, 2024
0.1.0 Feb 24, 2024

#93 in Simulation

Download history 142/week @ 2024-03-13 18/week @ 2024-03-20 35/week @ 2024-03-27 80/week @ 2024-04-03 10/week @ 2024-04-10 17/week @ 2024-04-17 186/week @ 2024-04-24 23/week @ 2024-05-01 90/week @ 2024-05-08 12/week @ 2024-05-15 20/week @ 2024-05-22 38/week @ 2024-05-29 36/week @ 2024-06-05 43/week @ 2024-06-12 62/week @ 2024-06-19 16/week @ 2024-06-26

161 downloads per month
Used in pyodide-webassembly-runti…

MIT/Apache

19KB
127 lines

CI Status MSRV Latest Version Rust Doc Crate Rust Doc Main

wobbly provides the single-threaded rc::Wobbly<T> and thread-safe sync::Wobbly<T> reference-counting pointers that are similar to Weak but provide wobbly-shared ownership of a value of type T, allocated on the heap. Unlike Weak pointers, a group of Wobbly pointers shares one owning (strong) pointer that is released when the first Wobbly of the group is dropped, and Wobbly pointers can thus keep a value alive like std::rc::Rc or std::sync::Arc but can also break cycles by being a non-owning pointer like std::rc::Weak or std::sync::Weak.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Funding

wobbly has been developed as part of ESiWACE3, the third phase of the Centre of Excellence in Simulation of Weather and Climate in Europe.

Funded by the European Union. This work has received funding from the European High Performance Computing Joint Undertaking (JU) under grant agreement No 101093054.

No runtime deps

Features