{"id":13601477,"url":"https://github.com/ry/v8worker2","last_synced_at":"2025-04-11T04:31:02.032Z","repository":{"id":57487252,"uuid":"133271144","full_name":"ry/v8worker2","owner":"ry","description":"Minimal golang binding to V8","archived":true,"fork":false,"pushed_at":"2019-08-17T05:49:17.000Z","size":47,"stargazers_count":801,"open_issues_count":15,"forks_count":64,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-08-02T18:40:35.618Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ry.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-13T20:16:27.000Z","updated_at":"2024-06-24T06:45:06.000Z","dependencies_parsed_at":"2022-09-01T23:01:46.511Z","dependency_job_id":null,"html_url":"https://github.com/ry/v8worker2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ry%2Fv8worker2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ry%2Fv8worker2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ry%2Fv8worker2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ry%2Fv8worker2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ry","download_url":"https://codeload.github.com/ry/v8worker2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223458339,"owners_count":17148454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T18:01:03.311Z","updated_at":"2024-11-07T04:30:54.449Z","avatar_url":"https://github.com/ry.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# v8worker2\n\n[![Build Status](https://travis-ci.org/ry/v8worker2.svg?branch=master)](https://travis-ci.org/ry/v8worker2)\n\nThis is a minimal binding between Go (golang) and V8 JavaScript. Basic concept\nis to only expose two methods to JavaScript: send and receive.\n\nV8 Version: 6.9.427.19 (August 2018)\n\n[A rather dated presentation on this project](https://docs.google.com/presentation/d/1RgGVgLuP93mPZ0lqHhm7TOpxZBI3TEdAJQZzFqeleAE/edit?usp=sharing)\n\n\n## Installing\n\nDue to the complexity of building V8, this package is not buildable with `go\nget`.\n\nTo install:\n```\ngo get github.com/ry/v8worker2\ncd `go env GOPATH`/src/github.com/ry/v8worker2\n./build.py # Will take ~30 minutes to compile.\ngo test\n```\nIf you have ccache installed, `./build.py --use_ccache` will take advantage of\nit. This is useful to avoid rebuilding V8 so much.\n\n\n## JavaScript API\n\nThe JavaScript interface is exposed thru a single global namespace `V8Worker2`.\nThe interface has just three methods `V8Worker2.print()`, `V8Worker2.send()`,\nand `V8Worker2.recv()`.\nSee\n[v8worker2.d.ts](https://github.com/ry/v8worker2/blob/master/v8worker2.d.ts)\nfor the details.\n\n\n## Golang API\n\nDocumentation is at https://godoc.org/github.com/ry/v8worker2 and\nexample usage is at\n[worker_test.go](https://github.com/ry/v8worker2/blob/master/worker_test.go)\n\n\n## Difference from the original v8worker\n\n * The original v8worker passed strings between Go and V8. v8worker2 instead\n   communicates using ArrayBuffer, which is more efficient.\n\n * The original included `recvSync` and `sendSync` methods. These were\n   deemed unnecessary. Now `send()` can operate both sychronously by\n   returning another ArrayBuffer. Simply return a `[]byte` from the golang\n   recv callback.\n\n * This version is compatible with modern V8, has a better build\n   setup, and uses Travis for CI.\n\n * The original prefixed the methods with dollar signs, this version uses a\n   global name space object and provides a typescript declaration file.\n\n\n## License\n\nMIT License. Contributions welcome.\n\n\t\tCopyright 2015-2018 Ryan Dahl \u003cry@tinyclouds.org\u003e. All rights reserved.\n\n\t\tPermission is hereby granted, free of charge, to any person obtaining a copy\n\t\tof this software and associated documentation files (the \"Software\"), to\n\t\tdeal in the Software without restriction, including without limitation the\n\t\trights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n\t\tsell copies of the Software, and to permit persons to whom the Software is\n\t\tfurnished to do so, subject to the following conditions:\n\n\t\tThe above copyright notice and this permission notice shall be included in\n\t\tall copies or substantial portions of the Software.\n\n\t\tTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t\tIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t\tFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t\tAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t\tLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n\t\tFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n\t\tIN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fry%2Fv8worker2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fry%2Fv8worker2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fry%2Fv8worker2/lists"}