tokio-rs / slab

Slab allocator for Rust
MIT License
699 stars 84 forks source link

Add support for generic key and entry collections types #144

Closed Bergmann89 closed 8 months ago

Bergmann89 commented 8 months ago

Hey guys,

I really like the slab crate but unfortunately I'm not able to use it in one of my projects because I have a no_std target with no alloc. I refactored the existing code to support generic keys and entry collection types. Using this approach the user has two huge benefits:

I tried to not break the public interface of the code and I still have some TODOs in the code, but I wanted to known if you are generally interested in merging my changes or not. If you will not pull my changes in your repository I may make some additional improvements that might break the interface and publish it as new create on my own.

Looking forward to your feedback.

Greetings, Bergmann89.

Darksonn commented 8 months ago

This is a large and intrusive change. I would recommend that you publish your own crate instead.

Bergmann89 commented 8 months ago

Ok. I've released it on my own. Feel free to have a look: https://crates.io/crates/generic_slab. Closed.