Skip to content
github-actions[bot] edited this page Jan 28, 2026 · 9 revisions

Elio

Elio is a modern C++20 coroutine-based asynchronous I/O library for Linux. It provides high-performance networking primitives with native support for TCP, HTTP/1.1, and TLS.

CI

Features

  • C++20 Coroutines: First-class coroutine support with co_await and co_return
  • Multi-threaded Scheduler: Work-stealing scheduler with per-worker I/O contexts
  • Async I/O Backends: io_uring (preferred) and epoll fallback
  • Signal Handling: Coroutine-friendly signal handling via signalfd
  • Synchronization Primitives: mutex, shared_mutex, semaphore, event, channel
  • Timers: sleep_for, sleep_until, yield with cancellation support
  • TCP Networking: Async TCP client/server with connection management
  • HTTP/1.1: Full HTTP client and server implementation
  • TLS/HTTPS: OpenSSL-based TLS with ALPN and certificate verification
  • RPC Framework: High-performance RPC with zero-copy serialization, checksums, and cleanup callbacks
  • Hash Functions: CRC32, SHA-1, and SHA-256 with incremental hashing support
  • Header-only: Easy integration - just include and go
  • CI/CD: Automated testing with ASAN and TSAN

Requirements

  • Linux (kernel 5.1+ for io_uring, or any modern Linux for epoll)
  • GCC 12+ with C++20 support
  • CMake 3.20+
  • liburing (optional, for io_uring backend)
  • OpenSSL (optional, for TLS/HTTPS support)

Quick Start

#include <elio/elio.hpp>

using namespace elio;

coro::task<void> hello() {
    ELIO_LOG_INFO("Hello from Elio!");
    co_return;
}

int main() {
    runtime::scheduler sched(4);
    sched.start();
    
    auto t = hello();
    sched.spawn(t.release());
    
    std::this_thread::sleep_for(std::chrono::milliseconds(100));
    sched.shutdown();
}

Wiki Contents

License

MIT License

Clone this wiki locally