v8eval
Multi-language bindings to JavaScript engine V8.
Currently v8eval provides Go, Python and Ruby bindings to the latest V8 7.1 and supports Linux and Mac OS X. v8eval uses SWIG and can be extended easily for other languages.
Pre-installation
Linux
See Dockerfile.
Mac
See .travis.yml.
Installation
The installation takes several tens of minutes due to V8 build.
Go
v8eval requires Go 1.10 or later.
git clone https://github.com/sony/v8eval.git ${GOPATH}/src/github.com/sony/v8eval
${GOPATH}/src/github.com/sony/v8eval/go/build.sh install
In the case of Linux, you need to build your Go program with build.sh:
${GOPATH}/src/github.com/sony/v8eval/go/build.sh go build
Python
pip install v8eval
Ruby
gem install v8eval
Documentation
Go
See godoc.org.
Python
You can create the Sphinx documentation under python/docs.
python/build.sh docs
Ruby
You can create the YARD documentation under ruby/doc.
ruby/build.sh docs
Examples
Go
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
}
Python
import v8eval
def add(x, y):
v8 = v8eval.V8()
v8.eval('var add = (x, y) => x + y;')
return v8.call('add', [x, y])
Ruby
require 'v8eval'
def add(x, y)
v8 = V8Eval::V8.new
v8.eval('var add = (x, y) => x + y;')
v8.call('add', [x, y])
end
License
The MIT License (MIT)
See LICENSE for details.
Metadata
Release files for v8eval 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| v8eval-0.3.2.tar.gz | 10.3 kB | Without provenance | Details for v8eval-0.3.2.tar.gz |
Release files / v8eval-0.3.2.tar.gz
| Download URL | v8eval-0.3.2.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
929da25fbfde600a689becd8e865c0969cef7224ff45c9d17b1a94348dc2bae3
|
|
BLAKE2b-256 checksum How to use checksums |
fa4f1a05b40d4bb6862f9a0ba8eefe635676e2a3b48252053c3257aa22a531e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/2.7.18
|
Security for v8eval 0.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.