3 ms·
I don't think that's the case. In general you can set up @import modules from the command line, and I'm not 100% sure but I think build.zig generally just temp
by throwawaymaths 2y ago
I don't think that's the case. In general you can set up @import modules from the command line, and I'm not 100% sure but I think build.zig generally just templates a command line call anyways.
- kbolino 2y agoI don't think this DSL is finalized yet, but you can see on a linked issue what the build.zig to support @import of C looks like on nightly: const translate_c = b.addTranslateC(.{ .root_source_file = b.path("src/c.h"), .target = target, .optimize = optimize, }); exe.root_module.addImport("c", translate_c.createModule()); https://github.com/ziglang/zig/issues/20648 https://github.com/ziglang/zig/issues/20648