3 ms·
In which case, you can simply use the binary. Zig make is easier to consume external code, why have a separate process for consuming binaries from Zig vs. every
by ayende 5y ago
In which case, you can simply use the binary. Zig make is easier to consume external code, why have a separate process for consuming binaries from Zig vs. everything else?
- pjmlp 5y agoWhere does it say @import works with binary modules?
- defen 5y agoTo do this in Zig you would ship a binary + a "header" file that looks like: `pub extern fn foo(c_int) c_int;` etc. then import with `usingnamespace @import("./my_header.zig");` and now you have a function `foo` that you can call; then you just need to link with the object file that defines it. Is your complaint that you still need the "header" file? What language / tools do you use that let you skip that part?