websocket.zig #
the first-party websocket library is a fork of
karlseguin/websocket.zig,
canonical at tangled.org/zzstoatzz.io/websocket.zig,
maintained to track zig 0.16 — chiefly threading std.Io through the server.
the fork and upstream are not drop-in compatible: the server entry point
disagrees on argument order (fork: WorkerState.init(allocator, io, config);
upstream: (io, allocator, config)). a consumer's http.zig fork is paired
to one lineage — mixing lineages in one dependency graph fails to compile.
the reasoning behind allocator-before-io (and how to re-check it against
std) is in ../io/patterns.md;
the one-version-per-package-graph rule that makes lineage mixing a build
error is in ../build/dependencies.md.
when consuming: thread the Io from your event loop into WorkerState;
don't construct a fresh one per worker.
sources #
- canonical: tangled.org/zzstoatzz.io/websocket.zig (v0.1.8, 2026)
- upstream: karlseguin/websocket.zig