Embedded rework of C++ STL
Free`basic_string`, `basic_ostream` etc. leaned way down. Cross platform (including AVR).
About Embedded rework of C++ STL
estdlib is a C++ standard library implementation specifically adapted for embedded environments. It provides a lightweight, header-only library that follows a layered design (layer1-layer3) to offer explicit memory management without dynamic allocation or virtual functions. The library includes components such as character conversion (from_chars/to_chars), chrono primitives with FreeRTOS clock support, functional utilities, locale with multiple languages, optional, IO streams (ostream/istream) with non-blocking behavior, circular queues, vectors, and span/buffer views. It is cross-platform, including support for AVR microcontrollers, and aims to enable standard-like features as early as C++11, with some features available in C++98.
Key Features
Pros & Cons
- Eliminates dynamic allocation and virtual functions, reducing memory overhead and improving determinism
- Highly portable across embedded platforms including AVR, ARM, and others
- Supports C++11 and even some C++98 features for legacy compilers
- Explicit memory management layers (layer1–layer3) provide control over allocation
- Non-blocking I/O design suitable for real-time and interrupt-driven environments
- Includes practical utilities like circular queues and optional with low overhead
- Reduced robustness compared to full std:: implementation (e.g., streams are lighter but less feature-rich)
- Non-standard implementations may require adaptation for developers accustomed to std::
- Limited simultaneous locale support (only one locale at a time due to template-based approach)
- Smaller community and documentation compared to the official C++ Standard Library