`alloc`-only `HashMap`?
Rust Internals [Unofficial]
April 8, 2026
That situation already describes alloc as-is. If you depend on it there must be a GlobalAlloc instance somewhere but alloc itself will not (strongly) provide that symbol on a per-target basis. Instead, there's a declared GlobalAllocator singleton-type with the interface that's relaying calls to some user-defined symbol annotated with a macro, which must appear somewhere in the final crate graph.
There's a compatibility problem, we can't outright add the requirement to alloc without a fallback but fallbacks are the problem, but the concept itself is established. If that were a normal crate, I'd say to put the data structures under a new feature flag..
Discussion in the ATmosphere