{"id":16452758,"url":"https://github.com/kangaroux/webview-example","last_synced_at":"2026-01-27T08:31:15.032Z","repository":{"id":41539001,"uuid":"441573779","full_name":"Kangaroux/webview-example","owner":"Kangaroux","description":"Example Go desktop app using HTML","archived":false,"fork":false,"pushed_at":"2022-07-03T21:19:27.000Z","size":24,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T03:01:46.411Z","etag":null,"topics":["desktop","example","golang","html","webview"],"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/Kangaroux.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":"2021-12-24T23:53:08.000Z","updated_at":"2022-06-14T14:05:54.000Z","dependencies_parsed_at":"2022-08-25T08:23:03.059Z","dependency_job_id":null,"html_url":"https://github.com/Kangaroux/webview-example","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/Kangaroux%2Fwebview-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kangaroux%2Fwebview-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kangaroux%2Fwebview-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kangaroux%2Fwebview-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kangaroux","download_url":"https://codeload.github.com/Kangaroux/webview-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251196302,"owners_count":21550939,"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":["desktop","example","golang","html","webview"],"created_at":"2024-10-11T10:13:43.450Z","updated_at":"2026-01-27T08:31:14.976Z","avatar_url":"https://github.com/Kangaroux.png","language":"Go","readme":"# webview-example\n\nThis repo contains an example/starter for building a [webview](https://github.com/webview/webview) app in Go.\n\nWebview is a cross-platform library for creating desktop web applications (similar to Electron).\n\nThis repo compiles to a 6.7MB executable on Pop!OS 22.04.\n\n## Quickstart\n\n### Prerequisites\n\nCheck the [webview](https://github.com/webview/webview#prerequisites) docs for what dependencies you'll need.\n\n### How it Works\n\nThis example uses a HTTP server for serving the content. The server listens on a random available port\nso there is no concern for conflicts.\n\nStatic files and HTML can be found in `server/`. These files are embedded into the app using the\n[embed](https://pkg.go.dev/embed) package.\n\nIt's not included in this example, but you could implement a REST API or use websockets to handle the\ncommunication between the UI and the server. The `webview` library also provides `Eval()` and `Bind()`\nfunctions for calling JS and Go code respectively. I have not done any benchmarking, but I imagine that\nany difference between these choices is negligible.\n\n### Running the App\n\n```bash\ngo run .\n```\n\nThe window first appears as a blank white page while the browser engine is initializing. There isn't\na way to avoid this with the current webview version, however there is an [open feature request](https://github.com/webview/webview/issues/495)\nto support this.\n\n### Developer Tools\n\nDeveloper tools can be enabled/disabled by passing a bool to `webview.New()`. You can access the devtools\nvia right click \u003e `Inspect Element`.\n\nYou can disable the devtools when building (or running) the app by passing `-ldflags \"-X main.debug=false\"`.\nFor example:\n\n```bash\n# Build to ./app and disable devtools\ngo build -ldflags \"-X main.debug=false\" -o app .\n```\n\nThere doesn't seem to be any performance hit to leaving devtools on, but probably worth disabling if you\ndon't want users snooping around your app.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkangaroux%2Fwebview-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkangaroux%2Fwebview-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkangaroux%2Fwebview-example/lists"}