{"id":13786719,"url":"https://github.com/norunners/vert","last_synced_at":"2026-04-03T07:40:45.273Z","repository":{"id":31047833,"uuid":"126721876","full_name":"norunners/vert","owner":"norunners","description":"WebAssembly interop between Go and JS values.","archived":false,"fork":false,"pushed_at":"2022-12-03T07:58:38.000Z","size":8,"stargazers_count":105,"open_issues_count":2,"forks_count":15,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-08-14T00:46:33.317Z","etag":null,"topics":["go","golang","interop","webassembly"],"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/norunners.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}},"created_at":"2018-03-25T17:26:47.000Z","updated_at":"2025-08-08T08:04:33.000Z","dependencies_parsed_at":"2023-01-14T18:14:12.709Z","dependency_job_id":null,"html_url":"https://github.com/norunners/vert","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/norunners/vert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norunners%2Fvert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norunners%2Fvert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norunners%2Fvert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norunners%2Fvert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/norunners","download_url":"https://codeload.github.com/norunners/vert/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norunners%2Fvert/sbom","scorecard":{"id":694588,"data":{"date":"2025-08-11","repo":{"name":"github.com/norunners/vert","commit":"106a353d42dd02e8824e44c471fe253633e1462e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Code-Review","score":2,"reason":"Found 2/9 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/norunners/vert/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/norunners/vert/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/norunners/vert/test.yml/main?enable=pin","Warn: goCommand not pinned by hash: .github/workflows/test.yml:19","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T03:17:59.771Z","repository_id":31047833,"created_at":"2025-08-22T03:17:59.771Z","updated_at":"2025-08-22T03:17:59.771Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31342128,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T06:57:30.245Z","status":"ssl_error","status_checked_at":"2026-04-03T06:57:29.849Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["go","golang","interop","webassembly"],"created_at":"2024-08-03T19:01:30.598Z","updated_at":"2026-04-03T07:40:45.239Z","avatar_url":"https://github.com/norunners.png","language":"Go","readme":"# vert\n[![Go Reference](https://pkg.go.dev/badge/github.com/norunners/vert.svg)](https://pkg.go.dev/github.com/norunners/vert)\n[![Test](https://github.com/norunners/vert/actions/workflows/test.yml/badge.svg)](https://github.com/norunners/vert/actions/workflows/test.yml)\n\nPackage `vert` provides WebAssembly interop between Go and JS values.\n\n## Install\n```bash\nGOOS=js GOARCH=wasm go get github.com/norunners/vert\n```\n\n## Examples\n### Hello World!\nBelow is a trivial string value interop.\n```go\npackage main\n\nimport \"github.com/norunners/vert\"\n\nfunc main() {\n\tv := vert.ValueOf(\"Hello World!\")\n\t// Use v as a JS value.\n\n\ts := \"\"\n\tv.AssignTo(\u0026s)\n\t// Use s as a Go value.\n}\n```\n\n### Structs \u0026 Objects\nGo structs and JS objects interop seamlessly.\n```go\npackage main\n\nimport \"github.com/norunners/vert\"\n\ntype Data struct {\n\tMessage string\n}\n\nfunc main() {\n\tv := vert.ValueOf(Data{\n\t\tMessage: \"Hello World!\",\n\t})\n\t// e.g. {\"Message\": \"Hello World!\"}\n\n\td := \u0026Data{}\n\tv.AssignTo(d)\n}\n```\n\n### Tagged Struct Fields\nTagged struct fields allow defined JS field names.\n```go\npackage main\n\nimport \"github.com/norunners/vert\"\n\ntype Data struct {\n\tMessage string `js:\"msg\"`\n}\n\nfunc main() {\n\tv := vert.ValueOf(Data{\n\t\tMessage: \"Hello World!\",\n\t})\n\t// The defined JS tag names the field.\n\t// e.g. {\"msg\": \"Hello World!\"}\n\n\td := \u0026Data{}\n\tv.AssignTo(d)\n}\n```\n\n## Error Handling\n`AssignTo` returns an `error` value.  \n```go\npackage main\n\nimport \"github.com/norunners/vert\"\n\ntype Data struct {\n\tMessage string\n}\n\nfunc main() {\n\tv := vert.ValueOf(\"Hello World!\")\n\n\td := \u0026Data{}\n\tif err := v.AssignTo(d); err != nil {\n\t\t// Handle error.\n\t}\n}\n```\n\n## Why?\nPackage `syscall/js`, of the Go standard library, has limited interop support between Go and JS values.\n1. The function `js.ValueOf` will not accept struct types. The result panics with `ValueOf: invalid value`.\n2. The type `js.Value.` does not support an `Interface` or *assignment* method for non-basic Go values.\nHowever, the methods `Bool`, `Int`, `Float` and `String` support basic Go values.\n\nPackage `vert` leverages and extends `syscall/js` to accommodate these shortcomings.\n\n## License\n* [MIT License](LICENSE)\n","funding_links":[],"categories":["WebAssembly","Libraries for creating HTTP middlewares","路由","Go"],"sub_categories":["Routers","路由器","创建http中间件的代码库"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnorunners%2Fvert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnorunners%2Fvert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnorunners%2Fvert/lists"}