What will the new Allocator trait look like?


#1

RFC 1398 proposes the introduction of a new Allocator trait to help with the implementation of custom allocators. However, we’re not there yet.

I’m working on some custom allocator implementations, and I’d like to make it so that they will work with that feature when it is finally added. However, I’m relatively new to Rust, and I’m not sure where to look for work on that feature. Does anyone who’s working on that know if a particular design for the Allocator trait has been nailed down yet, or if there’s even a preliminary idea of what it will look like? I’m fully prepared to have to adjust my code to whatever ends up coming out in stable down the line, but I’d like something to go off of.

Thanks!


#2

The RFC contains the definition: https://github.com/rust-lang/rfcs/blob/master/text/1398-kinds-of-allocators.md#transcribed-source-for-allocator-trait-api


#3

Well I’m honestly not sure how I missed that, but thanks!