A C++ template library for embedded systems with fixed-capacity containers and no dynamic memory allocation.
The Embedded Template Library (ETL) is a C++ template library designed for embedded systems, providing fixed-capacity containers and utilities that avoid dynamic memory allocation. It solves the problem of using STL-like functionality in resource-constrained environments where deterministic behavior and memory control are essential. The library backports C++11 features to older standards and includes embedded-specific frameworks like message routing and state machines.
Embedded systems developers working with C++ in environments with strict memory constraints, such as real-time systems, bare-metal applications, or RTOS-based projects. It's also suitable for developers using compilers with limited C++ standard support.
Developers choose ETL over the standard STL because it offers deterministic behavior, no heap usage, and fixed-capacity containers tailored for embedded systems. Its header-only design, extensive testing, and compatibility with C++03+ make it a reliable choice for predictable and performant embedded applications.
Embedded Template Library
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
All containers have fixed or maximum capacities defined at compile-time, avoiding heap usage entirely for predictable behavior in embedded systems, as stated in the README's design goals.
Backports many C++11 features like type traits and algorithms, allowing use with older compilers that lack full standard support, which is a key motivation highlighted in the documentation.
Includes utilities like message routing, finite state machines, and task scheduling tailored for embedded contexts, extending beyond standard STL functionality.
No separate compilation is needed; all functionality is in header files, simplifying integration into projects, as confirmed in the key features section.
Users must implement low-level functions for features like chrono and print (e.g., etl_get_system_clock), adding complexity and project-specific work, as detailed in the platform-specific section.
Containers cannot dynamically resize, making them unsuitable for scenarios with variable data sizes, which the README acknowledges by stating it's not a full STL replacement.
Heavy reliance on templates can increase code size and compile times, potentially impacting resource-constrained environments despite the library's focus on efficiency.