英文:
Is there a way to create bindings for golang library for node.js?
问题
情况很简单:我有一个Node.js应用程序,希望它能够调用我用Go语言编写的网络库中的函数。据我所了解,Node.js中有许多用于封装C/C++代码的包装器,我能否创建一个用于封装我的Go语言库的包装器呢?
有一个名为gopy的工具(http://gopy.qur.me/extensions/install.html)可以解决Python的这个问题,但我找不到类似的工具适用于Node.js。
英文:
The situation is very simple: I have a node.js application and want it to be able to call functions from my networking library written in golang. As far as I understand there are numerous wrappers around c/c++ code in node, can I create a one around my golang library?
There is a tool gopy http://gopy.qur.me/extensions/install.html which solves this problem for python, but I was unable to found something similar for node.js
答案1
得分: 1
目前似乎无法在Golang中构建共享库。在golang repos中有一个讨论此问题的问题,还有一个描述go执行模式的文档。
关于这个问题的讨论可以参考https://stackoverflow.com/questions/6125683/call-go-functions-from-c。
英文:
It seems that it is not possible right now to build shared library in golang. There's an issue talking about this in golang repos and a document describing the go execution mode.
A discussion about this https://stackoverflow.com/questions/6125683/call-go-functions-from-c
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论