{"id":15067461,"url":"https://github.com/huckridgesw/hvue","last_synced_at":"2025-10-17T04:56:18.153Z","repository":{"id":57491961,"uuid":"95173209","full_name":"HuckRidgeSW/hvue","owner":"HuckRidgeSW","description":"A GopherJS \u0026 go/wasm binding for Vue.js","archived":false,"fork":false,"pushed_at":"2018-10-30T18:44:07.000Z","size":9727,"stargazers_count":49,"open_issues_count":2,"forks_count":9,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-07-24T21:11:07.595Z","etag":null,"topics":["go","golang","gopherjs-bindings","gopherjs-vue","vuejs","wasm","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/HuckRidgeSW.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-23T01:57:44.000Z","updated_at":"2022-12-01T05:14:56.000Z","dependencies_parsed_at":"2022-08-28T11:50:14.323Z","dependency_job_id":null,"html_url":"https://github.com/HuckRidgeSW/hvue","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/HuckRidgeSW/hvue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuckRidgeSW%2Fhvue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuckRidgeSW%2Fhvue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuckRidgeSW%2Fhvue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuckRidgeSW%2Fhvue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HuckRidgeSW","download_url":"https://codeload.github.com/HuckRidgeSW/hvue/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuckRidgeSW%2Fhvue/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279285475,"owners_count":26140225,"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","status":"online","status_checked_at":"2025-10-17T02:00:07.504Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","gopherjs-bindings","gopherjs-vue","vuejs","wasm","webassembly"],"created_at":"2024-09-25T01:24:15.007Z","updated_at":"2025-10-17T04:56:18.113Z","avatar_url":"https://github.com/HuckRidgeSW.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Intro\n\nhvue is a [GopherJS](https://github.com/gopherjs/gopherjs) and wasm wrapper\nfor the [Vue](https://vuejs.org/) Javascript framework.\n\n[This (the \"master\" branch)](https://github.com/HuckRidgeSW/hvue/tree/master)\nis the go/wasm + GopherJS version.  It uses\n[gopherwasm](https://github.com/gopherjs/gopherwasm) to provide a compatability\nlayer between go/wasm and GopherJS.  go/wasm is patterned on GopherJS, but\ndoesn't have all of its capabilities and language-specific \"magic\".  In\nparticular, go/wasm doesn't have GopherJS's \"dual struct/object\" magic, which\nallows you to embed a *js.Object in a struct, define struct fields with\n`js:\"jsName\"` tags, and have the compiler automatically change references to\nthose fields into references to fields in the inner *js.Object.  So to access a\nJavaScript object in go/wasm, you have to use a \"naked\" js.Value and either use\n`thing.Get(\"jsField\")` (and related functions) everywhere (ew) or write access\nfunctions (less ew).  You can also write GopherJS in the same style, and\ngopherwasm creates a compatability layer so the go/wasm style compiles under\nGopherJS.\n\nThe GopherJS-only version is tagged as\n[v1](https://github.com/HuckRidgeSW/hvue/tree/v1), and also as\n[gopherjs](https://github.com/HuckRidgeSW/hvue/tree/gopherjs).\n\nThe [wasm](https://github.com/HuckRidgeSW/hvue/tree/wasm) branch still exists,\nbecause I shared it pretty widely, and I want those links to keep working for a\nwhile.\n\nSo if you want to use the go/wasm code, and/or also use this exact code in\nGopherJS, use this branch.  If you want the GopherJS-only code, use the\n[v1](https://github.com/HuckRidgeSW/hvue/tree/v1) or\n[gopherjs](https://github.com/HuckRidgeSW/hvue/tree/gopherjs) branch.  **Click\non over to the README in that branch for installation instructions.**  They may\nneed modification, since they still date to when hvue's \"master\" branch was\nGopherJS-only.\n\n# Install\n\n## Install Go 1.11\n\nSee https://golang.org/dl/.\n\n## Install hvue\n\n(Side note: If you skipped it, please make sure you've read the Intro above\nabout the difference between this (the go/wasm + GopherJS code), and previous\nGopherJS-only versions.)\n\n```bash\ncd path/to/github.com # in your $GOPATH\nmkdir huckridgesw\ncd huckridgesw\ngit clone git@github.com:HuckRidgeSW/hvue.git\n```\n\n# Examples \u0026 Demos\n\n## Overview\n\nGenerally speaking, the\n[examples](https://github.com/HuckRidgeSW/hvue/tree/master/examples) follow the\nexamples in the Vue [guide](https://vuejs.org/v2/guide/).  Some don't, because\nthe Guide has changed since I wrote the examples.  But most of them do.\n\n[01-introduction](https://github.com/HuckRidgeSW/hvue/tree/master/examples/01-introduction)\nhas examples from the Vue [Introduction](https://vuejs.org/v2/guide/index.html) page.\n\n[02-lifecycle](https://github.com/HuckRidgeSW/hvue/tree/master/examples/02-lifecycle)\ndemos Vue [lifecycle hooks](https://vuejs.org/v2/guide/instance.html#Instance-Lifecycle-Hooks)\nbut does not correspond to any specific example on that page.\n\n[03-computed-basic](https://github.com/HuckRidgeSW/hvue/tree/master/examples/03-computed-basic)\nand [04-computed-with-setter](https://github.com/HuckRidgeSW/hvue/tree/master/examples/04-computed-with-setter)\nhave examples from [Computed Properties and Watchers](https://vuejs.org/v2/guide/computed.html).\n\nAnd so on.  Links are in the code.\n\n## Running the examples\n\n### GopherJS\n\n```bash\ncd path/to/github.com/huckridgesw/hvue\necho \"var hvue_wasm = false;\" \u003e examples/maybe_wasm.js\ngopherjs serve github.com/huckridgesw/hvue # listens on 8080\n```\n\nand then\n- http://localhost:8080/examples/01-introduction/\n- http://localhost:8080/examples/02-lifecycle/\n- http://localhost:8080/examples/ for more\n\n### WASM\n\n```bash\ncd path/to/github.com/huckridgesw/hvue\necho \"var hvue_wasm = true;\" \u003e examples/maybe_wasm.js\ngo run examples/server/main.go # Listens on 8081\ncd examples/??-???? # some examples directory\nGOARCH=wasm GOOS=js go build -o ${PWD##*/}.wasm main.go # compile wasm\n```\n\nand then\n- http://localhost:8081/examples/01-introduction/\n- http://localhost:8081/examples/02-lifecycle/\n- http://localhost:8081/examples/ for more\n\nRemember to recompile after any changes.  There's no facility yet to auto-build\n(a-la `gopherjs build -w` or `gopherjs serve`).\n\n### Switching from GopherJS to WASM and back\n\n- Do the appropriate `\"echo \"var hvue_wasm = ?;\" \u003e examples/maybe_wasm.js`.\n  (See above.)\n- Be sure to do \"shift-cmd-R\" (Chrome, macOS; other browsers / OSes will vary)\n  to reload without using the cache, to get the new `maybe_wasm.js` and/or new\n  wasm.  (Actually I'm not sure you need that to get new wasm, since it's\n  loaded via an explicit `fetch()` call, but it's probably not a bad idea.)\n  Alternatively, in Chrome you can open the developer console, go to the\n  network tab, and check \"disable cache\".  (AIUI only works while said console\n  window is open.)\n\n# GoDoc\n\nhttp://godoc.org/github.com/HuckRidgeSW/hvue\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuckridgesw%2Fhvue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuckridgesw%2Fhvue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuckridgesw%2Fhvue/lists"}