4 ms·
So you can just extern the functions you want, handle all the errors internally, and stick it into your makefile with? %.o: %.zig zig build-obj *.z
by davemp 1y ago
So you can just extern the functions you want, handle all the errors internally, and stick it into your makefile with?
%.o: %.zig
zig build-obj *.zig -o *.o
Not sure I get OP’s complaint then.
- bonzini 1y agoAnything that produces object files is a lot harder to debug and maintain than a transpiler.
- davemp 1y agoNot sure I agree. If you’re going zig->C->obj, you’d still have to fix the zig source if you find an issue in the C level. If you don’t want to learn or debug in a new language then you should probably just stick with C? The goal of zig as far as I know is to make it so you can transition away from C completely. Maintaining a C target seems antithetical to breaking ties with the “C machine”.
- bonzini 1y agoYes, as I said I am looking at it exclusively from the point of view of replacing C for new code in existing programs, with a smaller cost than for example adding safe Rust bindings.