{"id":15047681,"url":"https://github.com/r533-code/colt-cpp","last_synced_at":"2026-02-25T20:03:21.458Z","repository":{"id":251279126,"uuid":"836913720","full_name":"R533-Code/colt-cpp","owner":"R533-Code","description":"C++ data structures, Unicode-aware string, allocators and other utilities used throughout the Colt Compiler.","archived":false,"fork":false,"pushed_at":"2025-04-25T14:56:21.000Z","size":9438,"stargazers_count":1,"open_issues_count":11,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-15T17:46:34.416Z","etag":null,"topics":["allocators","cpp20","data-structures","string","unicode"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/R533-Code.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}},"created_at":"2024-08-01T20:27:05.000Z","updated_at":"2025-02-08T17:01:30.000Z","dependencies_parsed_at":"2024-12-12T15:33:46.913Z","dependency_job_id":"b4aa95ec-9034-4a7f-807d-33d9411d526e","html_url":"https://github.com/R533-Code/colt-cpp","commit_stats":null,"previous_names":["r533-code/colt-cpp"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/R533-Code/colt-cpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R533-Code%2Fcolt-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R533-Code%2Fcolt-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R533-Code%2Fcolt-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R533-Code%2Fcolt-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/R533-Code","download_url":"https://codeload.github.com/R533-Code/colt-cpp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R533-Code%2Fcolt-cpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29837463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T19:08:47.527Z","status":"ssl_error","status_checked_at":"2026-02-25T18:59:04.705Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["allocators","cpp20","data-structures","string","unicode"],"created_at":"2024-09-24T21:02:49.414Z","updated_at":"2026-02-25T20:03:21.440Z","avatar_url":"https://github.com/R533-Code.png","language":"HTML","readme":"[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/R533-Code/colt-cpp/badge)](https://scorecard.dev/viewer/?uri=github.com/R533-Code/colt-cpp)\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9400/badge)](https://www.bestpractices.dev/projects/9400)\n![CodeQL](https://github.com/R533-Code/colt-cpp/actions/workflows/codeql.yml/badge.svg)\n## Colt-Cpp:\nContains helpers used throughout the Colt Compiler.\nThese include portable bit-fields, endianness utilities, io, argument parsing and data structures.\n\n![Build and Test on Linux (x86_64)](https://github.com/R533-Code/colt-cpp/actions/workflows/cmake-linux-x86_64.yml/badge.svg)\n![Build and Test on Linux (ARMv8)](https://github.com/R533-Code/colt-cpp/actions/workflows/cmake-linux-arm.yml/badge.svg)\n![Build and Test on Windows (x86_64)](https://github.com/R533-Code/colt-cpp/actions/workflows/cmake-windows-x86_64.yml/badge.svg)\n\n\n## Implemented Features:\n- ✅ Feature is done and tested.\n- ⚠️ Feature is nearly done (more testing needed).\n- ❌ Feature is not ready for use.\n\n\n| Name                            | Description                                                                                                                  | Status | Note                                                                                     |\n| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------- |\n| `Bitfields`                     | Zero-overhead bitfields whose layout is guarenteed to be portable (except for endianness).                                   | ✅      | Supports hashing and serialization.                                                      |\n| `choose_simd_implementation`    | Used to choose a different function at runtime depending on `CPUID`                                                          | ✅      | If needed, detecting more instructions sets could be added.                              |\n| `TargetEndian` Endian Detection | Represents the target endianness.                                                                                            | ✅      | There is also the `COLT_LITTLE_ENDIAN` and `COLT_BIG_ENDIAN` macros.                     |\n| Endian Conversions              | Functions such as `[hlb]to[hlb]` to go from host endianness to another endianness or vice-versa.                             | ✅      | Implemented using intrinsics.                                                            |\n|                                 |                                                                                                                              |        |\n| `uhash` and `hash_append`       | Implements universal hashing as described in [`N3980`](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3980.html). | ⚠️      | The current implemented `hash_algorithm`s are `fnv1a` and `SipHash-2-4`.                 |\n|                                 |                                                                                                                              |        |\n| `Option`                        | Optional vocabulary type with monadic operations.                                                                            | ✅      | More unit tests could be added.                                                          |\n| `Expect`                        | Expected vocabulary type with monadic operations                                                                             | ✅      | More unit tests could be added.                                                          |\n|                                 |                                                                                                                              |        |\n| Unicode Counting and Indexing   | Provides `countlen`, `unitlen`, `strlen`, `index_front`, `index_back` Unicode aware functions.                               | ✅      | More unit tests could be added.                                                          |\n| Unicode SIMD Utilities          | Provides SIMD functions to optimize `strlen` and `unitlen`.                                                                  | ✅      | See [table below](#Unicode-SIMD-Utilities:) for supported architectures.                 |\n| Unicode Aware `StringView`      | View over Unicode data in any of `UTF8`, `UTF16-[BL]E`,`UTF32-[BL]E`.                                                        | ✅      | A type-erased `StringView` could also be added, whose encoding is determined at runtime. |\n| Unicode Aware `String`          | Contiguous Unicode aware `String` with `SSO`, `count` and `middle` caching, and const segment optimization.                  | ❌      | The implementation is a work in progress.                                                |\n|                                 |                                                                                                                              |        |\n| Memory Allocators               | Provides a framework of composable allocators that allocates and deallocates `MemBlock`                                      | ⚠️      | More allocators could be added.                                                          |\n| Memory Allocators Reference     | Reference to a local or global allocator, used by all data structures.                                                       | ✅      |                                                                                          |\n|                                 |                                                                                                                              |        |\n| `BigInteger`                    | Arbitrary precision big integer.                                                                                             | ✅      | More unit tests could be added. *                                                        |\n| `BigRational`                   | Arbitrary precision big rational (`x/y`).                                                                                    | ⚠️      | Some API improvements could be done. *                                                   |\n|                                 |                                                                                                                              |        |\n| Compile-time `Map` and `BiMap`  | Hash (bi)map created at compile-time.                                                                                        | ✅      |                                                                                          |\n| Compile-time Math Functions     | `constexpr` mathematical functions.                                                                                          | ✅      |                                                                                          |\n| Overflow checks                 | Provides `checked_(add\\|sub\\|mul\\|div\\|mod)` to detect overflow/underflow.                                                   | ⚠️      | More unit tests are needed.                                                              |\n|                                 |                                                                                                                              |        |\n| Macro `FOR_EACH`                | Macro that expands another macro for each of its arguments.                                                                  | ✅      | For `MSVC`, this macro needs `/Zc:preprocessor`.                                         |\n| Macro `assert_true`             | Assert that all conditions are true.                                                                                         | ✅      | Works at compile time.                                                                   |\n| Macro `switch_no_default`       | Provides an unreachable default branch for a switch statement.                                                               | ✅      |                                                                                          |\n|                                 |                                                                                                                              |        |\n| OS `DynamicLib`                 | Represents a dynamically loaded library in a platform agnostic way.                                                          | ✅      | For Linux, `-Wl,-export-dynamic` must be specified for self-introspection.               |\n\n\\* These classes are wrappers over [`GMP`](https://gmplib.org/), which makes them already well-tested.\n\n## Unicode SIMD Utilities:\nThis project uses `simdutf` to improve the performance of Unicode-related utilities.\nHowever, more functions were needed, and I had to roll out my own SIMD versions in some cases.\n\n- ✅ Function is written and tested.\n- ⚠️ Function is written but not tested.\n- ❌ Function is not written.\n\nAll `x86_64` SIMD functions are tested using [`sde`](https://www.intel.com/content/www/us/en/developer/articles/tool/software-development-emulator.html).\nAll `NEON` SIMD functions are tested using [`QEMU`](https://www.qemu.org/).\n\n|        | `unitlen16` | `unitlen32` | `strlen8` | `strlen16` |\n| ------ | ----------- | ----------- | --------- | ---------- |\n| SSE2   | ✅           | ✅           | ✅         | ✅          |\n| SSE4.2 | ❌           | ❌           | ❌         | ❌          |\n| AVX2   | ✅           | ✅           | ✅         | ✅          |\n| AVX512 | ✅           | ✅           | ✅         | ✅          |\n| NEON   | ✅           | ✅           | ✅         | ✅          |","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr533-code%2Fcolt-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr533-code%2Fcolt-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr533-code%2Fcolt-cpp/lists"}