For automatic python bindings I have used github.com/go-python/gopy https://github.com/justinfx/pygo-plugin/blob/main/go_plugin/client.go
And for pure cpython bindings I have used: - py2: github.com/sbinet/go-python - py3: github.com/DataDog/go-python3 - Justin On Tuesday, May 23, 2023 at 5:56:34 PM UTC+12 Sebastien Binet wrote: > For CPython, there's github.com/go-python/gopy that tries to > automatically wrap a Go package into a CPython module. > > There's also go-python/gpython, a pure-Go Python3 interpreter (without all > the batteries, though). > > For JS, I guess there's GopherJS. > > hth, > -s > > May 23, 2023 02:35:15 Taco de Wolff <tacod...@gmail.com>: > > I would like to know if anyone has experience with building bindings for > JavaScript (NodeJS) and Python for a Go library. Who has worked on this, or > does anybody know of libraries that have succeeded? In particular, I have > successfully built working JS and Python bindings (see > https://github.com/tdewolff/minify/tree/master/bindings), but I have two > problems: > > - How does the Go standard library (CGO) work in conjunction with > forked/worker threads of JS/Python? See > https://github.com/tdewolff/minify/issues/518#issuecomment-1256812343 > - How can I prebuild binaries for Windows for a JS binding? In particular, > node-gyp allows you to build addons which is working fine for Linux/MacOS, > however they only permit using MSVC on WIndows and Go/CGO only can use GCC. > I'm suspecting this is behind an error we have (Error: Module did not > self-register) > > I would love to hear about example or people with experience! Thanks in > advance! > > -- > > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/7c18fb1e-1737-447c-9a86-04d52cf0b2f9n%40googlegroups.com > > <https://groups.google.com/d/msgid/golang-nuts/7c18fb1e-1737-447c-9a86-04d52cf0b2f9n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/e4421a6c-05aa-4fbd-9923-7b0118bacfdcn%40googlegroups.com.