Guide agents through Zig's C interoperability: @cImport/@cInclude for calling C, translate-c for header inspection, extern struct and packed struct for ABI-compatible types, exporting Zig for C consumption, and zig cc for mixed C/Zig builds.
translate-c converts C headers to Zig declarations, letting you see exactly how Zig sees a C API:
This is Zig's equivalent of bindgen — you use it to understand what Zig generates, then use @cImport directly in code.
Zig C 상호 운용성 기술. Zig에서 C 호출, C에서 Zig 호출, @cImport 및 @cInclude 사용, C 헤더에서 번역-c 실행, extern 구조체 및 패킹된 구조체 정의, C ABI 유형 일치 또는 혼합 C/Zig 프로젝트 빌드 시 사용합니다. @cImport, @cInclude,translate-c, extern struct, Packed struct, Zig C ABI, Zig에서 C 호출, Zig를 C로 내보내기 또는 bindgen 등가물에 대한 쿼리에 대해 활성화됩니다. 출처: mohitmishra786/low-level-dev-skills.