Last Updated: May 22, 2026
CGO lets Go programs call into C libraries. What hasn't been covered is the cost of the bridge: how slow each crossing is, how it changes scheduling and garbage collection, how it complicates builds and deployments, and when you should pick a non-CGO path instead. This chapter focuses on those trade-offs and on the alternatives that exist for cases where CGO is too expensive.