How I compiled Go to Python, and barely made it

By Almog Baku

Elevator Pitch

Showcase: how I compiled Go to use it in Python using c-bindings and barely made it to tell.

Spoiler alert: I used gopy: go–>shared lib–>c–>ffi

Spoiler alert2: it became even more complex when I wanted to do multi-arch

Spoiler alert3: I’ll present the solution

Description

It starts on a shiny day, and as all of us doing, you find yourself wondering “let’s reuse this piece, what can go wrong?” 👹 This is the story of How (and why) I compiled a Go library to be used in a Python project, and how I barely made it to tell.

In this talk, I’ll present the various ways to solve the problem, the chosen solution, how things went south, and who knows - maybe we’ll have a happy ending of a solution?

Spoiler Alert: We will. Not sure about the happiness though

Notes

Credit to Miki for the idea