Rust 1.100 Stabilises the Allocator API for Vec and Box; bumpalo Not Yet Compatible
Rust 1.100, released November 12, stabilises the Allocator trait, allowing Vec and Box to use custom allocators without nightly features. The stable surface is limited: only Vec and Box accept an allocator, while HashMap, BTreeMap, VecDeque and String do not. The popular arena crate bumpalo does not yet integrate with the new trait, and some performance figures circulating online are outdated. The Rust team considers this the core of the allocator_api and the first step of the Allocators 1.0 project goal. The article also demonstrates a small arena written against the stable trait to reduce per-request allocation overhead.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in