On Mon, May 22, 2023 at 6:35 PM Taco de Wolff <tacodewo...@gmail.com> wrote:
> 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? > I used the following two libraries for running JS from Go: There is a V8 binding using Cgo: https://github.com/rogchap/v8go And there is a pure Go JS interpreter: https://github.com/robertkrimen/otto > 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+unsubscr...@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/CAMV2Rqpj%3DFeu-WdBNv7CXMLe1P-C4QvPL3Rip6yGisH8TQ0TpA%40mail.gmail.com.