News for hackers. Stuff that matters.
Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by chvrchbvrner on Wednesday July 31, 2024 @05:47AM (#41117676)
> The build system requirement may seem minor if you’re already a Zig programmer, but it’s massive if you want to attract C systems programmers.

You won't need knowledge of the build system nor a 'build.zig'.

After step 4 you would run 'zig translate-c' on 'foo.h'. Then use '@import' instead of '@cImport' in step 5 for the translated file.

'@cImport' is basically just doing that under the hood. It's an additional step for the user, that's a fair point, but I definitely wouldn't call it massive.

There are no comments on this comment yet.