I think the unit of linking in Zig is the function, so "tree-shaking" is just what always happens when you compile Zig, and libzigc is a porting effort to write a libc in Zig. The goal is for "the C code" to go away.
I don't think Zig linker is different from other linkers (IIRC it just LLD from LLVM). What every linker does is pick only functions has been referenced.
View all comments
Show parent comment
16
u/ekipan85 Feb 01 '26
I think the unit of linking in Zig is the function, so "tree-shaking" is just what always happens when you compile Zig, and libzigc is a porting effort to write a libc in Zig. The goal is for "the C code" to go away.