# rust-embedded/heapless

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/rust-embedded-heapless).**

1,977 stars · 241 forks · Rust · Apache-2.0

## Links

- GitHub: https://github.com/rust-embedded/heapless
- awesome-repositories: https://awesome-repositories.com/repository/rust-embedded-heapless.md

## Topics

`data-structures` `no-std` `rust`

## Description

Heapless is an embedded Rust data structure library that provides statically allocated, fixed-capacity collections for memory-constrained systems. It implements a zero-allocation runtime model where all collection elements are stored inline within their own value structure, completely removing the need for operating system interaction, global allocators, or runtime heap allocation. 

Capacity is specified at compile time through generic type parameters, ensuring every collection has a fixed upper bound known before execution. The library implements core language traits to provide standard collection behavior, allowing drop-in compatibility with standard library types while maintaining strict safety guarantees and bounds checking for bare-metal microcontrollers and safety-critical software engineering.

## Tags

### Programming Languages & Runtimes

- [Fixed-Capacity Buffers](https://awesome-repositories.com/f/programming-languages-runtimes/static-memory-allocations/fixed-capacity-buffers.md) — Stores data in statically sized buffers without requiring dynamic memory allocation for memory-constrained systems. ([source](https://github.com/rust-embedded/heapless#readme))
- [Capacity Bounds](https://awesome-repositories.com/f/programming-languages-runtimes/compile-time-type-inspection/capacity-bounds.md) — Ensures every collection has a fixed upper bound known at compilation time through generic parameters.
- [Embedded Data Structure Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/programming-language-varieties/programming-languages/systems-languages/rust/operating-systems/embedded-rust/embedded-data-structure-libraries.md) — Provides statically allocated, heapless data structures designed for memory-constrained embedded systems.
- [Standard Library Compatibility Traits](https://awesome-repositories.com/f/programming-languages-runtimes/programming-language-varieties/programming-languages/type-systems/trait-based-polymorphism/traits/interface-trait-applications/standard-library-compatibility-traits.md) — Implements core language traits to provide standard collection behavior for drop-in standard library compatibility.

### Data & Databases

- [Fixed-Capacity Containers](https://awesome-repositories.com/f/data-databases/fixed-capacity-containers.md) — Enforces strict bounds checking and stack-based allocation for memory-safe embedded application buffers.
- [Generator-Based Iterators](https://awesome-repositories.com/f/data-databases/collection-iterators/sequential-iterators/generator-based-iterators.md) — Traverses sequences and manipulates data using standard iterator patterns that evaluate lazily without intermediate allocations.

### Operating Systems & Systems Programming

- [Inline Value Structures](https://awesome-repositories.com/f/operating-systems-systems-programming/kernel-core-internals/process-and-memory-management/memory-management/allocation-strategies/dynamic-memory-allocation/stack-allocation-optimizations/inline-value-structures.md) — Stores all collection elements inline within their own value structure, completely removing the need for runtime heap allocation.

### Software Engineering & Architecture

- [Embedded Systems Development](https://awesome-repositories.com/f/software-engineering-architecture/development-methodologies/application-targets-domains/embedded-systems-development.md) — Targets software development for microcontrollers and hardware devices with strict memory limits where heap allocation is unavailable.
- [Safety Engineering](https://awesome-repositories.com/f/software-engineering-architecture/safety-engineering.md) — Develops reliable code that eliminates common memory management errors by enforcing strict compile-time bounds and static sizing.
- [Zero-Allocation Runtime Models](https://awesome-repositories.com/f/software-engineering-architecture/zero-allocation-architectures/zero-allocation-runtime-models.md) — Operates without operating system interaction or global allocators, making data structures safe for bare-metal microcontrollers.
- [Zero-Allocation Data Processing](https://awesome-repositories.com/f/software-engineering-architecture/zero-allocation-data-processing.md) — Avoids dynamic memory allocation entirely to prevent fragmentation and latency spikes in high-performance application code.
