[esp-storage]: Add ability to Read/Write flash using embedded-io::{Read, Write}
#3230
Labels
status:needs-attention
This should be prioritized
Motivations
Currently
esp-storage
implementsembedded_storage::{ReadStorage, Storage}
to read and write to flash storage, but those traits take a slice as input. Let's say a user wants to write a large amount of bytes (> 20k for example), from a data structure that needs serialization, this requires the user to create a whole copy of that data in memory, during serialization, before writing it.Considering that reading directly from flash would still require a slice to be passed for the bytes to be stored, optimization is more about writing.
Some implementations, such as postcard offer an API to Serialize / De-serialize directly from implementers of
embedded-io::{Read, Write}
.Solution
Implement more traits for
FlashStorage
to allow reading and writing from types implementingembedded-io::{Read, Write}
traitsAlternatives
N/A
Additional context
The text was updated successfully, but these errors were encountered: