Skip to content

Part 17. Interfacing with C

Zig works unusually well with C because it treats C as a first-class part of systems programming.

SectionTitle
1Why Zig Works Well with C
2@cImport
3Calling C Functions
4Using C Structs
5Linking C Libraries
6Building Mixed Zig and C Projects
7Exporting Zig to C
8ABI Compatibility
9Working with Headers
10Wrapping Existing Libraries