5 ms·
Zig actually transpiles the C code into Zig code, then compiles that
by 2fast4you 3y ago
Zig actually transpiles the C code into Zig code, then compiles that
- wyldfire 3y agoNo, that is not true. `zig cc` uses libclang to compile it in the same way that clang would.
- 2fast4you 3y agoSorry, I wasn’t specific. I was talking about how cImport works in Zig. I didn’t know `zig cc` worked differently. “ Zig’s @cImport builtin is unique in that it takes in an expression, which can only take in @cInclude, @cDefine, and @cUndef. This works similarly to translate-c, translating C code to Zig under the hood.” https://ziglearn.org/chapter-4/ https://ziglearn.org/chapter-4/