Something I think would be immensely helpful for “no operating system facilities except for a heap” use cases is if Box
, String
, and Vec
were magically added to the prelude somehow if you have an #[allocator]
defined.
Right now using them in no_std
environments involves using them through the liballoc API, which requires #[feature(alloc)]
which requires nightly, then littering your code with a bunch of use alloc::boxed::Box
etc directives, potentially gated on cargo features for pulling them in through liballoc rather than std
.
If they were just in the prelude, the use
directives and #[feature(alloc)]
would be unnecessary and there would be no nightly dependency.