Cwrap: wraps C libraries in Go

Cwrap is a Go wrapper generator for C libraries. Features No Cgo types exposed out of the wrapper package, and uses as less allocation/copy as possible. C name prefix mapped to Go packages, and a wrapper package can import another wrapper package. Follows Go naming conventions. C union. Use Go language features when possible: string and bool. Multiple return values. Slice, slice of slice and slice of string. struct with methods. Go closures as callbacks. Stay out of the way when you need to do it manually for specified declarations. Usage Cwrap itself is a Go package rather than an executable program. Just fill a cwrap.Package struct literal and call its Wrap method to generate your wrapper package under $GOPATH. Here is a simple example: ...

January 1, 2014