News for hackers. Stuff that matters.
Re:I think Zig is hard but worth it by bitshiffed on Thursday June 01, 2023 @07:00PM (#36158610)
I love this part about zig too. It definitely makes interop with, or gradual migration from, C, much easier.

It's also the source of my major problem with zig. It doesn't have its own ABI [1].

So, if for example, you want to write a library in zig, to be used by others from zig, they must build your library with their project. That may not be an issue for smaller things; but for a large library I'd really like consumers to be able to pull in a binary with just a definition (header) file. Since zig uses the C ABI, that would currently mean translating everything to and from C at the binary interface, and losing all ziggyness in the process.

[1] https://github.com/ziglang/zig/issues/3786

There are no comments on this comment yet.