{"id":36586320,"url":"https://github.com/115jon/ekizu","last_synced_at":"2026-01-18T21:00:45.673Z","repository":{"id":203193453,"uuid":"708971767","full_name":"115jon/ekizu","owner":"115jon","description":"WIP C++ Discord library. Written in C++17.","archived":false,"fork":false,"pushed_at":"2026-01-09T04:51:39.000Z","size":6454,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2026-01-12T15:57:12.396Z","etag":null,"topics":["asio","boost","cpp17","discord","discord-api","discord-api-v10","discord-api-wrapper","discord-bot","ekizu","json","zlib-ng"],"latest_commit_sha":null,"homepage":"https://115jon.github.io/ekizu/","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/115jon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-10-23T18:53:45.000Z","updated_at":"2026-01-09T04:28:57.000Z","dependencies_parsed_at":"2024-03-31T09:45:58.015Z","dependency_job_id":null,"html_url":"https://github.com/115jon/ekizu","commit_stats":null,"previous_names":["xminent/ekizu","jontitorr/ekizu"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/115jon/ekizu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/115jon%2Fekizu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/115jon%2Fekizu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/115jon%2Fekizu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/115jon%2Fekizu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/115jon","download_url":"https://codeload.github.com/115jon/ekizu/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/115jon%2Fekizu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28550464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T20:59:07.572Z","status":"ssl_error","status_checked_at":"2026-01-18T20:59:02.799Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["asio","boost","cpp17","discord","discord-api","discord-api-v10","discord-api-wrapper","discord-bot","ekizu","json","zlib-ng"],"created_at":"2026-01-12T08:03:33.694Z","updated_at":"2026-01-18T21:00:45.668Z","avatar_url":"https://github.com/115jon.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ekizu\n\nA WIP C++ library for Discord applications.\n\n## Features\n\n- Fully asynchronous, perfect for single-threaded applications\n- Low memory footprint\n- Discord API v10 support\n- Gateway support, with auto-reconnect\n- JSON support, convert and serialize events/structures to/from JSON\n\n## Usage/Examples\n\nEkizu leverages the [asio](https://github.com/chriskohlhoff/asio) library for\nasynchronous I/O. This allows us to achieve concurrency without the need for a\nthread pool. For example:\n\n```cpp\n#include \u003cekizu/async_main.hpp\u003e\n#include \u003cekizu/http_client.hpp\u003e\n#include \u003cekizu/shard.hpp\u003e\n\nusing namespace ekizu;\n\nResult\u003c\u003e handle_event(const Event \u0026ev, const HttpClient \u0026http,\n       const asio::yield_context \u0026yield);\n\nasync_main(const asio::yield_context \u0026yield) {\n const std::string token{std::getenv(\"DISCORD_TOKEN\")};\n HttpClient http{token};\n Shard shard{ShardId::ONE, token, Intents::AllIntents};\n\n while (true) {\n  auto res = shard.next_event(yield);\n\n  if (!res) {\n   if (res.error().failed()) {\n    fmt::println(\n     \"Failed to get next event: {}\", res.error().message());\n    return res.error();\n   }\n   // Could be handling a non-dispatch event.\n   continue;\n  }\n\n  asio::spawn(\n   yield,\n   [e = std::move(res.value()), \u0026http](auto y) {\n    (void)handle_event(e, http, y);\n   },\n   asio::detached);\n }\n\n return outcome::success();\n}\n\nResult\u003c\u003e handle_event(const Event \u0026ev, const HttpClient \u0026http,\n       const asio::yield_context \u0026yield) {\n std::visit(\n  [\u0026](auto \u0026\u0026event) {\n   using T = std::decay_t\u003cdecltype(event)\u003e;\n\n   if constexpr (std::is_same_v\u003cT, MessageCreate\u003e) {\n    const auto \u0026[msg] = event;\n\n    if (msg.content == \"ping\") {\n     (void)http.create_message(msg.channel_id)\n      .content(\"pong\")\n      .send(yield);\n    }\n   }\n  },\n  ev);\n\n return outcome::success();\n}\n```\n\n\u003e This example makes use of a macro called async_main, which defines a main entrypoint that runs a boost::asio::io_context. It is not mandatory and is optionally included in the `ekizu/async_main.hpp` header.\n\nFor more feature-complete examples, see [examples](https://github.com/jontitorr/ekizu/tree/main/examples) or my bot [Saber](https://github.com/jontitorr/saber).\n\n## Getting Started\n\n### Prerequisites\n\n- [CMake](https://cmake.org/download/) (version \u003e= 3.16)\n- Compiler with C++17 support, i.e. MSVC, GCC, Clang\n\n### Installing\n\nThis library uses [CPM.cmake](https://github.com/cpm-cmake/CPM.cmake) to manage dependencies. It is an amazing package manager for CMake projects and allows us to install the entire library using the following commands:\n\n```bash\n  git clone https://www.github.com/jontitorr/ekizu\n  cd ekizu\n  cmake -S . -B build\n  cmake --build build --target install\n```\n\nFrom there you can simply integrate it into your CMake project like so:\n\n```cmake\n    find_package(ekizu REQUIRED)\n    target_link_libraries(${PROJECT_NAME} PRIVATE ekizu::ekizu)\n```\n\n## Contributing\n\nContributions, issues and feature requests are welcome. After cloning and setting up project locally, you can just submit\na PR to this repo and it will be deployed once it's accepted.\n\nTake full advantage of the [.clang-format](.clang-format) file located in the root of the project to ensure that your code is properly formatted.\n\n## Dependencies\n\n### Third party Dependencies\n\n- [fmt](https://github.com/fmtlib/fmt) (comes bundled with project)\n- [Boost (ASIO, Beast, Outcome, URL)](https://github.com/boostorg/boost) (comes bundled with project, unless you have it installed)\n- [nlohmann_json](https://github.com/nlohmann/json) (comes bundled with project)\n- [zlib](https://github.com/madler/zlib) (comes bundled with project, unless you have it installed)\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F115jon%2Fekizu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F115jon%2Fekizu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F115jon%2Fekizu/lists"}