{"id":13601652,"url":"https://github.com/ETLCPP/etl","last_synced_at":"2025-04-11T04:31:23.825Z","repository":{"id":21973822,"uuid":"25298630","full_name":"ETLCPP/etl","owner":"ETLCPP","description":"Embedded Template Library","archived":false,"fork":false,"pushed_at":"2024-10-21T08:10:33.000Z","size":28459,"stargazers_count":2214,"open_issues_count":51,"forks_count":392,"subscribers_count":63,"default_branch":"master","last_synced_at":"2024-10-30T14:49:31.282Z","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":null,"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},"funding":{"github":"ETLCPP"}},"created_at":"2014-10-16T11:12:24.000Z","updated_at":"2024-10-30T03:49:29.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":null,"previous_names":[],"tags_count":342,"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":223458496,"owners_count":17148475,"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-08-01T18:01:05.742Z","updated_at":"2025-04-11T04:31:23.813Z","avatar_url":"https://github.com/ETLCPP.png","language":"C++","funding_links":["https://github.com/sponsors/ETLCPP"],"categories":["Frameworks","c-plus-plus","Others","Common","utility"],"sub_categories":["USB"],"readme":"Embedded Template Library (ETL)\n-------------------------\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-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/workflows/msvc/badge.svg?branch=master)\n[![Build status](https://ci.appveyor.com/api/projects/status/b7jgecv7unqjw4u0/branch/master?svg=true)](https://ci.appveyor.com/project/jwellbelove/etl/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-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-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 great language to use for embedded applications and templates are a powerful aspect. The standard library can offer a great deal of well tested functionality,  but there are some parts of the standard library that do not fit well with deterministic behaviour and limited resource requirements. These limitations usually preclude the use of dynamically allocated memory and containers with open ended sizes.\n\nWhat is needed is a template library where the user can declare the size, or maximum size of any object upfront. Most embedded compilers do not currently support the standard beyond C++ 03, therefore excluding the programmer from using the enhanced features of the later library.\n\nThis is what the ETL attempts to achieve.\n\n## Summary\n\nThe ETL is not designed to completely replace the STL, but complement it.\nIts design objective covers three areas.\n\n- Create a set of containers where the size or maximum size is determined at compile time. These containers are direct equivalents of those supplied in the STL.\n- Be compatible with C++ 03 but implement as many of the C++ 11/14/17/20 additions as possible.\n- Add other useful components that are not present in the standard library.\n\nThe embedded template library has been designed for lower resource embedded applications.\nIt contains a set of containers, algorithms and utilities, some of which emulate parts of the STL.\nThere is no dynamic memory allocation. The library makes no use of the heap. All of the containers have a fixed capacity allowing all memory allocation to be determined at compile time.\nThe library is intended for any compiler that supports C++98/03/11/14/17/20.\n\n## Main features\n\n- Cross platform. This library is not specific to any processor type.\n- No dynamic memory allocation\n- No RTTI required\n- Very little use of virtual functions. They are used only when they are absolutely necessary for the required functionality\n- A set of fixed capacity containers. (array, bitset, deque, forward_list, list, queue,  stack, vector, map, set, etc.)\n- As the storage for all of the container types is allocated as a contiguous block, they are extremely cache friendly\n- Templated compile time constants\n- Templated design pattern base classes (Visitor, Observer)\n- Reverse engineered C++ 0x11 features (type traits, algorithms, containers etc.)\n- Type-safe enumerations\n- Type-safe typedefs\n- 8, 16, 32 \u0026 64 bit CRC calculations\n- Checksums \u0026 hash functions\n- Variants (a type that can store many types in a type-safe interface)\n- Choice of asserts, exceptions, error handler or no checks on errors\n- Unit tested (currently over 9400 tests), using VS2022, GCC 12, Clang 14.\n- Many utilities for template support.\n- Easy to read and documented source.\n- Free support via email, GitHub and Slack\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## 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","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"}