{"id":13307550,"url":"https://github.com/etlcpp/etl","last_synced_at":"2026-03-01T15:06:54.987Z","repository":{"id":21973822,"uuid":"25298630","full_name":"ETLCPP/etl","owner":"ETLCPP","description":"Embedded Template Library","archived":false,"fork":false,"pushed_at":"2025-05-13T07:48:40.000Z","size":29193,"stargazers_count":2464,"open_issues_count":77,"forks_count":432,"subscribers_count":61,"default_branch":"master","last_synced_at":"2025-05-13T08:37:42.540Z","etag":null,"topics":["algorithms","c-plus-plus","containers","cpp","embedded-applications","library","templates"],"latest_commit_sha":null,"homepage":"https://www.etlcpp.com","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ETLCPP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"support/Class diagrams.docx","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"ETLCPP"}},"created_at":"2014-10-16T11:12:24.000Z","updated_at":"2025-05-13T06:38:20.000Z","dependencies_parsed_at":"2023-12-18T12:28:48.932Z","dependency_job_id":"5bd58adb-be49-4933-8940-c19771a39fca","html_url":"https://github.com/ETLCPP/etl","commit_stats":{"total_commits":4316,"total_committers":133,"mean_commits":32.45112781954887,"dds":"0.38670064874884147","last_synced_commit":"99d75375060b61aae49bb2fc06349b45cb2c3380"},"previous_names":[],"tags_count":344,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ETLCPP%2Fetl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ETLCPP%2Fetl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ETLCPP%2Fetl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ETLCPP%2Fetl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ETLCPP","download_url":"https://codeload.github.com/ETLCPP/etl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253990467,"owners_count":21995774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","c-plus-plus","containers","cpp","embedded-applications","library","templates"],"created_at":"2024-07-29T18:00:47.334Z","updated_at":"2026-03-01T15:06:54.979Z","avatar_url":"https://github.com/ETLCPP.png","language":"C++","readme":"# ![alt text](https://github.com/ETLCPP/etl/blob/master/images/etl64.png?raw=true) Embedded Template Library (ETL)\n\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/jwellbelove/etl)\n[![Release date](https://img.shields.io/github/release-date/jwellbelove/etl?color=%231182c3)](https://img.shields.io/github/release-date/jwellbelove/etl?color=%231182c3)\n[![Standard](https://img.shields.io/badge/c%2B%2B-98/03/11/14/17/20/23-blue.svg)](https://en.wikipedia.org/wiki/C%2B%2B#Standardization)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n![GitHub contributors](https://img.shields.io/github/contributors-anon/ETLCPP/etl)\n![GitHub forks](https://img.shields.io/github/forks/ETLCPP/etl?style=flat)\n![GitHub Repo stars](https://img.shields.io/github/stars/ETLCPP/etl?style=flat)\n\n![CI](https://github.com/ETLCPP/etl/actions/workflows/msvc.yml/badge.svg?branch=master)\n\n![CI](https://github.com/ETLCPP/etl/actions/workflows/gcc-c++11.yml/badge.svg?branch=master)\n![CI](https://github.com/ETLCPP/etl/actions/workflows/gcc-c++14.yml/badge.svg?branch=master)\n![CI](https://github.com/ETLCPP/etl/actions/workflows/gcc-c++17.yml/badge.svg?branch=master)\n![CI](https://github.com/ETLCPP/etl/actions/workflows/gcc-c++20.yml/badge.svg?branch=master)\n![CI](https://github.com/ETLCPP/etl/actions/workflows/gcc-c++23.yml/badge.svg?branch=master)\n![CI](https://github.com/ETLCPP/etl/actions/workflows/gcc-syntax-checks.yml/badge.svg?branch=master)\n\n![CI](https://github.com/ETLCPP/etl/actions/workflows/clang-c++11.yml/badge.svg?branch=master)\n![CI](https://github.com/ETLCPP/etl/actions/workflows/clang-c++14.yml/badge.svg?branch=master)\n![CI](https://github.com/ETLCPP/etl/actions/workflows/clang-c++17.yml/badge.svg?branch=master)\n![CI](https://github.com/ETLCPP/etl/actions/workflows/clang-c++20.yml/badge.svg?branch=master)\n![CI](https://github.com/ETLCPP/etl/actions/workflows/clang-c++23.yml/badge.svg?branch=master)\n![CI](https://github.com/ETLCPP/etl/actions/workflows/clang-syntax-checks.yml/badge.svg?branch=master)\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/3c14cd918ccf40008d0bcd7b083d5946)](https://www.codacy.com/manual/jwellbelove/etl?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=ETLCPP/etl\u0026amp;utm_campaign=Badge_Grade)\n\n[![](https://img.shields.io/static/v1?label=Sponsor\u0026message=%E2%9D%A4\u0026logo=GitHub\u0026color=%23fe8e86)](https://www.etlcpp.com/sponsor.html)\n\n[Project documentation](https://www.etlcpp.com/)\n\n## Motivation\n\nC++ is a powerful language for embedded systems development, with templates offering a great deal of flexibility and type safety. While the C++ Standard Library provides a wealth of well-tested functionality, it’s often not well suited to environments with strict deterministic behavior and limited resources.\n\nIn many embedded applications, dynamic memory allocation is discouraged or outright prohibited, making standard STL containers and many other components impractical or unusable.\n\nWhat’s needed is a template library specifically designed for embedded systems — one that allows developers to define fixed or maximum sizes for containers and other objects at compile time. Additionally, since many embedded toolchains still lack full support for standards beyond C++03, it's valuable to have access to a library that backports select features from later versions of the C++ Standard Library.\n\n## About the ETL\n\nThe Embedded Template Library (ETL) is not intended as a full replacement for the C++ Standard Template Library (STL), but rather as a complementary solution tailored specifically for embedded systems.\n\nIts design goals include:\n\n-\tProviding a set of containers with fixed or maximum sizes defined at compile-time.\n\n-\tOffering APIs that closely resemble those of the STL, enabling familiar and consistent usage.\n\n-\tMaintaining compatibility with C++98 while implementing many features introduced in later standards\n(C++11/14/17/20/23) where possible.\n\n-\tEnsuring deterministic behavior, which is critical in real-time and resource-constrained environments.\n\n-\tIntroducing additional components and utilities useful in embedded contexts but absent from the STL.\n\nThe ETL avoids dynamic memory allocation entirely; the heap is never used. All non-intrusive containers have a fixed capacity, allowing memory requirements to be fully determined at compile-time. This makes the ETL ideal for lower-resource embedded applications where predictability, performance, and memory control are essential.\n\nThe library is compatible with any compiler that supports C++03 or later.\n\nHelp on integrating the ETL with your project may be found here.\n\n\n## Key features of the ETL\n\n-\tActively Maintained: Developed and maintained on GitHub since 2014.\n\n-\tOpen Source: MIT licensed.\n\n-\tNo STL Dependency: Designed to operate independently of the C++ Standard Template Library.\n\n-\tNo Dynamic Memory Allocation: All storage is allocated either at compile-time or on the stack; heap usage is entirely avoided.\n\n-\tRTTI and Virtual Functions: No runtime type information (RTTI) is required. Virtual functions are used sparingly and only when strictly necessary.\n\n-\tHeader-Only Library: All functionality is provided via header files; No separate compilation needed.\n\n-\tFixed-Capacity Containers: Offers STL-like containers with fixed or maximum capacity, plus additional non-standard container types.\n\n-\tCache Efficiency: Containers use contiguous memory layouts for optimal cache performance.\n\n-\tCompact Codebase: Shared base classes (based on type) help reduce overall container code size.\n\n-\tCompile-Time Features:\n    -\tTemplated compile-time constants\n    -\tTemplate-based design pattern base classes (e.g., Visitor, Observer)\n    -\tType-safe smart enumerations\n    -\tType-safe typedefs and constants\n\n-\tEmbedded System Frameworks:\n    -\tMessage routing\n    -\tFinite state machines\n    -\tTask scheduling\n\n-\tC++11 Backports: Implements many C++11 features (type traits, algorithms, containers) for use in C++03 environments.\n\n-\tUtilities:\n    -\tCRC calculations (8, 16, 32 \u0026 64-bit)\n    -\tChecksums and hash functions\n    -\tVariants (type-safe unions)\n    -\tExtensive template support utilities\n\n-\tRobust Error Handling: Configurable error checking using asserts, exceptions, error handlers, or no checks; user’s choice.\n\n-\tThoroughly Tested:\n    -\tOver 10,000 unit tests\n    -\tTested with Visual Studio 2022, GCC 12, and Clang 14\n    -\tContinuous integration via GitHub Actions.\n\n-\tReadable and Well-Documented: Clean, maintainable source code with clear documentation.\n\n-\tSupport: Free email support available. A Slack group is available. Paid support on request.\n\n-\tArchived: A snapshot of the ETL is preserved in the Arctic Code Vault for long-term digital preservation.\n\nAny help porting the library to work under different platforms and compilers would be gratefully received.\nI am especially interested in people who are using Keil, IAR, Green Hills, TI Code Composer etc, bare metal or RTOS, and DSPs.\n\nSee (https://www.etlcpp.com) for up-to-date information.\n\n## Installing this library\n\nYou can find the setup steps [here](https://www.etlcpp.com/setup.html).\n\n### CMake\n\nOne way to use this library is to drop it somewhere in your project directory\nand then make the library available by using `add_subdirectory`\n\n```cmake\nadd_subdirectory(etl)\nadd_executable(foo main.cpp)\ntarget_link_libraries(foo PRIVATE etl::etl)\n```\n\nIf ETL library is used as a Git submodule it may require additional configuration for proper ETL version resolution by allowing the lookup for Git folder outside of the library root directory.\n\n```cmake\nset(GIT_DIR_LOOKUP_POLICY ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR)\nadd_subdirectory(etl)\n```\n\nIf you want to install this library with CMake, you can perform the following steps. On Linux,\nsuper user rights might be required to install the library, so it might be necessary to add\n`sudo` before the last command:\n\n```sh\ngit clone https://github.com/ETLCPP/etl.git\ncd etl\ngit checkout \u003ctargetVersion\u003e\ncmake -B build .\ncmake --install build/\n```\n\nAfter the library has been installed, you can use\n[find_package](https://cmake.org/cmake/help/latest/command/find_package.html) to use the library.\nReplace `\u003cmajorVersionRequirement\u003e` with your desired major version:\n\n```cmake\nfind_package(etl \u003cmajorVersionRequirement\u003e)\nadd_executable(foo main.cpp)\ntarget_link_libraries(foo PRIVATE etl::etl)\n```\n\n\nAlternatively you can use [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html),\nreplacing `\u003ctargetVersion\u003e` with the version to install based on a git tag:\n\n```sh\nInclude(FetchContent)\n\nFetchContent_Declare(\n  etl\n  GIT_REPOSITORY https://github.com/ETLCPP/etl\n  GIT_TAG        \u003ctargetVersion\u003e\n)\n\nFetchContent_MakeAvailable(etl)\n\nadd_executable(foo main.cpp)\ntarget_link_libraries(foo PRIVATE etl::etl)\n```\n\n## Profile definition\n\nWhen using ETL in a project, there is typically an `etl_profile.h` defined to\nadjust ETL to the project needs. ETL will automatically find `etl_profile.h`\nif it is available in the include path(s). If it's not available, ETL will\nwork with default values.\n\n### Example\n\n```\n#ifndef __ETL_PROFILE_H__\n#define __ETL_PROFILE_H__\n\n#define ETL_TARGET_DEVICE_GENERIC\n#define ETL_TARGET_OS_NONE\n\n#define ETL_NO_STL\n\n#endif\n```\n\n## Platform specific implementation\n\nAlthough ETL is generally a self-contained header-only library, some interfaces need to be\nimplemented in every project or platform, at least if those interfaces are actually being\nused, due to project specifics:\n\n| ETL header | Platform specific API to be implemented | Needed when using                   |\n|------------|-----------------------------------------|-------------------------------------|\n| `chrono.h` | `etl_get_high_resolution_clock()`       | `etl::high_resolution_clock::now()` |\n|            | `etl_get_system_clock()`                | `etl::system_clock::now()`          |\n|            | `etl_get_steady_clock()`                | `etl::steady_clock::now()`          |\n| `print.h`  | `etl_putchar()`                         | `etl::print()`                      |\n|            |                                         | `etl::println()`                    |\n\n### Example\n\n```\n#include \u003cetl/chrono.h\u003e\n#include \u003cetl/print.h\u003e\n\nextern \"C\"\n{\n\netl::chrono::high_resolution_clock::rep etl_get_high_resolution_clock()\n{\n  return etl::chrono::high_resolution_clock::rep(static_cast\u003cint64_t\u003e(getSystemTimeNs()));\n}\n\netl::chrono::system_clock::rep etl_get_system_clock()\n{\n  return etl::chrono::system_clock::rep(static_cast\u003cint64_t\u003e(getSystemTimeNs()));\n}\n\netl::chrono::system_clock::rep etl_get_steady_clock()\n{\n  return etl::chrono::system_clock::rep(static_cast\u003cint64_t\u003e(getSystemTimeNs()));\n}\n\nvoid etl_putchar(int c)\n{\n  putByteToStdout(static_cast\u003cuint8_t\u003e(c));\n}\n\n}\n```\n\nThe following default values apply if the respective macros are not defined\n(e.g. in `etl_profile.h`):\n\n| Macro                                         | Default                    |\n|-----------------------------------------------|----------------------------|\n| `ETL_CHRONO_SYSTEM_CLOCK_DURATION`            | `etl::chrono::nanoseconds` |\n| `ETL_CHRONO_SYSTEM_CLOCK_IS_STEADY`           | `true`                     |\n| `ETL_CHRONO_HIGH_RESOLUTION_CLOCK_DURATION`   | `etl::chrono::nanoseconds` |\n| `ETL_CHRONO_HIGH_RESOLUTION_CLOCK_IS_STEADY`  | `true`                     |\n| `ETL_CHRONO_STEADY_CLOCK_DURATION`            | `etl::chrono::nanoseconds` |\n\n## Arduino library\n\nThe content of this repo is available as a library in the Arduino IDE (search for the \"Embedded Template Library\" in the IDE library manager). The Arduino library repository is available at ```https://github.com/ETLCPP/etl-arduino```, see there for more details.\n","funding_links":["https://github.com/sponsors/ETLCPP"],"categories":["Packages, Libraries and RTOSes"],"sub_categories":["STL"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetlcpp%2Fetl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fetlcpp%2Fetl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetlcpp%2Fetl/lists"}