{"id":24499825,"url":"https://github.com/cyanide-burnout/fastring","last_synced_at":"2026-05-20T09:31:24.783Z","repository":{"id":210236974,"uuid":"726026743","full_name":"cyanide-burnout/FastRing","owner":"cyanide-burnout","description":"Event multiplexing library for io_uring","archived":false,"fork":false,"pushed_at":"2026-05-18T18:10:45.000Z","size":318,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-18T20:21:04.824Z","etag":null,"topics":["c","cpp","iouring","uring"],"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/cyanide-burnout.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-12-01T11:30:16.000Z","updated_at":"2026-05-18T18:10:50.000Z","dependencies_parsed_at":"2023-12-21T16:13:29.622Z","dependency_job_id":"7ba13ff5-d37c-4af9-94a7-054cbc7d2ba4","html_url":"https://github.com/cyanide-burnout/FastRing","commit_stats":null,"previous_names":["cyanide-burnout/fastring"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cyanide-burnout/FastRing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyanide-burnout%2FFastRing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyanide-burnout%2FFastRing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyanide-burnout%2FFastRing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyanide-burnout%2FFastRing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyanide-burnout","download_url":"https://codeload.github.com/cyanide-burnout/FastRing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyanide-burnout%2FFastRing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33253749,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-20T04:48:54.280Z","status":"ssl_error","status_checked_at":"2026-05-20T04:48:10.851Z","response_time":356,"last_error":"SSL_read: 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":["c","cpp","iouring","uring"],"created_at":"2025-01-21T22:15:58.058Z","updated_at":"2026-05-20T09:31:24.778Z","avatar_url":"https://github.com/cyanide-burnout.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastRing\n\n`FastRing` is a set of high-performance asynchronous I/O modules built around `io_uring` (Linux).\nIt is designed for reactive networking workloads and low-overhead event handling.\n\nThis repository includes:\n- the core event/descriptor engine (`Ring/FastRing.*`)\n- networking and protocol adapters (`FastSocket`, `FastBIO`, `Fetch`, `CURLWSCore`, `Resolver`, etc.)\n- supplementary modules (`Supplimentary/`)\n- runnable examples (`Examples/`)\n\n## What It Solves\n\nFastRing provides:\n- `SQE/CQE` multiplexing\n- submission/completion queue flow control\n- descriptor lifecycle tracking\n- `poll/watch/timeout/event` primitives with an event-loop style API\n\n## Requirements\n\n- Linux with `io_uring` support (recommended: kernel \u003e= 5.13)\n- `liburing` (some modules require \u003e= 2.6)\n- `pthread`\n- optional dependencies by module:\n  - `openssl`\n  - `libcurl`\n  - `libwebsockets`\n  - `glib-2.0` / `libuv`\n  - `avahi-client`\n  - `dbus-1`\n  - `c-ares`\n  - `protobuf-c`\n  - `systemd` (watchdog)\n\n## Repository Layout\n\n- `Ring/` - core library and adapters\n- `Supplimentary/` - extra modules (gRPC/H2O/KCP/XMPP, etc.)\n- `Examples/` - example applications with per-folder Makefiles\n- `Documentations/` - API and integration notes\n\n## Documentations\n\n- Documentation index: `Documentations/README.md`\n- `FastRing` API: `Documentations/FastRing.md`\n- `FastSocket` API: `Documentations/FastSocket.md`\n\n## Quick Start (FastRing Core)\n\nTypical lifecycle:\n1. Create a ring: `CreateFastRing()`\n2. Register operations (`poll/watch/timeout`) or submit custom SQEs via descriptor API\n3. Drive the loop: `WaitForFastRing()`\n4. Release resources: `ReleaseFastRing()`\n\nKey APIs (`Ring/FastRing.h`):\n- lifecycle: `CreateFastRing`, `ReleaseFastRing`, `WaitForFastRing`\n- descriptors: `AllocateFastRingDescriptor`, `PrepareFastRingDescriptor`, `SubmitFastRingDescriptor`, `ReleaseFastRingDescriptor`\n- poll: `AddFastRingPoll`, `UpdateFastRingPoll`, `RemoveFastRingPoll`, `SetFastRingPoll`\n- watch: `AddFastRingWatch`, `UpdateFastRingWatch`, `RemoveFastRingWatch`, `SetFastRingWatch`\n- timeout: `SetFastRingTimeout`, `SetFastRingCertainTimeout`, `SetFastRingPreciseTimeout`\n- event: `CreateFastRingEvent`, `SubmitFastRingEvent`\n- registered resources: `AddFastRingRegisteredFile`, `RemoveFastRingRegisteredFile`, `AddFastRingRegisteredBuffer`, `UpdateFastRingRegisteredBuffer`\n\n## Building Examples\n\nThere is no single top-level build target in this repo.\nBuild examples from their own directories under `Examples/*`.\n\nExample:\n\n```bash\ncd Examples/CURLWS\nmake\n./curlwstest\n```\n\nOther example targets:\n- `Examples/Avahi`\n- `Examples/H2H3Server`\n- `Examples/gRPCClient`\n- `Examples/gRPCServer`\n\nDependencies for each example are defined in its local `Makefile` via `pkg-config`.\n\n## Module Overview\n\n### Core (`Ring/`)\n\n- `FastRing` - core `io_uring` engine: submit/complete, poll/watch/timeout, descriptor lifecycle\n- `FastBuffer` - buffer pool and buffer registration helpers\n- `FastSocket` - asynchronous socket I/O on top of FastRing\n- `FastBIO` - async OpenSSL BIO transport adapter\n- `SSLSocket` - TLS socket layer built on OpenSSL\n- `ThreadCall` - cross-thread calls into the ring handler thread\n- `FastSemaphore` - reactive `sem_t` integration (glibc internals + io_uring futex ops)\n- `FastGLoop` - `GLib` loop integration\n- `FastUVLoop` - `libuv` loop integration\n- `Fetch` - asynchronous wrapper over `libcurl` multi interface\n- `CURLWSCore` - recommended WebSocket client adapter\n- `LWSCore` - deprecated WebSocket adapter (kept for compatibility)\n- `FastAvahiPoll` - Avahi poll adapter for FastRing\n- `DBusCore` - D-Bus integration\n- `Resolver` - c-ares DNS resolver integration\n- `LuaPoll` - Lua/LuaJIT bindings\n- `WatchDog` - systemd watchdog helper\n- `RingProfiler` - profiling helpers for ring activity\n- `CoRing` - C++ coroutine adapter\n\n### Supplementary (`Supplimentary/`)\n\n- `H2OCore` - H2O HTTP/2/HTTP/3 integration layer\n- `PicoBundle` - picotls/certificate bundle helper\n- `ProtoBuf` - protobuf-c support helpers\n- `gRPC` - shared gRPC-related types/utilities\n- `gRPCClient` - gRPC client implementation\n- `gRPCServer` - gRPC server implementation\n- `KCPAdapter` - KCP/FastRing adapter layer\n- `KCPService` - KCP service implementation\n- `XMPPServer` - XMPP server module\n\n## kTLS\n\nFastBIO can expose a Linux kTLS-capable transport to OpenSSL/libssl. TLS state remains owned by libssl; FastBIO implements the required BIO control hooks and maps the transport to FastRing/io_uring.\n\nRX uses `recvmsg_multishot` to preserve `TLS_GET_RECORD_TYPE` metadata and synthesizes TLS record headers expected by libssl. TX uses `sendmsg` and `TLS_SET_RECORD_TYPE` for control records. `setsockopt(TCP_ULP/TLS_TX/TLS_RX)` is submitted asynchronously through io_uring.\n\nkTLS is opportunistic. Unsupported ciphers, directions, kernels or socket states fall back to the normal userspace TLS path.\n\nImportant: kTLS-capable FastBIO sockets never use regular io_uring zerocopy sends. A prior `SEND_ZC`/`SENDMSG_ZC` on the same TCP socket can make kTLS appear to enable while preventing kTLS traffic from flowing. kTLS sendfile/`TLS_TX_ZEROCOPY_RO` is a separate path.\n\n## Limitations\n\n- Linux-only target platform\n- some modules depend on specific libc/liburing behavior\n- low-level API: descriptor and buffer lifetime must be managed carefully\n\n## License\n\nSee `LICENSE`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyanide-burnout%2Ffastring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyanide-burnout%2Ffastring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyanide-burnout%2Ffastring/lists"}