Skip to content

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 22 Aug 19:54
· 33 commits to main since this release
ac37e57

zrk speaks HTTP/2.

zrk --http2 http://host/path      # h2c, prior knowledge
zrk --http2 https://host/path     # ALPN; fails if the server declines h2

One request is in flight per connection, exactly as over HTTP/1.1. -c, the
pacing, the coordinated-omission correction, the deadline shedding and every
latency number keep the meaning they had — only the wire format changed. That is
deliberate, and multiplexing is tracked separately in #50 because it is a
measurement question before it is a code change.

Breaking: no more Windows binaries

If you run zrk on Windows, this release does not include a binary for you, and
v1.4.3 remains the last one that does.

HTTP/2 over TLS is selected by ALPN, which std.crypto.tls does not implement,
so --http2 could only ever have worked over cleartext. Getting it required a
TLS stack that does — ztls — and ztls is
Linux and macOS by design: its entropy shim is a compile error anywhere else.

This cost a working platform. Windows binaries did HTTP/1.1 over TLS perfectly
well, and they were traded for HTTP/2 over TLS on the others. The alternative —
keeping Windows on the old TLS stack behind a compile-time seam — was considered
and not taken, in favour of one code path everywhere.

Releases now ship four archives: x86_64 and aarch64, Linux and macOS.

Breaking: different TLS

https:// benchmarks now run on ztls with a Zig-built BoringSSL, not on
std.crypto.tls. Same protocol, different implementation — if you compare
numbers across this boundary, compare them knowing that.

zrk also links C for the first time. BoringSSL is built by Zig and linked in
statically, so the binaries still have nothing to install alongside them, and
every target is still cross-compiled from one machine.

Also in this release

  • --http2 (--h2c), documented in --help and the README, which are now
    checked against each other by a test rather than kept in step by hand.
  • The HTTP/2 codec is its own package,
    zoxy-io/h2 — RFC 9113 framing, RFC 7541
    HPACK, and the RFC 9113 §8.2/§8.3 field rules, with no allocator in its
    public API. It is shared with zoxy.
  • The request block is HPACK-encoded once at startup and replayed
    byte-identically on every stream, so a fixed request costs no per-request
    compression work.
  • SETTINGS_HEADER_TABLE_SIZE = 0 is advertised, which forbids the peer the
    dynamic table and keeps response decoding stateless — HPACK makes header
    decoding mandatory where HTTP/1.1 was a scan for CRLF, and this keeps that off
    the hot path.
  • CI now cross-compiles every release target on every change, so a dependency
    that breaks one is caught before a tag rather than by it.

Upgrading

Nothing changes for existing HTTP/1.1 invocations except the TLS implementation
under https://. --http2 is opt-in.