cxgo

Automatically translate C code to Go with type safety and idiomatic conversions.

brewmacoslinux
Try with needOr install directly
Source

About

Transpiling C to Go

Commands

cxgo

Examples

convert a single C file to Go$ cxgo file.c
translate C code and output to specific directory$ cxgo -o output/ myprogram.c
convert C project with header files$ cxgo -I ./include *.c
generate Go package from C library source$ cxgo -package mylib lib.c
translate and include C struct definitions in Go$ cxgo -all-headers structs.c