Multi-language bindings to JavaScript engine V8.
Currently v8eval provides Go and Python bindings to the latest V8 4.7 and supports Linux and Mac OS X. v8eval uses SWIG and can be extended easily for other languages.
See Dockerfile.
See .travis.yml.
The installation takes several tens of minutes due to V8 build.
git clone https://github.com/sony/v8eval.git $GOPATH/src/github.com/sony/v8eval
$GOPATH/src/github.com/sony/v8eval/go/build.sh install
pip install v8eval
See godoc.org.
You can create the Sphinx documentation under python/docs.
python/build.sh docs
import "github.com/sony/v8eval/go/v8eval"
func Add(x, y int) int {
var v8 = v8eval.NewV8()
v8.Eval("var add = (x, y) => x + y;", nil)
var sum int;
v8.Call("add", []int{x, y}, &sum)
return sum
}
import v8eval
def add(x, y):
v8 = v8eval.V8()
v8.eval('var add = (x, y) => x + y;')
return v8.call('add', [x, y])
The MIT License (MIT)
See LICENSE for details.