libuvcpp v1.9.0: Redefining the C++ Network Stack with Raw Performance

libuvcpp v1.9.0 is a "fill-the-gaps" release. Instead of introducing new top-level modules, this version meticulously patches up HTTP consistency, finalizes h3/WebTransport support, enhances TLS/WS server capabilities, and adds much-needed QUIC observability. More importantly, in the latest authoritative HttpArena benchmarks, libuvcpp just delivered a performance report card that demands the C++ community's attention: it ranks #1 among all C++ frameworks and sits firmly in the global top tier across all three core protocols: HTTP/1.1, HTTP/2, and HTTP/3. Performance: Dominating the Authoritative Benchmarks HttpArena is one of the most comprehensive HTTP open-source benchmarking platforms, covering HTTP/1.1, HTTP/2, HTTP/3, gRPC, and WebSocket scenarios. HTTP/1.1: Composite Score 7064 (Global #7, C++ #1) Among the 81 frameworks tested in the HTTP/1.1 benchmark, libuvcpp ranked #7 globally with a composite score of 7064, making it the highest-ranked C++ framework. It s

libuvcpp v1.9.0: Redefining the C++ Network Stack with Raw Performance

libuvcpp v1.9.0 is a "fill-the-gaps" release. Instead of introducing new top-level modules, this version meticulously patches up HTTP consistency, finalizes h3/WebTransport support, enhances TLS/WS server capabilities, and adds much-needed QUIC observability.

More importantly, in the latest authoritative HttpArena benchmarks, libuvcpp just delivered a performance report card that demands the C++ community's attention: it ranks #1 among all C++ frameworks and sits firmly in the global top tier across all three core protocols: HTTP/1.1, HTTP/2, and HTTP/3.

Performance: Dominating the Authoritative Benchmarks

HttpArena is one of the most comprehensive HTTP open-source benchmarking platforms, covering HTTP/1.1, HTTP/2, HTTP/3, gRPC, and WebSocket scenarios.

HTTP/1.1: Composite Score 7064 (Global #7, C++ #1)

Among the 81 frameworks tested in the HTTP/1.1 benchmark, libuvcpp ranked #7 globally with a composite score of 7064, making it the highest-ranked C++ framework. It sits right behind a handful of frameworks hyper-optimized for raw speed, like dusty (Zig), tako (Rust), and actix (Rust).

HTTP/1.1 Benchmark

HTTP/2: Composite Score 4339 (Global #1)

HTTP/2 is where libuvcpp truly shines. With a composite score of 4339, it took the #1 spot globally, followed by OCaml's aaraara (4188) and Mojo's flare (3870). libuvcpp performs exceptionally well across all HTTP/2 sub-configurations (baseline, static, h2c).

HTTP/2 Benchmark

HTTP/3: Composite Score 2188 (Global #1)

In the latest HTTP/3 benchmarks, libuvcpp also claimed #1 with a composite score of 2188, beating bun (TS, 1775) and flare (Mojo, 1770). HTTP/3, built on QUIC, is notoriously difficult to implement. Winning here proves that libuvcpp's investment in modern transport protocols has paid off.

HTTP/3 Benchmark

The Global Perspective

Looking at the combined leaderboards, libuvcpp is one of the few frameworks to break into the global top 10 across all three protocol families. And in HTTP/2 and HTTP/3, it goes straight to the top.

Note: Benchmark results are influenced by hardware, configuration, and testing methodologies. However, for libuvcpp to consistently land in the top tier across multiple independent protocol benchmarks speaks volumes about the strength of its underlying performance.

What’s New in v1.9.0?

Version 1.9.0 folds the development line from 1.8.11 to 1.8.15 into one release, focusing on four main areas: HTTP consistency, h3/WebTransport finalization, TLS & WebSocket server capabilities, and QUIC observability.

HTTP Consistency is the most "unsexy but critical" part of this update. The response side of h2/h3 now validates content-length—responses lying about their length will no longer be treated as successfully completed. Trailers in h1 finally go through a real chunked stream (send_trailers() / set_trailers()). Status codes like 1xx/204/304 no longer redundantly append content-length: 0. Clients can also opt-in to follow redirects (same-origin only, with a hop limit).

h3 / WebTransport: The webapp now supports h3 trailers and streaming responses (begin_chunked → write_chunk → end). WebTransport establishment timing, on_open delivery, Close/Drain capsules, and SESSION_GONE stream resets have all been aligned.

TLS & WebSocket Server Capabilities: Two practical gaps were filled: Server Name Indication (SNI) multi-certificates (wildcard, exact match priority, fallback to default), and server-side WS subprotocol selection (App config on h1, returning the first subprotocol on h2/h3).

Observability: uvcpp_quic_connection::stats() now gives you direct access to RTT, cwnd, packet loss, and send/receive counts—QUIC is no longer a black box.

⚠️ Breaking Changes: v1.9.0 introduces breaking changes: send_trailers() error code semantics on h1 have changed, and the C API's expected_body() behavior has been corrected. Public classes have new members/methods, so users compiling against older headers must recompile. The repository does not guarantee binary layout compatibility across versions.

More Than a Wrapper: Modular Architecture and WebApp

libuvcpp is organized in layers, from bottom to top: core → handle/req → net → ssl → http2 → web → webapp, with QUIC and HTTP/3 integrated as parallel transport layers.

The bottom layer is a RAII encapsulation of libuv handles and requests. Classes like uvcpp_loop, uvcpp_tcp, uvcpp_timer, and uvcpp_write give event loops and async operations clear C++ ownership semantics. The Net layer provides uvcpp_tcp_client/server and uvcpp_udp_client/server, where the TCP client is a dual-mode API: asynchronous callbacks, or synchronous wait() with timeouts.

The Web layer covers HTTP/1.1, WebSocket, and HTTP/2 (via nghttp2). All optional features are opt-in: zlib/brotli compression, OpenSSL, nghttp2, QUIC, HTTP3, and yyjson are independently toggleable. Enabling UVCPP_BUILD_WEB=ON won't silently drag in a pile of dependencies.

The WebApp Framework is a higher-level application abstraction. You write handlers, not wire formats:

uvcpp_web_app app;
app.set_port(8080)
   .use(web_middleware_access_log())
   .use(web_middleware_cors());

app.get("/hello", [](uvcpp_web_request& req, uvcpp_web_response& resp, uvcpp_web_next next) {
    resp.json_str("{\"hello\":\"world\"}");
    resp.end();
});

app.websocket("/echo", [](uvcpp_web_ws_request& ws) {
    auto* c = ws.connection();
    c->on_text([c](const std::string& m) { c->send_text(m.c_str(), m.size()); });
});

app.start();
app.join();

This snippet covers routing, middleware, JSON responses, and a WebSocket echo server—in the raw libuv C API, this would require a significant amount of boilerplate just to reach the same starting line. WebApp also comes with static file serving (ETag, Range, SPA fallback), streaming multipart uploads, request body streaming, and a WebSocket client with auto-reconnect.

For cross-language scenarios, libuvcpp provides a C ABI (uvcpp_c_*). By version 1.5.3, it had 402 functions covering foundation, net, webapp, HTTP/2, QUIC, HTTP/3, and db. The repository even includes a C# binding.

Getting Started

Prebuilt packages cover six platforms: Windows x64/arm64 (MSVC and MinGW), and Linux x64/arm64 (GCC). Each package includes both Release and Debug libraries, public headers, uvcpp.pc, and CMake package configs—no need to carry around DLLs or .so files manually.

System-level installation is straightforward:

# Debian / Ubuntu
sudo apt install libuvcpp-dev

# Fedora / RHEL
sudo dnf install libuvcpp-devel

Build requirements are C++11 or higher, CMake ≥ 3.20, MSVC 2019+ / GCC 7+ / Clang 5+. If libuv isn't found on the system, it will automatically fetch it via FetchContent.

Final Thoughts

libuv's performance has been proven repeatedly. What the C++ ecosystem truly lacks isn't another event loop, but a wrapper that doesn't sacrifice performance while feeling natural to C++ developers.

The value of libuvcpp 1.9.0 lies in how it layers on "production-grade details" one by one—HTTP consistency, HTTP/3/WebTransport, TLS SNI, WS subprotocols, QUIC metrics—while expanding its usability from a low-level library to an application stack via the WebApp framework and C ABI.

If you're already using libuv, or if you're looking for a C++ async networking solution beyond Boost.Asio, v1.9.0 deserves a spot on your comparison list. And the fact that it swept the #1 spots for both HTTP/2 and HTTP/3 on HttpArena is proof that this project's performance foundation can withstand independent scrutiny.

Share