{"id":22038305,"url":"https://github.com/opencyphal/cetl","last_synced_at":"2025-05-07T21:25:01.850Z","repository":{"id":65812845,"uuid":"600486887","full_name":"OpenCyphal/CETL","owner":"OpenCyphal","description":"Cyphal Embedded Template Library","archived":false,"fork":false,"pushed_at":"2025-04-15T19:54:55.000Z","size":1336,"stargazers_count":16,"open_issues_count":41,"forks_count":3,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-05-07T02:24:39.456Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/OpenCyphal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"open_collective":"opencyphal","github":"OpenCyphal"}},"created_at":"2023-02-11T16:41:07.000Z","updated_at":"2025-04-15T19:54:58.000Z","dependencies_parsed_at":"2024-03-16T21:01:51.775Z","dependency_job_id":"416398e3-6ba5-41ab-a5b3-01f88bf7d2eb","html_url":"https://github.com/OpenCyphal/CETL","commit_stats":{"total_commits":51,"total_committers":4,"mean_commits":12.75,"dds":0.4509803921568627,"last_synced_commit":"8add8d8956e9e27ecac8465f38f485da135f5eed"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenCyphal%2FCETL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenCyphal%2FCETL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenCyphal%2FCETL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenCyphal%2FCETL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenCyphal","download_url":"https://codeload.github.com/OpenCyphal/CETL/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252955832,"owners_count":21831184,"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":[],"created_at":"2024-11-30T11:05:25.886Z","updated_at":"2025-05-07T21:25:01.820Z","avatar_url":"https://github.com/OpenCyphal.png","language":"C++","funding_links":["https://opencollective.com/opencyphal","https://github.com/sponsors/OpenCyphal"],"categories":[],"sub_categories":[],"readme":"![OpenCyphal](https://opencyphal.github.io/CETL/cetl_logo_dark.svg) \\\nCyphal Embedded Template Library\n===================\n\n\u003e We like to pronounce CETL as \"settle\"\n\n[![Forum](https://img.shields.io/discourse/https/forum.opencyphal.org/users.svg?label=forum\u0026logo=discourse)](https://forum.opencyphal.org)\n\n[![Documentation](https://img.shields.io/badge/docs-doxygen%20%28html%29-green?logo=github)](https://opencyphal.github.io/CETL/)\n[![CodeQL](https://github.com/OpenCyphal/CETL/actions/workflows/codeql.yml/badge.svg)](https://github.com/OpenCyphal/CETL/actions/workflows/codeql.yml)\n[![CETLVaSt](https://github.com/OpenCyphal/CETL/actions/workflows/cetlvast.yml/badge.svg)](https://github.com/OpenCyphal/CETL/actions/workflows/cetlvast.yml)\n[![Open Bugs](https://img.shields.io/github/issues/OpenCyphal/CETL/bug?label=bugs\u0026logo=github)](https://github.com/OpenCyphal/CETL/issues?q=is%3Aopen+is%3Aissue+label%3Abug)\n\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=OpenCyphal_CETL\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=OpenCyphal_CETL)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=OpenCyphal_CETL\u0026metric=coverage)](https://sonarcloud.io/summary/new_code?id=OpenCyphal_CETL)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=OpenCyphal_CETL\u0026metric=security_rating)](https://sonarcloud.io/summary/new_code?id=OpenCyphal_CETL)\n\n\n## include\n\nThe include directory contains the CETL headers all within a folder, \"cetl\". Types found under \"cetl/pfXX\" folders and\nwithin `cetl::pfxx` namespaces are [\"polyfill\"](https://en.wikipedia.org/wiki/Polyfill_(programming)) types that adhere\nto the XX standard. For example, `cetl::pf20::span` is a type that adheres, as closely as possible, to the C++20\nspecification for the `std::span` type.\n\n\u003e Any type found directly under the cetl folder does *not* adhere to a known standard and is specific only to CETL.\n\nAlso under each \"cetl/pfXX\" folder will be a \"cetlpf.hpp\" header. These headers enable automatic polyfill behavior but do\nso by violating certain AUTOSAR-14 rules. We recommend using the CETL polyfill types directly in code that adheres\nto AUTOSAR-14.\n\nThere are currently three ways to take a dependency on CETL (see [issue #9](https://github.com/OpenCyphal/CETL/issues/9)\nfor a future 4th way):\n\n1. **Download the [release zip/tar from github](https://github.com/OpenCyphal/CETL/releases)** – This, of course, provides\nno strong link back to the CETL source and test artifacts associated with it but you have full control over it and can\ndo whatever you like within the terms of the [LICENSE](./LICENSE) including deleting everything except the one or two\ntypes you wanted to use.\n\n2. **Git Submodules** – Including CETL as a submodule is perfectly acceptable however you'll also get cetlvast which\nmight be annoying if you are looking for the bare minimum set files from CETL. It does provide a seamless update mechanism\nand is a fairly well-supported practice.\n\n3. **Filtering** – By creating a fork of CETL and using [git-filter-repo](https://github.com/newren/git-filter-repo/)\nyou can create a one-way transform from CETL to a branch in your fork that is filtered to include only the files and\nhistory you want to depend on:\n    ```bash\n    git-filter-repo --path-rename include/: --path-regex \"^include/LICENSE|^include/cetl/cetl.hpp|^include/cetl/pf20/span.hpp\"\n    ```\n    While this may seem the same as just downloading the source and picking the files you want to use the technique\n    does maintain the relevant history for the remaining files and you can repeat the process in an automated fashion\n    for any subsequent CETL patches or releases.\n\n## CETLVaSt\n\n\u003e Staying with the theme, you can call this \"settle-vast\"\n\nWe recommend you build the CETL VerificAtion SuiTe using your target toolchain and run the suite on\nyour target hardware to ensure it is fully compatible. The suite is designed to work with minimal\nplatform I/O and does not require a filesystem. On thicker platforms, like linux, CETLVaSt can be\nused to generate more robust output and even coverage reports to verify that the test suite is\ncovering the entire set of CETL types.\n\n## Project Design Tenets\n\n- **CETL supports C++14 and newer** – It is not a C++98 compatibility library, it is not a C++11 compatibility library,\nand it reserves the right to increase the base support over the years as the C++ language evolves.\n- **CETL does not supplant STL, ETL, boost, or any other full-featured C++ support library** – It is not a general-purpose\nC++ support library and is limited to the minimum set of types needed to ensure OpenCyphal C++ projects are agnostic to\nthese larger projects and are easy to integrate with.\n- **Where CETL types provide backwards compatibility, they should support direct replacement by newer concepts** – Where\nCETL types provide functionality found in newer C++ standards the CETL version will prefer mimicking the standard over\nmimicking other support libraries like Boost.\n- **CETL types will never _require_ use of the default STL heap** – They may allow use of generalized heap memory and/or\nthe default STL allocator but will always support an alternative way to manage their memory.\n- **CETL minimizes type aliasing and never injects typedef or macros into external namespaces.** – If an `std::uint8_t`\nwill suffice CETL uses that explicitly. If a function should be constexpr the constexpr keyword will be used. etc.\n- **CETL tries really, really hard to not use macros** – Except where AUTOSAR-14 Rule A16-0-1 permits, CETL does\nnot use any C macros where a C++ template or other construct will suffice.\n- **CETL is [Autosar C++14](https://www.autosar.org/fileadmin/standards/adaptive/20-11/AUTOSAR_RS_CPP14Guidelines.pdf)\ncompliant** – Where it violates Autosar rules comments will provide a clear rationale.\n- **CETL headers have minimal dependencies** – While there is a `cetl/cetl.hpp` it is minimal and does not drag a large\nset of conventions, typedefs, and other constructs that will pollute your code. Each type provided is isolated as much\nas practical and users that want to copy and paste one of the CETL headers into their project can easily elide cetl.hpp\nwith minimal effort.\n\n\n![OpenCyphal](https://opencyphal.github.io/CETL/opencyphal_logo.svg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencyphal%2Fcetl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopencyphal%2Fcetl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencyphal%2Fcetl/lists"}