<p>I found this one: <a href="https://github.com/mattn/go-uv" rel="nofollow">https://github.com/mattn/go-uv</a> but it hasn't been touched in a couple of years. Anything out there I'm missing?</p>
<hr/>**评论:**<br/><br/>ar1819: <pre><p>Why do you need those? "Async" programming is builtin in Go using goroutines and channels. "io" library is actually abstracting some of it for you. "net" lib abstracts almost everything. So I really curios why do you need it.</p></pre>andrewjsledge: <pre><p>I'd like to be able to take an existing application (that uses libuv) and with minimal work port it to Golang.</p></pre>ar1819: <pre><p>I would definitely not recommend it. Aside from being non "Go way", this will introduce a "huge" (in high concurrent applications) performance gap for calling C code and kill many of runtime planner performance bonuses. Don't get me wrong - I'm not saying that you shouldn't use Go. I just think you should think about "benefits". Will be they convincing enough if Go used in such way. You will be basically fighting language and it's way of doing things. Wouldn't it hit your productivity?</p>
<p>Anyway if you sure about this, I don't think you need bindings - just use cgo. You'll need any decent C compiler on Linux \ *BSD or MinGW on Windows. Keep in mind, that cgo introduce "compile time" performance hit, so your build times will not be as fast, as using pure Go. But that depends on your project size.</p>
<p>Edit: rephrasing</p></pre>bonekeeper: <pre><p>Go gives you all the benefits of UV without the complication of callbacks, state machines, etc. You can "port" a libuv based application to Go by simply writing it as you would normally do with any Go application. Think of it as the Go runtime already having libuv built-in behind the scenes doing the hard work for you. More than that, it also gives you multi-core for free, on top of libuv's concurrency.</p></pre>mattn: <pre><p>I'm author. I no longer found a future in it.</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传