Repository navigation
Conversation
sys.zig was POSIX-only, with a compile error on every Windows branch. Windows now lives in sys/windows.zig: Winsock for sockets, std.Io for files, clocks, randomness and sleep. Callers go through new helpers instead of spelling out POSIX socket setup — udpSocket, setsockopt, setReuseAddr, stdout and argsIterator — which replaced setup code repeated across src and 26 apps. The event loop waits for readiness, which libxev's IOCP backend lacked, so build.zig.zon pins a libxev fork that adds poll through the AFD driver. On Windows a UDP socket no longer fails its next receive after an ICMP port-unreachable, SO_REUSEADDR is not set (it lets another socket take a port in use there), and ECN is neither read nor set. CI gains a Windows job. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YXLKbmpkRS5DedisNs9VNp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
quic-zig now builds, tests and runs natively on Windows, and CI gains a
windows-latestjob.src/sys.zighad a compile error on every Windows branch. Windows now lives insrc/sys/windows.zig: Winsock for sockets (Zig 0.16 dropped the ws2_32 bindings, so the few we call are declared there),std.Iofor files, clocks, randomness and sleep. The 20 per-function OS switches became one supported-OS check.sys.udpSocket,setsockopt,setReuseAddr,stdoutandargsIteratorreplace socket setup,IPV6_V6ONLYmagic numbers and argument parsing that were copied acrosssrc/and 26 apps.xev.File.poll), which libxev's IOCP backend lacked.build.zig.zonpins endel/libxev@14899db, which adds poll through the AFD driver — proposed upstream in iocp: add poll, through the AFD driver mitchellh/libxev#240. Once that merges, the pin can go back to upstream.Windows behaviour worth knowing
Documented in
SPEC/STATUS.md#platforms:SIO_UDP_CONNRESET), so one departed client cannot break a server's receive loop.SO_REUSEADDRis not set: on Windows it lets another socket take a port that is in use.benchapp slow on Windows.Testing
zig build test757/757,zig build fuzz612/612, every app builds;server+benchcompleted 1000/1000 requests in 1-RTT and 0-RTT.zig build test757/757, every app builds.WebTransport echo latency,
wt-echo-server(ReleaseFast) vs quic-go v0.59.0wt_server, same Gowt_latencyclient, loopback, medians:On Windows the client timed with
QueryPerformanceCounter; Go's own clock there is too coarse for sub-millisecond round trips.🤖 Generated with Claude Code
https://claude.ai/code/session_01YXLKbmpkRS5DedisNs9VNp