deniz.in

Markets

Weather

Loading weather

· via dev.to (home feed)

libuvcpp 1.9.0 finalizes HTTP/3 and WebTransport, adds QUIC connection stats

libuvcpp v1.9.0 finalizes HTTP/3 and WebTransport, tightens HTTP semantics, adds SNI multi-certificate TLS and QUIC connection stats, and reports first-place HttpArena results for HTTP/2 and HTTP/3.

libuvcpp 1.9.0 finalizes HTTP/3 and WebTransport, adds QUIC connection stats

The C++ networking library libuvcpp has shipped version 1.9.0, a maintenance-heavy update that finalizes its HTTP/3 and WebTransport support, tightens HTTP behavior across protocol versions, expands TLS and WebSocket server options, and adds QUIC connection metrics. According to the release announcement on dev.to, the version consolidates the 1.8.11 through 1.8.15 development line and deliberately skips new top-level modules in favor of closing existing gaps.

HTTP consistency fixes

The protocol work is mostly about correctness. On the response side of HTTP/2 and HTTP/3, the stack now validates the content-length header, so responses that misreport their body length are rejected instead of being counted as complete. HTTP/1.1 trailers now travel through a proper chunked stream via new send_trailers() and set_trailers() methods, and responses carrying 1xx, 204 or 304 status codes no longer append a redundant content-length: 0 header. Clients also gained an opt-in mode for following redirects, limited to same-origin targets and bounded by a hop limit.

HTTP/3 and WebTransport finalized

The WebApp layer, libuvcpp's high-level application framework, now handles HTTP/3 trailers and streaming responses through a begin-chunked, write-chunk, end sequence. On the WebTransport side, the announcement lists alignment work covering establishment timing, on_open callback delivery, Close and Drain capsules, and stream resets triggered by SESSION_GONE events.

TLS, WebSocket and QUIC visibility

Two server-side additions fill practical gaps. SNI-based multi-certificate selection now supports exact-match and wildcard priority with a fallback default certificate, and servers can select WebSocket subprotocols: configurable on HTTP/1.1, with the first requested subprotocol returned on HTTP/2 and HTTP/3.

For debugging, a stats() method on uvcpp_quic_connection exposes round-trip time, congestion window size, packet loss and send/receive counters, giving operators a direct view into QUIC connections rather than leaving them opaque.

Breaking changes

The release is not a drop-in upgrade. The dev.to post notes that error code semantics for send_trailers() on HTTP/1.1 have changed, a correction to the C API's expected_body() behavior alters previous results, and public classes gained new members and methods, so code built against older headers must be recompiled. The project does not guarantee binary layout compatibility across versions.

Benchmark results, self-reported

Alongside the release, the project published results from HttpArena, a benchmarking platform covering HTTP/1.1, HTTP/2, HTTP/3, gRPC and WebSocket scenarios. In an HTTP/1.1 test of 81 frameworks, libuvcpp posted a composite score of 7064 for seventh place globally and first among C++ entrants, behind frameworks such as dusty (Zig), tako (Rust) and actix (Rust). The announcement claims first place globally in HTTP/2 with a composite score of 4339, ahead of aaraara (OCaml, 4188) and flare (Mojo, 3870), and in HTTP/3 with 2188, ahead of bun (TypeScript, 1775) and flare (Mojo, 1770).

These figures come from the project's own announcement, which itself cautions that benchmark outcomes vary with hardware, configuration and methodology. No independent verification accompanies the post.

Architecture and availability

libuvcpp is layered from bottom to top as core, handle/request, net, ssl, http2, web and webapp, with QUIC and HTTP/3 integrated as parallel transport layers. The foundation is a RAII wrapper around libuv handles and requests, and optional dependencies such as zlib/brotli, OpenSSL, nghttp2, QUIC, HTTP/3 and yyjson are individually toggleable at build time.

The WebApp framework provides routing, middleware including access logging and CORS, static file serving with ETag, Range and SPA fallback support, streaming multipart uploads, request body streaming, and a WebSocket client with auto-reconnect. A C ABI (the uvcpp_c_* functions) exposed 402 functions as of v1.5.3, and the repository includes a C# binding. Prebuilt packages cover Windows x64/arm64 (MSVC and MinGW) and Linux x64/arm64 (GCC), and the library is packaged for Debian/Ubuntu as libuvcpp-dev and Fedora/RHEL as libuvcpp-devel. Builds require C++11 or later, CMake 3.20 or newer, and MSVC 2019+, GCC 7+ or Clang 5+, with libuv fetched automatically through CMake FetchContent when it is not found on the system.

Why it matters

HTTP/3 over QUIC is steadily becoming the default transport for web traffic, and WebTransport is picking up momentum for real-time browser applications, yet mature C++ implementations remain rare. A library that finalizes both and then exposes per-connection RTT, congestion window and loss figures addresses the two hardest parts of running HTTP/3 in production: implementing it correctly and understanding what it is doing under load. The consistency fixes are less headline-friendly but matter just as much for anyone already serving traffic with the stack. For teams evaluating alternatives to Boost.Asio or raw libuv, v1.9.0 earns a place on the comparison list, though the breaking changes mean an upgrade requires a recompile and the benchmark claims deserve testing against real workloads.

  • #cpp
  • #http3
  • #quic
  • #webtransport
  • #networking