danielhenrymantilla / rust-uninit

Read trait fixed to soundly work with uninitalized memory
MIT License
25 stars 2 forks source link

Missing support for no_std crates with a functional memory allocator #2

Closed kotauskas closed 3 years ago

kotauskas commented 3 years ago

The only feature flag is std, which enables support for extension traits to memory-allocated types from std. Those can still be accessed in no_std crates via the built-in alloc crate, but this crate doesn't make use of alloc, meaning that it's currently impossible to use its allocator-related functionality in no_std contexts.

This can be solved by splitting the std feature into alloc and std (std will depend on alloc, for backwards compatibility): alloc will gate everything that requires an allocator, while std will only gate io::Read related features.

danielhenrymantilla commented 3 years ago

Good point, will do so!