NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #687 most downloaded on crates.io
`static` friendly data structures that don't require dynamic memory allocation
Last release 5 months ago
30 Apr 2026
Release timing varies
gaps range from 3 weeks to 1.4 years
Nearly every release is documented
notes for 52 of 53 stable releases
3 versions withdrawn
withdrawn after publishing
9 years old
56 releases · first in 2017
See the full changelog here: https://github.com/rust-embedded/heapless/blob/v0.9.3/CHANGELOG.md#v093-2025-04-15
See the full changelog here: https://github.com/rust-embedded/heapless/blob/v0.9.3/CHANGELOG.md#v093-2025-04-15
Deque::clear, HistoryBuf::clear and IndexMap::clear in the context of panicking drop implementations.from_bytes_truncating_at_nul to CStringCString::{into_bytes, into_bytes_with_nul, into_string}pop_front_if and pop_back_if to DequeVec::from_array const.len when N == usize::MAX and debug assertions are enabled.One column per quarter.
See the full changelog here: https://github.com/rust-embedded/heapless/blob/v0.9.2/CHANGELOG.md#v092
See the full changelog here: https://github.com/rust-embedded/heapless/blob/v0.9.2/CHANGELOG.md#v092
from_bytes_truncating_at_nul to CString?Sized bounds in PartialEq implementationsPartialEq implementation for DequeInner and HistoryBufInner generic over the storage of the RHSDefault for CapacityError.defmt::Format for CapacityError.TryFrom for Deque from array.serde to serde_core for enabling faster compilations.Zeroize trait for all data structures with the zeroize feature to securely clear sensitive data from memory.truncate to Dequeretain to Dequeretain_mut to Dequeinto_raw to Boxfrom_raw to BoxFusedIterator to vec::IntoIter, deque::IntoIter, index_map::IntoIter and linear_map::IntoIter.ExactSizeIterator to vec::IntoIter, deque::IntoIter, index_map::IntoIter and linear_map::IntoIter.DoubleEndedIterator to vec::IntoIter and deque::IntoIter.mpmc (see #583)ArcBlock<T> and BoxBlock<T> types, fixing possible Undefined BehaviorSee the full changelog here: https://github.com/rust-embedded/heapless/blob/v0.9.1/CHANGELOG.md#v091
See the full changelog here: https://github.com/rust-embedded/heapless/blob/v0.9.1/CHANGELOG.md#v091
String::insert and String::insert_str.embedded_io::Write impl for Vec.bytes::BufMut is now implemented on VecInner.history_buf::OldestOrdered.LenType opt-in.pool::boxed docs.Debug derive to vec::IntoIter.spsc::Consumer, spsc::Producer and spsc::Iter.LinearMap::entry() API.LinearMap::retain().Cargo.toml for rustdoc tests.UnionNode<T> type, fixing possible Undefined Behaviour.bytes::Buf implementation.DefaultLenType struct.See the full changelog here: https://github.com/rust-embedded/heapless/blob/v0.9.0/CHANGELOG.md#v090---2025-04-28
See the full changelog here: https://github.com/rust-embedded/heapless/blob/v0.9.0/CHANGELOG.md#v090---2025-04-28
bytes::Buf and bytes::BufMut implementations for Vec.format macro.String::from_utf16.is_full, recent_index, oldest, and oldest_index to HistoryBufferis_full to BinaryHeapis_full to IndexMapis_full to IndexSetis_full to LinearMapVec.Vec::spare_capacity_mut.Extend impls for Deque.Deque::make_contiguous.VecView, the !Sized version of Vec.IntoIterator implementation for LinearMapDeque::{get, get_mut, get_unchecked, get_unchecked_mut}.serde::Serialize and serde::Deserialize implementations to HistoryBuffer.Vec::drain.String::drain.DoubleEndedIterator for OldestOrdered.Entry methods to indexmap Entry.StringView, the !Sized version of String.BinaryHeapView, the !Sized version of BinaryHeap.MpMcQueueView, the !Sized version of MpMcQueue.LinearMapView, the !Sized version of LinearMap.HistoryBufferView, the !Sized version of HistoryBuffer.DequeView, the !Sized version of Deque.QueueView, the !Sized version of Queue.SortedLinkedListView, the !Sized version of SortedLinkedList.Borrow and BorrowMut for String and Vec.Deque::{swap, swap_unchecked, swap_remove_front, swap_remove_back}.String::from_utf8_unchecked const.PartialEq and Eq for Deque.alloc feature to enable alloc-Vec interoperability.TryFrom<alloc::vec::Vec> impl for Vec.TryFrom<Vec> impl for alloc::vec::Vec.truncate to IndexMap.get_index and get_index_mut to IndexMap.String::uDisplay.CString.LenT generic to Vec<T, N> and VecView<T> to save memory when using a sane capacity value.index_set module.index_map module.Idx generic for SortedLinkedList to use the new LenType trait, allowing for Idx inference.LenT generic to String.Vec<T, 0> to be 0 bytesdefmt-03 to defmt.() to CapacityError.
String::push_strString::pushVec::extend_from_sliceVec::from_sliceVec::resize_defaultVec::resizeFromUtf16Error::DecodeUtf16Error to FromUtf16Error::DecodeUtf16.stable_deref_trait to a platform-dependent dependency.SortedLinkedList::pop return type from Result<T, ()> to Option<T> to match std::vec::pop.Vec::capacity is no longer a const function.PartialEq for IndexMap from V: Eq to V1: PartialEq<V2>.PartialEq for LinearMap from V: PartialEq to V1: PartialEq<V2>.FnvIndexSet type is now inside the index_set module.IndexSetIter type is now inside the index_set module and has been renamed to Iter.Bucket type is now inside the index_map module.Entry type is now inside the index_map module.FnvIndexMap type is now inside the index_map module.IndexMapIter type is now inside the index_map module and has been renamed to Iter.IndexMapIterMut type is now inside the index_map module and has been renamed to IterMut.IndexMapKeys type is now inside the index_map module and has been renamed to Keys.OccupiedEntry type is now inside the index_map module.Pos type is now inside the index_map module.VacantEntry type is now inside the index_map module.VacantEntry type is now inside the index_map module.IndexMapValues type is now inside the index_map module and has been renamed to Values.IndexMapValuesMut type is now inside the index_map module and has been renamed to ValuesMut.histbuf module has been renamed to history_buf.HistoryBuffer type has been renamed to HistoryBuf.HistoryBufferView type has been renamed to HistoryBufView.OwnedHistBufStorage type has been renamed to OwnedHistoryBufStorage.ViewHistBufStorage type has been renamed to ViewHistoryBufStorage.MpMcQueue type has been renamed to Queue.MpMcQueueView type has been renamed to QueueView.MpMcQueueInner type has been renamed to QueueInner.Q* type aliases for MpMcQueue, and rename it to just QueueQueue::split to be const.IndexMap::truncate that left the map in an inconsistent state.thumbv6m-none-eabi without portable-atomic feature.{arc,box,object}_pool! emitting clippy lints.Deque,
HistoryBuffer and SortedLinkedList to the list.MpMcQueue with mpmc_large feature.Drop for MpMcQueueVec::storage_capacity has been removed and Vec::capacity must be used instead.sorted_linked_list::Iter and sorted_linked_list::IterInner.sorted_linked_list::FindMut and sorted_linked_list::FindMutInner.Q2, Q4, Q8, Q16, Q32 and Q64 aliases for MpMcQueue have been removed.doc_auto_cfg feature which was merged into doc_cfg. Presence of the feature led to doc
build failures on nightly.Add Clone and PartialEq implementations to HistoryBuffer.
Clone and PartialEq implementations to HistoryBuffer.pool::object module level doc for detailsHistoryBuffer::as_slices()retain for IndexMap and IndexSet.StableDeref trait for pool::object::Object and pool::boxed::Box.String::from_utf8 and String::from_utf8_unchecked.IndexMap and IndexSet now require that keys implement the core::hash::Hash
trait instead of the hash32::Hash (v0.2.0) traitpool::singleton::Box to the pool::box modulepool::singleton::Pool to BoxPool and moved it into the pool::box modulepool::singleton::arc::Arc to the pool::arc modulepool::singleton::arc::Pool to ArcPool and moved it into the pool::arc modulepool module for detailsIndexMap and IndexSet.IndexSet and IndexMap iterator types.IndexMapKeys, IndexMapValues and
IndexMapValuesMut iterator types.portable-atomic v1.0 instead of atomic-polyfill for emulating
CAS instructions on targets where they're not natively available.From<&str> for String was replaced with TryFrom<&str> because the From trait must not fail.defmt-impl is now defmt-03ufmt-impl is now ufmtcas is removed, atomic polyfilling is now opt-in via the portable-atomic feature.Vec::as_mut_slice is now a public method.ufmt functions are annotated with inline.dropping_references warning in LinearMap.[breaking-change] this crate no longer has a Minimum Supported Rust Version (MSRV) guarantee and should be used with the latest stable version of the Rust toolchain.
[breaking-change] removed the Init and Uninint type states from pool::singleton::Box
[breaking-change] removed the following pool::singleton::Box methods: freeze, forget and init
[breaking-change] removed the pool::singleton::arc::ArcInner type
[breaking-change] removed support for attributes from pool! and arc_pool!
Nothing published for this version
add more PartialEq implementations to Vec where Vec is the RHS
PartialEq implementations to Vec where Vec is the RHSheapless::String is in bytes, not charactersAdded Vec::insert(index, element)
Vec::insert(index, element)Vec::remove(index)Vec::retain(f)Vec::retain_mut(f)Added support for AVR architecture.
IndexSet and IndexMap's default method now compile time checks that their capacity is a power of two.### Added - Added into_vec to BinaryHeap
into_vec to BinaryHeapAdded support for AVR architecture.
entry API to IndexMapIntoIterator trait for IndexmapFromIterator for Stringfirst and last methods to IndexMap and IndexSetpop_{front_back}_unchecked methods to DequeVec::cloneriscv32i and riscv32imc targets unconditionally (e.g. build --no-default-features) depends on atomic-polyfillFixed pool example in docstring.
pool example in docstring.Vec::truncate(), Vec::swap_remove_unchecked(),
and Hole::move_to() (internal to the binary heap implementation).BinaryHeap elements are being dropped twicecargo test can now run on non-x86 hosts
cargo test can now run on non-x86 hostsOldestOrdered iterator for HistoryBufferatomic-polyfill is now enabled and used for cas atomic emulation on riscv targetsFix IndexMap and IndexSet bounds
IndexMap and IndexSet boundsIndexSet::new() a const fnA span of defmt versions is now supported (0.2 and 0.3)
defmt versions is now supported (0.2 and 0.3)### Fixed - Fixed so Pool is Sync on ARMv6
Pool is Sync on ARMv6ZSTs in Pool now works correctly
ArcPoolDebug impl for DequePool now works correctlypool! on thumbv6Pool on x86Added Vec::is_empty, one does not need to go through a slice anymore
SortedLinkedListVec::is_empty, one does not need to go through a slice anymoreVec::pop_unchecked is now publicImplement Default for MpMcQueue, Queue and HistoryBuffer
Default for MpMcQueue, Queue and HistoryBufferPartialOrd and Ord for Vec and StringBox::freeze is deprecated due to possibility of undefined behavior.
DequeBox::freeze is deprecated due to possibility of undefined behavior.Added new Vec::into_array method
Vec::into_array method### Changed - MPMC is now more generic ### Added - defmt for Vec and String
defmt for Vec and String[breaking-change] Converted all data structures to use the const generics MVP
const generics MVPHistoryBuffer is now working with const constructors and non-Copy dataHistoryBuffer::as_slice and others now only return initialized valuesDeref, AsRef and Debug for HistoryBufferMultiCore/SingleCore and Uxx is now removed from spsc::Queuespsc::Queue is now usize onlyspsc::Queue now sacrifices one element for correctness (see issue #207), i.e. it creates an N - 1 sized queue instead of the old that generated an size N queueString has had utf8 related methods removed as this can be done via strAsSlice traits any more, now using AsRef and AsMut as they work with any size of array nowPool and MPMC now works on thumbv6mIndexMap::new() is now a const-fn### Fixed - Security issue.
[breaking-change] The version of the generic-array dependency has been bumped to v0.14.2.
generic-array dependency has been
bumped to v0.14.2.Performance improvements in histbuf
as_mut_vec for Stringset_len for VechistbufProducer was made Send for single core applicationsAdded extra methods to Vec: from_slice, starts_with, ends_with
HistoryBufferVec: from_slice, starts_with, ends_withufmt support for String and Vecpool support for bare-metal armebv7r- targetspool for x86Added StableDeref implementation for pool::Box and pool::Box.
StableDeref implementation for pool::Box and pool::singleton::Box.Extend the ARMv7-A Pool support to the bare-metal armv7a- targets.
Pool support to the bare-metal armv7a- targets.Fixed incorrect overflow behavior in computation of capacities
mpmc::Queue::dqueue that led to an infinite loopspsc::Queue iterators now implement the double ended iterator traitopt-out cas feature to disable parts of the API that use CAS instructions.
Useful if using a custom (i.e. not built-in) rustc target that does not have CAS
instructions.
singleton Pool support on ARMv7-A devices
### Added - Added armv8 support - Added Queue::peek - Added BinaryHeap::peek_mut
Queue::peekBinaryHeap::peek_mutPool now implements the Sync trait when targeting ARMv7-R.
Pool now implements the Sync trait when targeting ARMv7-R.
Most data structures can now be constructed in "const context" (e.g. static [mut] variables) using a newtype in heapless::i.
Pool has gained a grow_exact method to more efficiently use statically
allocated memory.
The pool! macro now accepts attributes.
mpmc::Q* a family of fixed capacity multiple-producer multiple-consumer
lock-free queues.
binary_heap::Kind is now a sealed trait.[breaking-change] The "smaller-atomics" feature has been removed. It is now always enabled.
[breaking-change] The "min-const-fn" feature has been removed. It is now always enabled.
[breaking-change] The MSRV has been bumped to Rust 1.36.0.
[breaking-change] The version of the generic-array dependency has been
bumped to v0.13.0.
Nothing published for this version
Nothing published for this version
Implemented PartialEq, PartialOrd, Eq, Ord and Hash for pool::Box and pool::Box.
PartialEq, PartialOrd, Eq, Ord and Hash for pool::Box
and pool::singleton::Box.core::mem::MaybeUninit
that occurred when using some of our data structures with types that implement
Drop.Added a memory pool that's lock-free and interrupt-safe on the ARMv7-M architecture.
Added a memory pool that's lock-free and interrupt-safe on the ARMv7-M architecture.
IndexMap have gained Eq and PartialEq implementations.
All containers now implement Clone
All containers now implement Clone
spsc::Queue now implements Debug, Hash, PartialEq and Eq
LinearMap now implements Debug, FromIterator, IntoIter, PartialEq,
Eq and Default
BinaryHeap now implements Debug and Default
String now implements FromStr, Hash, From<uxx> and Default
Vec now implements Hash and Default
A "serde" Cargo feature that when enabled adds a serde::Serialize and
serde::Deserialize implementations to each collection.
Add a new type parameter to spsc::Queue that indicates whether the queue is only single-core safe, or multi-core safe. By default the queue is multi-c
spsc::Queue that indicates whether the queue is
only single-core safe, or multi-core safe. By default the queue is multi-core
safe; this preserves the current semantics. New unsafe constructors have
been added to create the single-core variant.[breaking-change] All Cargo features are disabled by default. This crate now compiles on stable by default.
[breaking-change] All Cargo features are disabled by default. This crate now compiles on stable by default.
[breaking-change] RingBuffer has been renamed to spsc::Queue. The ring_buffer module has been renamed to spsc.
[breaking-change] The bounds on spsc::Queue have changed.
Uxx trait has been removed from the public API.Implemented IntoIterator and FromIterator for Vec
IntoIterator and FromIterator for Vecready methods to ring_buffer::{Consumer,Producer}const functions into normal functions when
disabled.RingBuffer when disabled.RingBuffer.len functionThe capacity of RingBuffer. It should be the requested capacity plus not twice that plus one.
RingBuffer. It should be the requested capacity plus not twice that plus one.RingBuffer.enqueue_unchecked an unchecked version of RingBuffer.enqueue
RingBuffer.enqueue_unchecked an unchecked version of RingBuffer.enqueueBinaryHeap.pop_unchecked an unchecked version of BinaryHeap.pop
BinaryHeap.pop_unchecked an unchecked version of BinaryHeap.popBinaryHeap.push_unchecked an unchecked version of BinaryHeap.push
BinaryHeap.push_unchecked an unchecked version of BinaryHeap.pushA re-export of generic_array::ArrayLength, for convenience.
generic_array::ArrayLength, for convenience.Fixed capacity implementations of IndexMap and IndexSet.
IndexMap and IndexSet.Extend implementation to VecPartialEq implementations to Vec[breaking-change] The capacity of all data structures must now be specified using type level integers (cf. typenum). See documentation for details.
[breaking-change] The capacity of all data structures must now be specified using type level
integers (cf. typenum). See documentation for details.
[breaking-change] BufferFullError has been removed in favor of (a) returning ownership of the
item that couldn't be added to the collection (cf. Vec.push), or (b) returning the unit type
when the argument was not consumed (cf. Vec.extend_from_slice).
Unchecked methods to dequeue and enqueue items into a RingBuffer via the Consumer and Producer end points.
RingBuffer via the Consumer and
Producer end points.RingBuffer now has a generic index type, which default to usize for backward compatibility.
Changing the index type to u8 or u16 reduces the footprint of the RingBuffer but limits its
maximum capacity (254 and 65534, respectively).A BinaryHeap implementation. BinaryHeap is a priority queue implemented with a binary heap.
BinaryHeap implementation. BinaryHeap is a priority queue implemented with a binary heap.Dereferencing heapless::Vec no longer incurs in a bounds check.
heapless::Vec no longer incurs in a bounds check.LinerMap::new is now a const fn
LinerMap::new is now a const fnA LinearMap implementation. LinearMap is a map / dict backed by an array and that performs lookups via linear search.
swap_remove method to VecLinearMap implementation. LinearMap is a map / dict backed by an array and that performs
lookups via linear search.Fixed size version of std::String
std::StringVec now implements both fmt::Debug, PartialEq and Eq.
Vec now implements both fmt::Debug, PartialEq and Eq.
resize and resize_default methods to Vec.
A single producer single consumer mode to RingBuffer.
A single producer single consumer mode to RingBuffer.
A truncate method to Vec.
[breaking-change] Both Vec::new and RingBuffer::new no longer require an initial value. The
signature of new is now const fn() -> Self.
[breaking-change] The error type of all operations that may fail has changed from () to
BufferFullError.
Both RingBuffer and Vec now support arrays of any size for their backup storage.
[Unreleased]: https://github.com/rust-embedded/heapless/compare/v0.9.3...HEAD [v0.9.3]: https://github.com/rust-embedded/heapless/compare/v0.9.2...v0.
Your coding agent can read these notes before it upgrades. Set up the MCP server →