Add `BTreeMap` and `BTreeSet`?
scottjmaddox opened this issue · comments
Has anyone looked at adding BTreeMap
and BTreeSet
collections? I'd like to use this library in a programming language type system, but I need some form of Set
and Map
. BTreeMap
/ BTreeSet
exist in the Rust's alloc
crate, so I'm hoping it wouldn't be too difficult to port them to bumpalo
.
The hashbrown
crate provides hash maps and sets that work with bumpalo
.
I am not interested in adding BTreeMap
and BTreeSet
to this crate; I'm waiting for std
to support custom allocators instead (which is making progress!).
Ah, that's good to hear! It's not quite obvious to me how that works, though, any chance you can point me to an example? In particular, is there a way to allocate the hash table in a bumpalo arena?
Thanks!
I haven't used it myself, but the hashbrown
readme says you enable the bumpalo
cargo feature and then use the BumpWrapper
type.