logoalt Hacker News

positive-spite • today at 3:53 PM • 1 reply • view on HN

To anyone interested in arena allocators.

Rust just stabilized its `Allocator` API in version 1.100.0. Definitely worth checking out!


Replies

Bigpet • today at 4:09 PM

Seems like a long way to walk though. Retrofitting this will take time (if it'll ever complete). Zig made it a core part of the language and library. I'll assume Rust will make it farther than C++ ever made it, but just take a look at how retrofitting custom allocators is going there.

Seems like it will be useful for use-cases like embedded where you're restricted to certain parts of the library anyway. But the battle is kind of already lost for support at the level of Zig or Odin. Even if they retrofitted support for the whole standard library, they'll never be able retrofit all crates or make people even bother adding support for all new crates.

➕ show 2 replies