slab
Slab allocator for Rust (by tokio-rs)
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. (by graysonarts)
slab | uniffi-slab-example | |
---|---|---|
3 | 1 | |
648 | 0 | |
1.2% | - | |
4.4 | 3.8 | |
about 2 months ago | about 2 months ago | |
Rust | Rust | |
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.
uniffi-slab-example
Posts with mentions or reviews of uniffi-slab-example.
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
The example code from this article is available here: https://github.com/graysonarts/uniffi-slab-example
What are some alternatives?
When comparing slab and uniffi-slab-example you can also consider the following projects:
slotmap - Slotmap data structure for Rust
uniffi-rs - a multi-language bindings generator for rust