Use any web browser as GUI, with Zig in the backend and HTML5 in the frontend. - GitHub - webui-dev/zig-webui: Use any web browser as GUI, with Zig in the backend and HTML5 in the frontend.
WebUI is not a web-server solution or a framework, but it allows you to use any web browser as a GUI, with your preferred language in the backend and HTML5 in the frontend. All in a lightweight portable lib.
We use zig to wrap the C library, which makes it easy for us to use it in zig.
Feature
Parent library written in pure C
Lightweight ~200 Kb & Small memory footprint
Fast binary communication protocol between WebUI and the browser (Instead of JSON)
Multi-platform & Multi-Browser
Using private profile for safety
Here is a text editor with zig-webui
Examples
Here we make a minimal example with zig-webui:
First
We init a zig project with zig init-ext or zig init(zig nightly).
We import the package webui, and use its method newWindow to create a window, then show it(we ignored the returned value, it is bool to tell us whether the window showed correctly).
Finaly, we use webui.wait to block the main funcion, it will break when window is closed!
Currently zig-webui is still under development and more features will be added!