https://github.com/codebrainz/turbine
IO event loop and wrapper around various POSIX, Linux, and Unix IO primatives.
https://github.com/codebrainz/turbine
Last synced: 9 months ago
JSON representation
IO event loop and wrapper around various POSIX, Linux, and Unix IO primatives.
- Host: GitHub
- URL: https://github.com/codebrainz/turbine
- Owner: codebrainz
- License: mit
- Created: 2023-12-19T18:33:25.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-19T18:47:54.000Z (over 2 years ago)
- Last Synced: 2025-01-15T11:47:40.092Z (over 1 year ago)
- Language: C++
- Size: 38.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Turbine
**Status:** experimental, not well-tested or meant for production.
Turbine in a single-header async IO library for C++ on Linux.
## Features
- IO event loop similar to GLib's main loop (`io` directory)
- Wrappers over Linux, POSIX and Unix IO primatives:
- Posix: fd, fifo, pipe, sigset
- Networking: socket, addrinfo, sockaddr, tcp/udp/unix client and server
- Linux: epoll, eventfd, inotify, signalfd, timerfd
## Quick Start
To use the library, first generate the header, using the Python script that
combines all of the library's headers into a single file:
```console
$ cd /path/to/turbine
$ scripts/amalgamation.py > /path/where/you/want/the/header/turbine.hpp
```
The header is Linux-specific (at this point) and requires C++20 (with GNU
extensions). You need to define `_DEFAULT_SOURCE` and use the `-std=gnu++20`
compiler flag in order to build with the header.
See the file `src/main.cpp` for a basic example on how to use it.