You're going to lose a lot of zig safety and type tracking features that way. I think it's possible that there will somehow be an exportable library abi in zig, but it is not at all on the roadmap. In any case, I don't believe there are obvious ways (I do know sneaky ways to do this) to ship post-compiled-only libraries this any of the programming languages I use on a day-to-day basis and even with venerable C, the "single header library" is all the rage these days
I can even imagine a tool that picks a zig interface and transforms it into a C interface to export it from your closed-source library, and a shim that exposes the nice zig interface that talks to the uglified C interface.
That would be helpful not just for intetfacing closed zig code, but also for dynamic libraries in zig.
I'm only afraid that in many cases that would require doing the monomorphisation step...
You have to be able to export a binary interface of some sort to be able to write operating system components. As Zig is intended for system programming, the Zig implementers will surely figure this out eventually.
No it doesn't, it is just like most compiled languages, the ABI is the compiler version.
Ada packages, just like most module based languages have the necessary metadata on the libraries themselves, no need for header files.
Just like C doesn't have a stable ABI per se, there is some overlap with code produced by C compilers with the OS ABI, when the OS happens to be written in C, and that is about it.