{"id":24960745,"url":"https://github.com/malivvan/webkitgtk","last_synced_at":"2025-04-10T21:13:45.966Z","repository":{"id":214013206,"uuid":"735484464","full_name":"malivvan/webkitgtk","owner":"malivvan","description":"pure Go WebKitGTK binding for Linux and FreeBSD","archived":false,"fork":false,"pushed_at":"2024-07-29T13:52:58.000Z","size":71,"stargazers_count":8,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T21:13:41.000Z","etag":null,"topics":["go","golang","gtk","pure-go","webkit","webkitgtk"],"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/malivvan.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":"2023-12-25T05:20:15.000Z","updated_at":"2024-12-26T23:40:02.000Z","dependencies_parsed_at":"2023-12-25T06:26:52.706Z","dependency_job_id":"df61f2db-84ac-4266-bd80-d2a189405836","html_url":"https://github.com/malivvan/webkitgtk","commit_stats":null,"previous_names":["malivvan/webkitgtk"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malivvan%2Fwebkitgtk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malivvan%2Fwebkitgtk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malivvan%2Fwebkitgtk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malivvan%2Fwebkitgtk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/malivvan","download_url":"https://codeload.github.com/malivvan/webkitgtk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248298312,"owners_count":21080320,"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":["go","golang","gtk","pure-go","webkit","webkitgtk"],"created_at":"2025-02-03T08:31:15.099Z","updated_at":"2025-04-10T21:13:45.939Z","avatar_url":"https://github.com/malivvan.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webkitgtk [![Go Reference](https://pkg.go.dev/badge/github.com/malivvan/webkitgtk.svg)](https://pkg.go.dev/github.com/malivvan/webkitgtk) [![Release](https://img.shields.io/github/v/release/malivvan/webkitgtk.svg?sort=semver)](https://github.com/malivvan/webkitgtk/releases/latest) [![Go Report Card](https://goreportcard.com/badge/github.com/malivvan/webkitgtk)](https://goreportcard.com/report/github.com/malivvan/webkitgtk) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\nPure Go WebKitGTK binding for **Linux** and **FreeBSD**.\n\n\u003e This is pre release software so expect bugs and potentially API breaking changes\n\u003e but each release will be tagged to avoid breaking people's code.\n\n## Installation\n\n```sh\n# go 1.21.5+\ngo get github.com/malivvan/webkitgtk@latest\n```\n\n## Example\nThe following example shows how to create a simple GTK window with a button that closes the application when clicked.\n```go\npackage main\n\nimport ui \"github.com/malivvan/webkitgtk\"\n\ntype API struct {\n\tapp *ui.App\n}\n\nfunc (a *API) Quit() error {\n\ta.app.Quit()\n\treturn nil\n}\n\nfunc main() {\n\tapp := ui.New(ui.AppOptions{\n\t\tName: \"example\",\n\t})\n\tapp.Open(ui.WindowOptions{\n\t\tTitle: \"example\",\n\t\tHTML:  `\u003cbutton onclick=\"app.quit()\"\u003equit\u003c/button\u003e`,\n\t\tDefine: map[string]interface{}{\n\t\t\t\"app\": \u0026API{app: app},\n\t\t},\n\t})\n\tif err := app.Run(); err != nil {\n\t\tpanic(err)\n\t}\n}\n```\n## Running / Building\n\nRunning / building defaults to debug mode outputting logs to stderr. To build in release mode use the `release` build tag.\n\n```sh\ngo build -tags release -ldflags \"-s -w\" -trimpath\n```\n\nThe resulting release binary will be about ~6MB in size and cam be compressed further with [UPX](https://upx.github.io/) to about ~2.5MB.\n\n\n## Examples\n\n- [echo](examples/echo/echo.go) - call go functions from javascript \n- [dialog](examples/dialog/dialog.go) - application spawning different types of dialog windows\n- [handle](examples/handle/handle.go) - handle requests on the app:// uri scheme to serve embedded files\n- [notify](examples/notify/notify.go) - application sending different types of notifications\n- [systray](examples/systray/systray.go) - example application showing how to use the systray\n\n## Dependencies\nEither\n[`webkit2gtk-4.1`](https://pkgs.org/search/?q=webkit2gtk-4.1\u0026on=name)\n([*stable*](https://webkitgtk.org/reference/webkit2gtk/stable/)) or\n[`webkitgtk-6.0`](https://pkgs.org/search/?q=webkitgtk-6.0\u0026on=name)\n([*unstable*](https://webkitgtk.org/reference/webkitgtk/unstable/index.html))\nis required at runtime. If both are installed the stable version will be used.\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd style=\"font-size: 14px;font-weight: bold;\"\u003eDebian / Ubuntu\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eapt install libwebkit2gtk-4.1\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eapt install libwebkitgtk-6.0\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd style=\"font-size: 14px;font-weight: bold;\"\u003eRHEL / Fedora\u003c/td\u003e\n        \u003ctd\u003e\u003ccode\u003ednf install webkitgtk4\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ccode\u003ednf install webkitgtk3\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd style=\"font-size: 14px;font-weight: bold;\"\u003eArch\u003c/td\u003e\n        \u003ctd\u003e\u003ccode\u003epacman -S webkit2gtk-4.1\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ccode\u003epacman -S webkitgtk-6.0\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd style=\"font-size: 14px;font-weight: bold;\"\u003eAlpine\u003c/td\u003e\n        \u003ctd\u003e\u003ccode\u003eapk add webkit2gtk\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ccode\u003eapk add webkit2gtk-6.0\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd style=\"font-size: 14px;font-weight: bold;\"\u003eGentoo\u003c/td\u003e\n        \u003ctd colspan=\"2\" align=\"center\"\u003e\u003ccode style=\"margin:0px;padding:2px\"\u003eemerge -av net-libs/webkit-gtk\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd style=\"font-size: 14px;font-weight: bold;\"\u003eFreeBSD\u003c/td\u003e\n        \u003ctd\u003e\u003ccode\u003epkg install webkit2-gtk3\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ccode\u003epkg install webkit2-gtk4\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n## License\nThis project is licensed under the [MIT License](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalivvan%2Fwebkitgtk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalivvan%2Fwebkitgtk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalivvan%2Fwebkitgtk/lists"}