https://github.com/ry/v8worker Minimal golang binding to V8. This exposes a non-blocking message passing interface to the V8 javascript engine. Go and JavaScript interact by sending and receiving messages. V8 will block a thread (goroutine) only while it computes javascript - it has no “syscalls” other than sending and receiving messages to Go. There are only three built in functions exposed to javascript: $print(string), $send(msg), and $recv(callback)
目前项目处于早期状态,不知道未来会有怎样的影响
同表示看不懂…这主要是想给 go 的开发者调用 js,还是给 js 的开发者调用 go?
这个go看着烦
个人觉的可能是想把go的优秀特质引入到node世界了,打通两个平台,让各自做各自擅长的事情
给js添加了几个和go通信的接口,为了让js把阻塞任务交给go?
@alsotang 看代码中那个测试应该是想给 go 的开发者调用 js 代码,ry 难道想用 go 重写一个 node.js 。。。
@dayuoba 有可能
ry 原话 when you want to embed a javascript sandbox in your go program.
很明显,作者在重写一个node…
让 go 程序员能调用大量的 npm packages,好事啊。node 转 go 会容易很多。
hello world可以跑起来了么?