https://github.com/sanix-darker/go_bind
go bindings used in a python codebase (example)
https://github.com/sanix-darker/go_bind
Last synced: 6 months ago
JSON representation
go bindings used in a python codebase (example)
- Host: GitHub
- URL: https://github.com/sanix-darker/go_bind
- Owner: Sanix-Darker
- Created: 2023-12-23T21:57:41.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-29T15:28:50.000Z (almost 2 years ago)
- Last Synced: 2025-01-29T23:28:01.534Z (8 months ago)
- Language: Go
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## GO-BIND
Manipulate objects and use functions from a golang codebase to python, using
C-shared lib with an .so.There is multiple methods i found for this:
- Using C params as args (see the code inside ./c_params/).
- Using protobuf (by defining some .proto files that later generate appropriate
code, see the code inside ./protobuf/.
- Using Gopy (the most stable solution so far), even go data-struct are
transposed into an "exported way" (some glitch but nothing unfixable, check
(./gopy/)).All solutions had to load and define typing for methods comming from the
shared libs(except for the gopy solution).Note: some .c/.h/.o files are going to be generated, don't worry, that's normal
for the communication to work properly between the two.