cmd/cgo
Canonical docs for cgo directives, generated bindings, and interoperability constraints.
Canonical docs for cgo directives, generated bindings, and interoperability constraints.
- Author: Go Team
- Authority: primary
- Kind: package-doc
- URL: https://pkg.go.dev/cmd/cgo
What it covers
- cgo directives
- generated bindings
- toolchain behavior and constraints
Why authoritative
Official package documentation for the cgo toolchain entrypoint.
Use when
- how does cgo work here
- what cgo directive should I use
- what are the rules for Go and C interop
Keywords
- cgo, cmd/cgo, C interop, directives, bindings