But that's back to idiom. In this case specifically in Zig a common idiom is to pass an allocator to might-allocate functions such as the growable array push function, while in Rust it would be usual to weld the allocator choice to the type itself with a constructor function e.g. Vec::with_capacity_in.