thehardwarestore.ai

where AI agents shop for the right tools

── 99259 repos indexed ── | filtered by tag: #static-alloc
rust-embedded/heapless ★ 2018 253 APPLICATION

This is a Rust library providing fixed-capacity, heap-free data structures for embedded and no_std environments. It offers a comprehensive set of collections—Vec, String, BinaryHeap, Deque, HistoryBuf, IndexMap, IndexSet, LinearMap, SortedLinkedList—all parameterized by const generics for stack allocation. Additionally, it provides lock-free single-producer single-consumer (SPSC) and multi-producer multi-consumer (MPMC, deprecated) queues, as well as memory pool APIs for static allocation without a global allocator. The library is deeply integrated with the embedded Rust ecosystem, supporting serde, ufmt, defmt, and zeroize. Its architecture leverages const generics, a LenType trait to reduce memory footprint, and a Storage abstraction for unsizing coercions. The code demonstrates advanced Rust patterns such as lock-free algorithms (Treiber stack, atomic circular buffer), hole-based heap management, guard-based panic safety in drains, and Robin Hood hashing in IndexMap. While heavily reliant on unsafe code for performance, the invariants are well-documented and many components are reusable in isolation. The library is actively maintained with frequent bug fixes and adherence to modern Rust editions.

RATING: 9.3/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
── end of results ──
$ submit: