Calling Go Functions from C/Python/Ruby/Node/Java
medium.com
medium.com
Recently, I've enjoyed using the Python cffi module to interface with C libraries:
# not tested!
this_dir = Path(__file__).parent
ffi = cffi.FFI()
ffi.cdef((this_dir / "awesome.h").read_text())
lib = ffi.dlopen(str(this_dir / "awesome.so"))
print("awesome.Add(12,99) = %d" % lib.Add(12,99))