Docs / Tutorial
16 · UI + WebView
#ui is the window/menu/tray shell; #ui/webview is the content slot. Pack with the product compiler: xu doctor / xu build <App> --desktop.
Each app is its own project root:
App/
xu.xun # module manifest
main.xu # entry (required)
www/ # local xu:// pages when using WebView
brand/ # at least one PNG icon (no fallback to the repo brand/)
Apps in the example: open standard window + WebView; shaped shaped window; draw immediate-mode canvas #ui/draw; remote remote HTTP.
xu doctor --desktop --target macos-arm64
xu build examples/16_ui_webview/open --target macos-arm64 --desktop -o /tmp/XuOpen
open /tmp/XuOpen.app
macOS produces .app, Windows .exe, and Linux ELF. Desktop packaging needs matching host tools; Linux uses GTK4 and WebView additionally needs WebKitGTK 6.0. See UI / WebView for platform boundaries.
Run the commands from the separate examples repository root.