{"id":16724525,"url":"https://github.com/yunwei37/co-uring-webserver","last_synced_at":"2025-03-21T21:30:57.069Z","repository":{"id":105837065,"uuid":"437884147","full_name":"yunwei37/co-uring-WebServer","owner":"yunwei37","description":"A C++ High Performance Web Server using io_uring and cpp20 coroutine","archived":false,"fork":false,"pushed_at":"2022-03-09T14:32:03.000Z","size":100,"stargazers_count":118,"open_issues_count":2,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T05:12:32.791Z","etag":null,"topics":["coroutine","cpp20","iouring","webserver"],"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/yunwei37.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":"2021-12-13T13:30:06.000Z","updated_at":"2025-03-14T03:51:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"6989defb-527b-4c7c-928d-7d9fd7ead3a1","html_url":"https://github.com/yunwei37/co-uring-WebServer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunwei37%2Fco-uring-WebServer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunwei37%2Fco-uring-WebServer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunwei37%2Fco-uring-WebServer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunwei37%2Fco-uring-WebServer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yunwei37","download_url":"https://codeload.github.com/yunwei37/co-uring-WebServer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244874154,"owners_count":20524576,"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":["coroutine","cpp20","iouring","webserver"],"created_at":"2024-10-12T22:45:36.678Z","updated_at":"2025-03-21T21:30:57.052Z","avatar_url":"https://github.com/yunwei37.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# co-uring-webserver\n\nCo-uring-webserver is a simple high performance Web Server written in cpp20 for learning:\n\n- io_uring support for non-blocking IO\n- write concurrent code using C++20 coroutine\n\nThis repo also contains a series of learning materials for c++20 and io_uring, along with demos.\n\n本项目为 C++20 编写的 Web 服务器，可处理静态资源, 同时也包含了一些学习 c++20 与 io_uring 的相关资料:\n\n- 使用带有 IORING_OP_PROVIDE_BUFFERS 和 IORING_FEAT_FAST_POLL 的 io_uring 技术进行非阻塞 IO 请求，避免系统调用开销以及用户态-内核态内存复制；\n- 采用 c++20 std::coroutine 处理异步回调；\n- TODO: 线程池\n- TODO\n\n## demos to learn C++20, io_uring and test benchmark\n\n- [io_uring_coroutine_echo_server.cpp](demo/io_uring_coroutine_echo_server.cpp) an echo server with liburing and cpp coroutine\n- [io_uring_echo_server.c](demo/io_uring_echo_server.c) an echo server with liburing in c\n- [io_uring_echo_server.cpp](demo/io_uring_echo_server.cpp) an echo server with liburing in cpp\n- [uring_server.c](demo/uring_server.c) a basic static server with liburing\n- [liburing_cat.cpp](demo/liburing_cat.c) a cat program with liburing\n- [uring_cat.cpp](demo/uring_cat.c) a cat program using io_uring syscall interface\n\n## requirements\n\n- Linux 5.7 or higher with IORING_FEAT_FAST_POLL and IORING_OP_PROVIDE_BUFFERS required\n- gcc 10.0 or higher\n\n## build\n\n## Document in Chinese\n\n这里也包含了一些在学习 c++20 与 io_uring 相关知识的时候，翻译和撰写的中文文档，以及对应的原型实现：\n\n- io_uring 从原理到动手实践: 关于 iouring 的基本使用细节\n  - [io_uring 从原理到动手实践 part1: 使用系统调用接口实现 cat 程序](document/io_uring-by-example/io_uring-by-example1.md)\n  - [io_uring 从原理到动手实践 part2: liburing](document/io_uring-by-example/io_uring-by-example2.md)\n  - [io_uring 从原理到动手实践 part3: 使用 liburing 实现的一个网络服务器](document/io_uring-by-example/io_uring-by-example3.md) TODO\n- c++20 协程：\n  - TODO\n- [使用 c++20 协程与 io_uring 实现高性能web服务器 part1：从 echo server 开始](document/part1.md)\n\n## benchmark\n\n- for echo server： see [document/part1.md](document/part1.md)\n- TODO\n\n## reference\n\nrepos:\n\n- the liburing library [github.com/axboe/liburing](https://github.com/axboe/liburing)\n- an echo server with liburing in c [github.com/frevib/io_uring-echo-server](https://github.com/frevib/io_uring-echo-server)\n- a simple rust echo benchmark tester [github.com/haraldh/rust_echo_bench](https://github.com/haraldh/rust_echo_bench)\n- [github.com/lewissbaker/cppcoro](https://github.com/lewissbaker/cppcoro)\n- [github.com/facebookexperimental/libunifex](https://github.com/facebookexperimental/libunifex)\n- [github.com/netcan/asyncio](https://github.com/netcan/asyncio)\n\narticles:\n\n- cpp reference [en.cppreference.com/w/cpp/language/coroutines](https://en.cppreference.com/w/cpp/language/coroutines)\n- modernescpp [www.modernescpp.com/index.php/tag/coroutines](https://www.modernescpp.com/index.php/tag/coroutines)\n- TODO","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyunwei37%2Fco-uring-webserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyunwei37%2Fco-uring-webserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyunwei37%2Fco-uring-webserver/lists"}