Can’t you do this in Zig with modules? I thought that’s what the ‘pub’ keyword was for.
You can’t have private fields in a struct that’s publicly available but the same is sort of true in C too. OO style encapsulation isn’t the only way to skin a cat, or to send the cat a message to skin itself as the case may be.