v8worker V8和Go结合 v8worker

blov • 6279 次点击    
这是一个分享于 的项目,其中的信息可能已经有所发展或是发生改变。
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)`. MIT License. Contributions welcome. Build ----- Run `make` to trigger a build of V8 and then do `make install` which will trigger `go install`. V8 is statically linked. It's only been tested on my OSX laptop so far - should be easily portable to linux tho. `make test` to build/run tests. Or just `go test`. Docs ---- From golang checkout the API here: https://godoc.org/github.com/ry/v8worker From Javascript you only have: `$print(string)` `$send(msg)` `$recv(callback)`. See `worker_test.go` for example usage for now.
授权协议:
开发语言:
C++/Go 查看源码»
操作系统:
跨平台
6279 次点击  
加入收藏 微博
2 回复  |  直到
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传