Hacker News new | ask | show | jobs
by bsder 21 days ago
"No no he's not dead, he's, he's restin'!"

@cImport is moving to the build system in an upcoming version (0.17, I think?). It's inconvenient, but it's unfortunately necessary.

The issue with @cImport is that when and the order the imports occur are almost impossible to define if you have multiple files and libraries. By moving it to the build system, the order now becomes deterministic and you can refer to it properly.

1 comments

@cImport is dead. It's not moving anywhere, it's being deleted.

The build system allows you to expose C libraries as Zig modules that can be imported with the normal @import builtin.