Skip to content

feat: migrate to Zig 0.16 - #93

Merged
cvik merged 1 commit into
mainfrom
fix/zig-016
Oct 10, 2026
Merged

cvik merged 1 commit into
mainfrom
fix/zig-016

Conversation

@cvik

@cvik cvik commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Summary

Migrate to Zig 0.16.0 while retaining the preallocated Linux io_uring backend.

  • Replace public peer addresses with std.Io.net.IpAddress; preserve IPv6 numeric scopes and endpoint identity at the Linux syscall boundary.
  • Update allocators, timing, randomness, process handling, examples and CI. Protocol deadlines use a monotonic clock.
  • Fix the CCM full-block XOR vectorization regression and add independent AESCCM boundary vectors.
  • Suppress only the expected warning in the intentional handler-error test; production logging is unchanged.
  • Add isolated payload benchmark filtering, migration guidance and measured performance results.

This is a breaking toolchain/address-type change. Server/client initialization and handler signatures otherwise remain unchanged.

Verification

zig build test passes all 180 tests. The repository-required zig build bench -Doptimize=ReleaseFast completes all 24 scenarios with zero reported request errors. Debug, ReleaseSafe, ReleaseFast and baseline-CPU test runs pass; normal/optimized builds, API docs, ARM64 cross-compilation and IPv6 benchmark smoke checks also pass.

Performance caveats

Five alternating isolated runs per scenario compare Zig 0.15.2 at 145100e with Zig 0.16.0. The CCM fix removes the reproducible large-payload slowdown; single-threaded 1000-byte DTLS NON throughput improves about 15% over baseline.

Performance parity is not established: single-threaded DTLS CON p99 remains about 10–21% higher, and some multi-threaded cases show throughput regression candidates. SO_REUSEPORT flow distribution adds substantial variance. NON error counts do not establish loss-free delivery.

Full measurements, reproduction commands and limitations: docs/ZIG_016_PERFORMANCE.md. Keep draft pending resolution or explicit acceptance of these concerns.

@cvik
cvik marked this pull request as ready for review October 10, 2026 15:07
@cvik
cvik merged commit 39c42dc into main Oct 10, 2026
1 check passed
@cvik
cvik deleted the fix/zig-016 branch October 10, 2026 15:07
@cvik cvik mentioned this pull request Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant