feat(examples): add comprehensive WebUI Zig showcase#106
Conversation
jinzhongjia
commented
Jul 19, 2025
- introduce a new comprehensive example demonstrating user management, messaging, file upload (with Unicode filename support), settings, performance testing, and more
- add a rich interactive HTML dashboard with advanced UI and JavaScript for real-time status, notifications, and activity log
- implement robust Zig backend with state tracking, safe file handling, and multi-client support
- update .gitignore to exclude generated example files
- fix setBrowserFolder signature in webui.zig for consistency
- introduce a new comprehensive example demonstrating user management, messaging, file upload (with Unicode filename support), settings, performance testing, and more - add a rich interactive HTML dashboard with advanced UI and JavaScript for real-time status, notifications, and activity log - implement robust Zig backend with state tracking, safe file handling, and multi-client support - update .gitignore to exclude generated example files - fix setBrowserFolder signature in webui.zig for consistency
- introduce event_handling example with multi-client HTML UI and Zig backend - demonstrate user session management, click tracking, messaging, and event monitoring - implement advanced context management and interface event binding in Zig - fix(c): specify C calling convention for webui_interface_bind callback - refactor(webui): make interfaceBind return !usize and propagate bind errors
- introduce js_execution example with Zig and JavaScript interop - implement advanced JS execution, data exchange, DOM manipulation, and raw data transfer - update C and Zig bindings for send_raw to use *const anyopaque for improved type safety
- introduce a comprehensive window management example with Zig and HTML - demonstrate window controls, kiosk mode, multi-window handling, and browser info - implement Zig bindings for window operations and client communication - add interactive UI with real-time info and user feedback - fix minor indentation in webui.zig for consistency
- use Zig optional binding to handle null pointers from C functions - ensure proper error return when encoding or decoding fails
- bump webui hash and URL to fea4ae1e for dependency update - ensure compatibility with latest webui changes
- replace deprecated .C callconv with .c in all extern function declarations in src/c.zig - update internal Zig handlers and bindings to use .c callconv in src/webui.zig - adjust build.zig to maintain compatibility with Zig 0.14 and earlier versions
- replace deprecated allocPrintZ with allocPrintSentinel in multi-client web app example - ensure proper formatting and memory management for generated JavaScript
- use allocPrintZ for JS string formatting when Zig 0.14 is detected - maintain compatibility with previous Zig versions using allocPrintSentinel
|
This is a great update, great job @jinzhongjia 👍 |
|
To be honest, these examples are all about Ai, I just wrote down below |
|
This is clever, and by the way, we will soon train and create a GPT for webui-zig like we did for webui-c GPT. |
|
When I was writing this, I encountered that the C library could not handle too many events, which would cause a crash I'll try to fix the issue this week |
- change webui source URL to latest commit archive - ensure build uses updated webui version
call_js_from_c is a stress test example to send event every 10 milliseconds from backend to frontend, it's working fine. Note: |