Repository navigation
connect-zig v0.2.0
It builds on colibri v0.18.1 and on stdx v0.1.2, with Zig 0.16.0. Two changes to the API are
marked below.
Added
- brotli both ways. A program places
connect.BrotliEncoderinEncoders.brotli, and a server
or a client then writesbr: stdx's encoder at level 1 with a 128 KiB window, in 519 KiB.
Before,brwas read and not written.
Changed
- CI runs connectrpc's conformance suite v1.0.7, where it ran v1.0.4: the server passes its 3714
cases, and the client its 10711. - JSON encode writes a message with no member,
{}, in one stdx call: tree's JSON encode takes
27% fewer instructions. - Changes the API.
compression.compressandcompression.choosetake the encoders as
*const Encoders, sinceEncodersholds three pointers now. A call passes&encoders. - connect-zig builds on colibri v0.18.1 and on stdx v0.1.2, the tag colibri pins. A program that
names stdx itself pins that tag too, so it links one stdx. - A server reads a large request body in a time that grows with its length. On colibri v0.17.3
the time grew with the square of the pieces the body arrived in. - Changes the API.
rpc.failure_oftakes the pool's response,*const client.Response, in
place of itsclient.Result, so it reads the code of a reset stream. - A call whose stream the server reset ends with the code gRPC's table gives the reset, over h2
and h3: CANCEL givescanceled, ENHANCE_YOUR_CALMresource_exhausted, INADEQUATE_SECURITY
permission_denied, and each other codeinternal. Before, each reset gaveunavailable.
Fixed
- Over HTTP/1.1, a stream that answers before its request ends keeps its connection, and a
response that ends its connection saysConnection: close, so a client never sends its next
request into a closed connection (colibri v0.17.3). - A request to a path with no route gets its 404, 405, 501 or 503 when the connection is busy,
where over HTTP/2 it could read a reset with CANCEL (colibri v0.17.3). - A Connect GET writes its query in the protocol's order:
connect,base64,compression,
encoding, thenmessage. connectrpc's conformance suite v1.0.7 checks it.
Checked
- The routed call runs in tables of 16 and 256 routes, and the performance gate counts its
instructions there too. - A full-stack check loads connect-zig's OTLP sink beside OpenTelemetry's Collector, Vector and
Rotel, each on one core. In CI's run 172, connect-zig held 4.0 times the Collector's spans a
second on x86-64 and 5.0 times on arm64, with p99 under 100 ms. It held 12.0 and 13.3 times
Vector's over TLS, and 3.0 and 3.3 times Rotel's in cleartext.
Note, 2026-11-17: the ratios above come from run 172, whose climb used coarse steps, so each
could be off by up to half. CI's run 177 refined each climb. One core of connect-zig held 3.0 and
3.4 times the Collector's spans a second over TLS, on x86-64 and arm64, and 9.5 and 10.4 times
Vector's. In cleartext it held 2.9 and 3.5 times Rotel's. The README on main gives these
numbers.