This is a little experiment in custom allocation in Rust. It contains a couple simple memory allocators that can prove useful, as well as an Allocator trait for creating your own. Nightly is required.
Additionally, I have implemented a few composable primitives for allocators after watching Andrei Alexandrescu’s talk here. However, I am not sure that they really have a useful application or a place in this library.
I am also aware of the efforts to bring support for custom allocation into the standard library. When that effort is completed, the plan is to integrate this crate with that API. Until then, this provides a reasonable alternative.
As a final disclaimer: this crate relies heavily on unsafe code and unstable features. It has not been audited for safety, so use at your own risk!