How do libraries like OpenCV and ImageMagick written in C, work in Go? ⚡
Some of the world’s most popular libraries are written in C for their performance and over the years they have become pretty stable. But, what if I want to use them in my Go code?
Rewriting the entire library in Go is not a possible option, and hence Go offers a tool called CGO that allows us to invoke C code from Go as if it natively co-existed. I wrote a detailed post talking about about real-world integration.
Read it here - https://lnkd.in/geNdxCk4
This was Day #4 of my 30 days of Go challenge, so follow along my journey where I share non-trivial things, performance optimization, and writing efficient code in Go.
⚡ I keep writing and sharing these engineering nuggets, so if you are keen on learning them, follow along.
duggup.com/p/arpit