{"id":13712945,"url":"https://github.com/webui-dev/zig-webui","last_synced_at":"2025-05-15T17:02:50.987Z","repository":{"id":214766373,"uuid":"640035039","full_name":"webui-dev/zig-webui","owner":"webui-dev","description":"Use any web browser or WebView as GUI, with Zig in the backend and modern web technologies in the frontend, all in a lightweight portable library.","archived":false,"fork":false,"pushed_at":"2025-03-30T13:04:58.000Z","size":1878,"stargazers_count":545,"open_issues_count":5,"forks_count":21,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-03-31T22:15:30.727Z","etag":null,"topics":["cross-platform-gui","gui","gui-library","linux","webui","windows","zig","zig-package","zig-webui"],"latest_commit_sha":null,"homepage":"https://webui.me/","language":"Zig","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/webui-dev.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-05-12T20:21:26.000Z","updated_at":"2025-03-31T19:45:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"4076b39f-3fe2-4f43-9e00-ceac2ae7f9ae","html_url":"https://github.com/webui-dev/zig-webui","commit_stats":{"total_commits":105,"total_committers":7,"mean_commits":15.0,"dds":"0.16190476190476188","last_synced_commit":"ceed5d4df28dd952b078402faec29b72c0520fd6"},"previous_names":["webui-dev/zig-webui"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webui-dev%2Fzig-webui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webui-dev%2Fzig-webui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webui-dev%2Fzig-webui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webui-dev%2Fzig-webui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webui-dev","download_url":"https://codeload.github.com/webui-dev/zig-webui/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247744294,"owners_count":20988781,"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":["cross-platform-gui","gui","gui-library","linux","webui","windows","zig","zig-package","zig-webui"],"created_at":"2024-08-02T23:01:24.943Z","updated_at":"2025-05-15T17:02:50.981Z","avatar_url":"https://github.com/webui-dev.png","language":"Zig","readme":"\u003cdiv align=\"center\"\u003e\n\n![Logo](https://raw.githubusercontent.com/webui-dev/webui-logo/main/webui_zig.png)\n\n# WebUI Zig v2.5.0-beta.4\n\n\u003c!-- [build-status]: https://img.shields.io/github/actions/workflow/status/webui-dev/go-webui/ci.yml?branch=main\u0026style=for-the-badge\u0026logo=V\u0026labelColor=414868\u0026logoColor=C0CAF5 --\u003e\n\n[last-commit]: https://img.shields.io/github/last-commit/webui-dev/zig-webui?style=for-the-badge\u0026logo=github\u0026logoColor=C0CAF5\u0026labelColor=414868\n\u003c!-- [release-version]: https://img.shields.io/github/v/tag/webui-dev/go-webui?style=for-the-badge\u0026logo=webtrees\u0026logoColor=C0CAF5\u0026labelColor=414868\u0026color=7664C6 --\u003e\n[license]: https://img.shields.io/github/license/webui-dev/zig-webui?style=for-the-badge\u0026logo=opensourcehardware\u0026label=License\u0026logoColor=C0CAF5\u0026labelColor=414868\u0026color=8c73cc\n\n\u003c!-- [![][build-status]](https://github.com/webui-dev/go-webui/actions?query=branch%3Amain) --\u003e\n\n[![][last-commit]](https://github.com/webui-dev/zig-webui/pulse)\n\u003c!-- [![][release-version]](https://github.com/webui-dev/go-webui/releases/latest) --\u003e\n[![][license]](https://github.com/webui-dev/zig-webui/blob/main/LICENSE)\n\n\u003e Use any web browser or WebView as GUI, with Zig in the backend and modern web technologies in the frontend, all in a lightweight portable library.\n\n![Screenshot](https://raw.githubusercontent.com/webui-dev/webui-logo/main/screenshot.png)\n\n\u003c/div\u003e\n\n## Features\n\n- Portable (*Needs only a web browser or a WebView at runtime*)\n- One header file\n- Lightweight (*Few Kb library*) \u0026 Small memory footprint\n- Fast binary communication protocol\n- Multi-platform \u0026 Multi-Browser\n- Using private profile for safety\n- Cross-platform WebView\n\n## API Documentation\n\nIf you want a clearer architecture, you can check it out [here](https://deepwiki.com/webui-dev/zig-webui)\n\n* [https://webui-dev.github.io/zig-webui/](https://webui-dev.github.io/zig-webui/)\n* [https://webui.me/docs/2.5/#/](https://webui.me/docs/2.5/#/)\n\n## Examples\n\nThere are several examples for newbies, they are in the `examples` directory.\n\nYou can use `zig build --help` to view all buildable examples.\n\nLike `zig build run_minimal`, this will build and run the `minimal` example.\n\n## Installation\n\n\u003e note: for `0.13.0` and previous version, please use tag `2.5.0-beta.2`\n\n### Zig `0.14.0` \\ `nightly`\n\n\u003e To be honest, I don’t recommend using the nightly version because the API of the build system is not yet stable, which means that there may be problems with not being able to build after nightly is updated.\n\n1. Add to `build.zig.zon`\n\n```sh\n# It is recommended to replace the following branch with commit id\nzig fetch --save https://github.com/webui-dev/zig-webui/archive/main.tar.gz\n# Of course, you can also use git+https to fetch this package!\n```\n\n2. Config `build.zig`\n\nAdd this:\n\n```zig\n// To standardize development, maybe you should use `lazyDependency()` instead of `dependency()`\n// more info to see: https://ziglang.org/download/0.12.0/release-notes.html#toc-Lazy-Dependencies\nconst zig_webui = b.dependency(\"zig_webui\", .{\n    .target = target,\n    .optimize = optimize,\n    .enable_tls = false, // whether enable tls support\n    .is_static = true, // whether static link\n});\n\n// add module\nexe.root_module.addImport(\"webui\", zig_webui.module(\"webui\"));\n```\n\n\u003e It is not recommended to dynamically link libraries under Windows, which may cause some symbol duplication problems.\n\u003e see this issue: https://github.com/ziglang/zig/issues/15107\n\n### Windows without console\n\nFor hide console window, you can set `exe.subsystem = .Windows;`!\n\n## UI \u0026 The Web Technologies\n\n[Borislav Stanimirov](https://ibob.bg/) discusses using HTML5 in the web browser as GUI at the [C++ Conference 2019 (_YouTube_)](https://www.youtube.com/watch?v=bbbcZd4cuxg).\n\n\u003c!-- \u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://www.youtube.com/watch?v=bbbcZd4cuxg\"\u003e\u003cimg src=\"https://img.youtube.com/vi/bbbcZd4cuxg/0.jpg\" alt=\"Embrace Modern Technology: Using HTML 5 for GUI in C++ - Borislav Stanimirov - CppCon 2019\"\u003e\u003c/a\u003e\n\u003c/div\u003e --\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n![CPPCon](https://github.com/webui-dev/webui/assets/34311583/4e830caa-4ca0-44ff-825f-7cd6d94083c8)\n\n\u003c/div\u003e\n\nWeb application UI design is not just about how a product looks but how it works. Using web technologies in your UI makes your product modern and professional, And a well-designed web application will help you make a solid first impression on potential customers. Great web application design also assists you in nurturing leads and increasing conversions. In addition, it makes navigating and using your web app easier for your users.\n\n### Why Use Web Browsers?\n\nToday's web browsers have everything a modern UI needs. Web browsers are very sophisticated and optimized. Therefore, using it as a GUI will be an excellent choice. While old legacy GUI lib is complex and outdated, a WebView-based app is still an option. However, a WebView needs a huge SDK to build and many dependencies to run, and it can only provide some features like a real web browser. That is why WebUI uses real web browsers to give you full features of comprehensive web technologies while keeping your software lightweight and portable.\n\n### How Does it Work?\n\n\u003cdiv align=\"center\"\u003e\n\n![Diagram](https://github.com/ttytm/webui/assets/34311583/dbde3573-3161-421e-925c-392a39f45ab3)\n\n\u003c/div\u003e\n\nThink of WebUI like a WebView controller, but instead of embedding the WebView controller in your program, which makes the final program big in size, and non-portable as it needs the WebView runtimes. Instead, by using WebUI, you use a tiny static/dynamic library to run any installed web browser and use it as GUI, which makes your program small, fast, and portable. **All it needs is a web browser**.\n\n### Runtime Dependencies Comparison\n\n|                                 | Tauri / WebView   | Qt                         | WebUI               |\n| ------------------------------- | ----------------- | -------------------------- | ------------------- |\n| Runtime Dependencies on Windows | _WebView2_        | _QtCore, QtGui, QtWidgets_ | **_A Web Browser_** |\n| Runtime Dependencies on Linux   | _GTK3, WebKitGTK_ | _QtCore, QtGui, QtWidgets_ | **_A Web Browser_** |\n| Runtime Dependencies on macOS   | _Cocoa, WebKit_   | _QtCore, QtGui, QtWidgets_ | **_A Web Browser_** |\n\n## Supported Web Browsers\n\n| Browser         | Windows         | macOS         | Linux           |\n| --------------- | --------------- | ------------- | --------------- |\n| Mozilla Firefox | ✔️              | ✔️            | ✔️              |\n| Google Chrome   | ✔️              | ✔️            | ✔️              |\n| Microsoft Edge  | ✔️              | ✔️            | ✔️              |\n| Chromium        | ✔️              | ✔️            | ✔️              |\n| Yandex          | ✔️              | ✔️            | ✔️              |\n| Brave           | ✔️              | ✔️            | ✔️              |\n| Vivaldi         | ✔️              | ✔️            | ✔️              |\n| Epic            | ✔️              | ✔️            | _not available_ |\n| Apple Safari    | _not available_ | _coming soon_ | _not available_ |\n| Opera           | _coming soon_   | _coming soon_ | _coming soon_   |\n\n## Supported WebView\n\n| WebView         | Status         |\n| --------------- | --------------- |\n| Windows WebView2 | ✔️ |\n| Linux GTK WebView   | ✔️ |\n| macOS WKWebView  | ✔️ |\n\n### License\n\n\u003e Licensed under the MIT License.\n","funding_links":[],"categories":["Zig","Multimedia \u0026 Graphics"],"sub_categories":["GUI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebui-dev%2Fzig-webui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebui-dev%2Fzig-webui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebui-dev%2Fzig-webui/lists"}