{"id":13521110,"url":"https://github.com/8sileus/zedio","last_synced_at":"2025-03-31T20:30:41.166Z","repository":{"id":196352741,"uuid":"694464429","full_name":"8sileus/zedio","owner":"8sileus","description":"A runtime for writing asynchronous applications with Modern C++,  based on C++20 coroutine and liburing (io-uring)","archived":false,"fork":false,"pushed_at":"2025-03-29T09:14:54.000Z","size":905,"stargazers_count":101,"open_issues_count":2,"forks_count":13,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T10:23:13.462Z","etag":null,"topics":["asynchronous","coroutines","framework","io-uring","runtime"],"latest_commit_sha":null,"homepage":"https://8sileus.github.io/zedio/","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/8sileus.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}},"created_at":"2023-09-21T03:46:38.000Z","updated_at":"2025-03-29T09:13:59.000Z","dependencies_parsed_at":"2023-12-06T12:30:35.050Z","dependency_job_id":"b7225e7a-6f62-4e0f-aacd-5a1f9cb4b381","html_url":"https://github.com/8sileus/zedio","commit_stats":null,"previous_names":["8sileus/zedlibs","8sileus/zedio"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8sileus%2Fzedio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8sileus%2Fzedio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8sileus%2Fzedio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8sileus%2Fzedio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/8sileus","download_url":"https://codeload.github.com/8sileus/zedio/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246535758,"owners_count":20793316,"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":["asynchronous","coroutines","framework","io-uring","runtime"],"created_at":"2024-08-01T06:00:28.761Z","updated_at":"2025-03-31T20:30:40.509Z","avatar_url":"https://github.com/8sileus.png","language":"C++","funding_links":[],"categories":["网络"],"sub_categories":[],"readme":"# Zedio\n\n[![C++23](https://img.shields.io/static/v1?label=standard\u0026message=C%2B%2B23\u0026color=blue\u0026logo=c%2B%2B\u0026\u0026logoColor=white\u0026style=flat)](https://en.cppreference.com/w/cpp/compiler_support)\n![Platform](https://img.shields.io/static/v1?label=platform\u0026message=linux\u0026color=dimgray\u0026style=flat)\n\n```\n  ______  ______   _____    _____    ____  \n |___  / |  ____| |  __ \\  |_   _|  / __ \\ \n    / /  | |__    | |  | |   | |   | |  | |\n   / /   |  __|   | |  | |   | |   | |  | |\n  / /__  | |____  | |__| |  _| |_  | |__| |\n /_____| |______| |_____/  |_____|  \\____/ \n                                                                       \n```\n\nDocumentation: https://8sileus.github.io/zedio/\n\nZedio is an event-driven header library for writing asynchronous applications in modern C++:\n\n## Feature:\n+ Multithreaded, work-stealing based task scheduler. (reference [tokio](https://tokio.rs/))\n+ Proactor event handling backed by [io_uring](https://github.com/axboe/liburing).\n+ Zero overhead abstraction, no virtual, no dynamic\n\n## Sub library: \n+ **I/O**\n+ **NetWorking** \n+ **FileSystem** \n+ **Time** \n+ **Sync** \n+ **Log** \n\nIt's being developed, if you're interested in zedio and want to participate in its development, see [contributing](./docs/zedio/contributing.md)\n\n# Example\n```C++\n// An echo server\n// Ignore all errors\n#include \"zedio/core.hpp\"\n#include \"zedio/net.hpp\"\n\nusing namespace zedio;\nusing namespace zedio::async;\nusing namespace zedio::net;\n\nauto process(TcpStream stream) -\u003e Task\u003cvoid\u003e {\n    char buf[1024]{};\n    while (true) {\n        auto len = (co_await (stream.read(buf))).value();\n        if (len == 0) {\n            break;\n        }\n        co_await stream.write_all({buf, len});\n    }\n}\n\nauto server() -\u003e Task\u003cvoid\u003e {\n    auto addr = SocketAddr::parse(\"localhost\", 9999).value();\n    auto listener = TcpListener::bind(addr).value();\n    while (true) {\n        auto [stream, addr] = (co_await listener.accept()).value();\n        spawn(process(std::move(stream)));\n    }\n}\n\nauto main() -\u003e int {\n    // zedio::runtime::CurrentThreadBuilder::default_create().block_on(server());\n    zedio::runtime::MultiThreadBuilder::default_create().block_on(server());\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F8sileus%2Fzedio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F8sileus%2Fzedio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F8sileus%2Fzedio/lists"}