dsbj66959 2014-05-20 14:52
浏览 64
已采纳

我可以编写go语言库以用于其他语言吗? [关闭]

I'm writing relatively small, but not simple networking library which is going to be used at least from C,java,python,ruby and C#. Is there a way to make go bindings to the other languages the way in can be done form C? If not is there other way?

  • 写回答

2条回答 默认 最新

  • doutuan4361 2014-05-20 18:53
    关注

    Right now, you can't write libraries in Go that can be used in other languages. Go has a runtime environment that does a lot of things (like sheduling go-routines, collecting garbage) for you. This runtime environment is written under the assumption that it controls the whole program. This assumption does not hold if Go code would be used from inside another language, as the Go library cannot influence the binary that uses it.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 luckysheet
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码
  • ¥50 随机森林与房贷信用风险模型
  • ¥50 buildozer打包kivy app失败
  • ¥30 在vs2022里运行python代码
  • ¥15 不同尺寸货物如何寻找合适的包装箱型谱
  • ¥15 求解 yolo算法问题
  • ¥15 虚拟机打包apk出现错误