3 ms·
I'm afraid I'm not sure what you're referring to. For instance, I can build a simple Hello World in Zig using `zig build-exe`, and get a static executable, on w
by mlugg 2y ago
I'm afraid I'm not sure what you're referring to. For instance, I can build a simple Hello World in Zig using `zig build-exe`, and get a static executable, on which I can use `nm` to confirm that there aren't symbols from any kind of runtime. I can even trivially build the actual Zig compiler to a static binary.
(For context, by the way, I'm on the Zig "core team"; I'm a notable contributor to the project.)
- sylware 2y agommmmh... basically, generates machine code which only requires a stack (which could be used by code paths not written in zig), contained in memory pages with execute and read permission only. Ofc this machine code would interact with the other machine code (written in other languages) via the architecture calling convention (the ABI/C one).
- accelbred 2y agoThats what Zig does. It compiles down to the same stuff as C. It does not have a runtime.
- butterisgood 2y agoIt also has been very much trying to get rid of things like "undefined behavior".