(DD-MM-YY)
- Move to edition 2024
- Add a const assert to make sure flash
WRITE_SIZEandREAD_SIZEare multiples of each other
- Swapped two checks so some fringe situations now rightly return corrupted data errors instead of wrongly user errors
- Added random data input fuzzing
- You're still meant to run this crate on erased flash!
- Added item iterator for map.
- Breaking: Added
Valueimpls forbool,Option<T: Value>, and[T: Value; N]. This can break existing code because it changes type inference, be mindfull of that!
- Add
defmtattributes to cache types.
- Breaking: Map keys are now always passed by reference. This avoids extra cloning and memory use for bigger keys.
- Added
space_leftfunction for queue - Added a new
map::remove_all_items()API to remove all stored items in flash.
This release is 'disk'-compatible with 2.0
- Added check for too big items that won't ever fit in flash so it returns a good clear error.
- Implemented the
get_lenfunction for all built-in key types
- Breaking: Made the cache API a bit more strict. Caches now always have to be passed as a mutable reference. The API before would lead to a lot of extra unncesessary binary size.
- Breaking: Removed the
StorageItemtrait in favor of two separateKeyandValuetraits. This helps cut binary size and is closer to what users of the map APIs were expecting. - Breaking: The error type is no longer generic over the Item error. That error variant has been renamed
SerializationErrorand carries a predefined error subtype. - Added
erase_allfunction as a helper to erase the flash in a region. - Breaking: Changed the way that queue iteration works. Now there's an
iterfunction instead of two separatepeek_manyandpop_manyfunctions. The new iter returns an entry from which you can get the data that was just peeked. If you want to pop it, then call the pop function on the entry. - Added
arrayvecfeature that when activated impls theKeytrait forArrayVecandArrayString.
- Breaking: Corruption repair is automatic now! The repair functions have been made private.
- Breaking: There's now only one error type.
MapErrorhas been retired and the main error type now carries the Item error as well. The queue usesInfallableas the item error type. - Breaking: The feature
defmthas been renameddefmt-03to avoid a future breaking change. - Added
stdfeature that implements the error trait for the error enum - This release is flash compatible downto version 0.7
- Added
remove_itemto map
- Breaking: Storage item key must now also be clone
- Added KeyPointerCache which significantly helps out the map
- Added new PagePointerCache that caches more than the PageStateCache. See the readme for more details.
- Breaking: The item to store is now passed by reference to Map
store_item - Breaking: Added cache options to the functions to speed up reading the state of the flash.
To retain the old behaviour you can pass the
NoCachetype as the cache parameter. - Removed defmt logging since that wasn't being maintained. The format impl for the errors remain.
- Breaking: Data CRC has been upgraded to 32-bit from 16-bit. Turns out 16-bit has too many collisions. This increases the item header size from 6 to 8. The CRC was also moved to the front of the header to aid with shutdown/cancellation issues.
- When the state is corrupted, many issues can now be repaired with the repair functions in the map and queue modules
- Made changes to the entire crate to better survive shutoffs
- Breaking: Convert API to async first supporting the traits from embedded-storage-async. Flash
drivers supporting
sequential-storagecan be wrapped using BlockingAsync, and a simple blocking executor can be used to call the API from a non-async function.
- Small bug fixes and refactorings including an off-by-one error. Found with added fuzzing from (#13)
- Added queue peek_many and pop_many (#12)
- Breaking: Internal overhaul of the code. Both map and queue now use the same
itemmodule to store and read their data with. - Breaking: Map serialization is no longer done in a stack buffer, but in the buffer provided by the user.
- Breaking: Map StorageItemError trait has been removed.
- Added CRC protection of the user data. If user data is corrupted, it will now be skipped as if it wasn't stored. If you think it should be reported to the user, let me know and propose an API for that!
- Read word size is no longer required to be 1. It can now be 1-32.
- Breaking: Map
store_itemitem no longer uses a ram buffer to temporarily store erased items in. Instead it keeps an extra open page so it can copy from one page to another page directly. This means the minimum page count for map is now 2.
- Map no longer erases the flash when corrupted to self-recover. It now just returns an error so the user can choose what to do.
- Flipped one of the error messages in
queue::popandqueue::peekfromBufferTooBigtoBufferTooSmallbecause that's a lot clearer - Massive performance bug fixed for the queue. Before it had to read all pages from the start until the first pop or peek data was found. Now empty pages are erased which solves this issue.
- Fixed the queue implementation for devices with a write size of 1
- Breaking: The internal storage format for queue has changed, so is incompatible with existing stored memory. The max size has come down to 0x7FFE.
- Added new queue implementation with
push,peekandpopwhich requires multiwrite flash - Breaking: the map implementation now moved to its own module. You'll need to change your imports.
- Optimized reading items from flash which reduces the amount of reads by ~30% for small items.
- Added defmt behind a feature flag. When enabled, the error type implements Format
- Fixed a scenario where an infinite recursion could lead to a stackoverflow. If there's no more space to fit all items, you'll now get an error instead.
- Made the error non-exhaustive so that next time this update wouldn't be a breaking one.
- Initial release