4 ms·
I 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 translat
by kbolino 2y ago
I 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