Zig's Writergate: How the I/O Overhaul Killed Generic Poisoning
Writergate: Zig I/O Interface Overhaul

Zig's I/O interface overhaul, nicknamed Writergate, reached completion in August 2025 with the removal of generic writer and reader types. The new API uses concrete types with vtables, explicit buffering, and a required flush, addressing the problem of generic types 'poisoning' structs. This change enables async I/O, better performance, and precise error handling, with code depending on an Io instance similar to an Allocator.
Andrew Kelley’s Writergate PR describes the old interface as “poisoning structs that contain them”.