{"id":20459762,"url":"https://github.com/rosbit/go-deno","last_synced_at":"2026-04-11T00:52:40.028Z","repository":{"id":144249277,"uuid":"524265285","full_name":"rosbit/go-deno","owner":"rosbit","description":"An embeddable JavaScript/TypeScript engine by interacting with deno. 通过与deno交互实现的嵌入式JavaScript/TypeScript","archived":false,"fork":false,"pushed_at":"2022-08-13T01:32:26.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-16T00:24:45.975Z","etag":null,"topics":["deno","embeddable","golang","javascript","typescript"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rosbit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-13T01:10:52.000Z","updated_at":"2022-11-21T09:40:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"5ff2ded2-d90e-4816-b378-4865ae2e7c0f","html_url":"https://github.com/rosbit/go-deno","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosbit%2Fgo-deno","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosbit%2Fgo-deno/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosbit%2Fgo-deno/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosbit%2Fgo-deno/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rosbit","download_url":"https://codeload.github.com/rosbit/go-deno/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242014722,"owners_count":20057880,"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":["deno","embeddable","golang","javascript","typescript"],"created_at":"2024-11-15T12:17:12.502Z","updated_at":"2025-12-31T00:56:51.955Z","avatar_url":"https://github.com/rosbit.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-deno, makes Deno be embedded easily\n\n[Deno](https://github.com/denoland/deno) is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust.\n\nThis package is intended to provide a wrapper to interact `Deno` with application written in golang.\nWith some helper functions, `go-deno` makes it simple to calle Deno from Golang, and `go-deno` can be\ntreated as an embeddable JavaScript/TypeScript.\n\n### Install\n\nThe package is fully go-getable, So, just type\n\n  `go get github.com/rosbit/go-deno`\n\nto install.\n\n### Usage\n\nSuppose there's a Javascript file named `a.js` like this:\n\n```javascript\nfunction add(a, b) {\n    return a+b\n}\n```\n\none can call the Javascript function `add()` in Go code like the following:\n\n```go\npackage main\n\nimport (\n  \"github.com/rosbit/go-deno\"\n  \"fmt\"\n)\n\nvar add func(int, int)int\n\nfunc main() {\n  ctx, err := deno.NewDeno(\"/path/to/deno-exe/deno\", \"a.js\")\n  if err != nil {\n     fmt.Printf(\"%v\\n\", err)\n     return\n  }\n  defer ctx.Quit()\n\n  // method 1: bind JS function with a golang var\n  if err := ctx.BindFunc(\"add\", \u0026add); err != nil {\n     fmt.Printf(\"%v\\n\", err)\n     return\n  }\n  res := add(1, 2)\n\n  // method 2: call JS function using Call\n  res, err := ctx.CallFunc(\"add\", 1, 2)\n  if err != nil {\n     fmt.Printf(\"%v\\n\", err)\n     return\n  }\n\n  fmt.Println(\"result is:\", res)\n}\n```\n\n### Status\n\nThe package is not fully tested, so be careful.\n\n### Contribution\n\nPull requests are welcome! Also, if you want to discuss something send a pull request with proposal and changes.\n\n__Convention:__ fork the repository and make changes on your fork in a feature branch.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frosbit%2Fgo-deno","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frosbit%2Fgo-deno","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frosbit%2Fgo-deno/lists"}