{"id":24560645,"url":"https://github.com/fenglielie/allay","last_synced_at":"2025-03-16T20:44:51.331Z","repository":{"id":233833939,"uuid":"787825260","full_name":"fenglielie/allay","owner":"fenglielie","description":"modern C++ utils","archived":false,"fork":false,"pushed_at":"2025-03-12T04:12:27.000Z","size":178,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T05:19:32.453Z","etag":null,"topics":["cpp","cpp20","modern-cpp"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fenglielie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-17T08:54:48.000Z","updated_at":"2025-03-12T04:12:30.000Z","dependencies_parsed_at":"2024-04-17T12:31:52.063Z","dependency_job_id":"f21590d3-9bf6-4b06-ad62-8c1e096bb3df","html_url":"https://github.com/fenglielie/allay","commit_stats":null,"previous_names":["fenglielie/cpptoybox","fenglielie/allay"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenglielie%2Fallay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenglielie%2Fallay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenglielie%2Fallay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenglielie%2Fallay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fenglielie","download_url":"https://codeload.github.com/fenglielie/allay/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243933384,"owners_count":20370988,"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":["cpp","cpp20","modern-cpp"],"created_at":"2025-01-23T07:17:22.996Z","updated_at":"2025-03-16T20:44:51.320Z","avatar_url":"https://github.com/fenglielie.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Allay\n\n\u003cdiv style=\"text-align: center;\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/fenglielie/notes_image/main/img/allay_fly.gif\" style=\"width: 50%\" title=\"Allay\"/\u003e\n\u003c/div\u003e\n\nAllay is a collection of small C++ tools for practice, provided as header-only libraries unless otherwise specified.\n\n- **mtest**: A header-only testing framework mimicking gtest.\n- **safe_input**: A component ensuring safe input handling.\n- **msignal**: An observer pattern implementation for signal transmission.\n- **mlog**:  A simple logging library.\n- **data_handler**: A component for reading and writing data files.\n- **var_type_dict**: A heterogeneous dictionary based on template metaprogramming (reference: 《C++模板元编程实战：一个深度学习框架的初步实现》).\n- **simple_thread_pool**: A simple C++ thread pool （[reference](https://www.limerence2017.com/2023/09/17/concpp07/)）.\n- **mtracer**: A simple function call stack tracing component (using C++20's `std::source_location` instead of traditional `__FILE__` and others).\n- **mparser**: A simple command-line parser.\n- **ini_parser**: A simple INI file parser.\n- **pbar**: A simple command-line progress bar display.\n- **windows_console**: A Windows-specific utility for handling console input/output with UTF-8 encoding and virtual terminal sequences. ([reference 1](https://chariri.moe/archives/408/windows-cin-read-utf8/), [reference 2](https://stackoverflow.com/questions/48176431/reading-utf-8-characters-from-console))\n- **colorful**: A C++ library for adding color to console output.\n- **mtimer**: A simple timer component.\n\n---\n\n| compiler | version | flags      |\n| -------- | ------- | ---------- |\n| clang    | 18.0.0  | -std=c++20 |\n| gcc      | 13.0.0  | -std=c++20 |\n| MSVC     | 2022    | /std:c++20 |\n\n\ngenerate and build (cmake version \u003e= 3.15)\n```bash\ncmake -S . -B build\ncmake --build ./build -j8\n```\n\ntest\n```bash\ncd ./build\nctest -j8\n```\n\nrun xxx demo\n```bash\n./bin/xxx_demo\n```\n\ninstall\n```bash\ncmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=\"~/.local/\"\ncmake --build build --target install\n```\n\nusage\n```cmake\nfind_package(allay QUIET)\nif(NOT allay_FOUND)\n    include(FetchContent)\n    FetchContent_Declare(\n        allay\n        GIT_REPOSITORY https://github.com/fenglielie/allay.git\n        # GIT_REPOSITORY git@github.com:fenglielie/allay.git\n        GIT_TAG main\n        DOWNLOAD_EXTRACT_TIMESTAMP TRUE\n    )\n    FetchContent_MakeAvailable(allay)\nendif()\n\nadd_executable(demo demo.cpp)\ntarget_link_libraries(demo PRIVATE allay::pbar)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffenglielie%2Fallay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffenglielie%2Fallay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffenglielie%2Fallay/lists"}