Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add support for generic key and entry collections types #144

Closed
wants to merge 9 commits into from

Conversation

Bergmann89
Copy link

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:

  • He can use his own key type to implement strong typed and reference counted keys (like I already did with the Handle key type.
  • He can use entry collections that do not depend on alloc (for example an arrayvec or a plain array).

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
Copy link
Contributor

Darksonn commented Mar 6, 2024

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

@Bergmann89 Bergmann89 force-pushed the master branch 7 times, most recently from 50cf82c to dc6864b Compare March 8, 2024 09:38
@Bergmann89
Copy link
Author

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

@Bergmann89 Bergmann89 closed this Mar 8, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants