slab
Slab allocator for Rust (by tokio-rs)
option-block
A minimal utility Rust crate for small, fixed-size blocks of optional types. (by BastiDood)
slab | option-block | |
---|---|---|
3 | 1 | |
648 | 0 | |
1.2% | - | |
4.4 | 1.7 | |
about 2 months ago | about 1 year ago | |
Rust | Rust | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
slab
Posts with mentions or reviews of slab.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2024-03-07.
-
Opaque Types for UniFFI
I'm going to show you how to use slab to send handles from rust to python and back to rust using an arena allocator called slab.
-
Dipping Toes into Unsafe Code
Importantly, this is not to be confused with the popular slab crate, which internally uses the dynamically-sized, heap-allocated Vec. Although both crates provide indexed accesses and map-like features, option-block operates at a lower level.
-
Beginner question: does it become easier to write datastructures with complex ownership semantics?
For the specific problem your mention with Vec, slab is quite nice.
option-block
Posts with mentions or reviews of option-block.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-07-21.
-
Dipping Toes into Unsafe Code
View on GitHub
What are some alternatives?
When comparing slab and option-block you can also consider the following projects:
slotmap - Slotmap data structure for Rust
scapegoat - Safe, fallible, embedded-friendly ordered set/map via a scapegoat tree. Validated against BTreeSet/BTreeMap.
uniffi-slab-example - An example of how to use slab to send opaque types across the uniffi boundary as an id in the slab arena.