英文:
Is it possible to write node.js addons in go?
问题
我猜这一切都取决于libuv和其他C/C++的粘合剂是否可以在Go可执行文件中进行某种模拟。这可能吗?如果是的,你能提供一些开始的指导吗?
谢谢!
英文:
I guess it's all about whether libuv and the other c/cpp glue can be somehow imitated from within a go executable. Is it possible? If yes, could you provide some guidance on where to start?
Thanks!
答案1
得分: 1
目前使用Go构建共享对象(shared objects)并动态链接到系统中是不可能的(读作非常复杂)。正因为这个原因,Go只能通过CGI或Fast-CGI与其他Web服务器进行接口交互。
所以我的答案是不能直接实现。也许你可以通过IPC和一个链接到Node的小型C-"代理"来实现一些功能。
英文:
At the moment it is not possible (read very complicated) to build shared objects with Go, as to dynamically link them into a system. It's for this same reason that Go can only interface with other web servers through CGI or Fast-CGI.
So my answer would be not directly. maybe you could achieve something through IPC and a small C-"proxy" that's linked into node.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论