Resizable structs in Zig
In this post I will make the case for the concept of a “runtime resizable struct” in Zig. I will then design an API by exploiting Zig’s powerful comptime functionality. If you want to skip straight to the implementation, a minimal proof of concept is available as a package on GitHub. Zig has support for many kinds of collection types in its standard library. All of them can broadly be broken down to two primitive backing types for contiguous data storage: [N]T – arrays, when you always know t