Due to the complexity of building V8, this package is not buildable with go
go get github.com/ry/v8worker2
cd `go env GOPATH`/src/github.com/ry/v8worker2
./build.py # Will take ~30 minutes to compile.
If you have ccache installed, ./build.py --use_ccache will take advantage of
it. This is useful to avoid rebuilding V8 so much.
The interface has just three methods V8Worker2.print(), V8Worker2.send(),
for the details.
The original v8worker passed strings between Go and V8. v8worker2 instead
communicates using ArrayBuffer, which is more efficient.
The original included recvSync and sendSync methods. These were
deemed unnecessary. Now send() can operate both sychronously by
returning another ArrayBuffer. Simply return a byte from the golang
This version is compatible with modern V8, has a better build
setup, and uses Travis for CI.
The original prefixed the methods with dollar signs, this version uses a
global name space object and provides a typescript declaration file.
MIT License. Contributions welcome.
Copyright 2015-2018 Ryan Dahl <firstname.lastname@example.org>. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.