Gophercamp2026
Back to all sessions

Beyond Go: Leveraging Native C/C++ Libraries Safely with cgo

by David Komárek

About this Session

What really happens when Go’s garbage-collected runtime meets unmanaged C++ code? This talk explores how to integrate C/C++ libraries into Go applications using cgo — without sacrificing safety, maintainability, or observability. Drawing from a production DNS filtering engine backed by LMDB and integrated across runtimes, we’ll examine memory ownership rules, pointer passing constraints, runtime boundaries, and real-world pitfalls.