zig translate-c to Read C as Zig
Convert C source into Zig code.
Read C as Zig
Sometimes you want to see C as plain Zig source. The zig translate-c command converts a C file into readable Zig.
zig translate-c input.cIt Prints to stdout
By default translate-c writes the generated Zig to stdout. Redirect it to a file when you want to keep and edit the result.
zig translate-c input.c > out.zigAll lessons in this course
- Import C Headers with @cImport
- Calling C Functions and Linking
- C Pointers, Strings, and Types
- zig translate-c to Read C as Zig