docs / webview

gru · 0.7.0

WebView

Optional Windows WebView2 host for embedding HTML inside a Gru window. Native widgets still draw through Raylib; the web view is a child HWND.

When to use it

Use WebView when part of the UI is best done in HTML (docs pane, map, rich editor) and the rest should stay native Gru widgets and chrome. Start from cmd/webviewhello or gru new myapp --webview.

Build tags

go run -tags webview2 ./cmd/webviewhello
go run -tags "grudemo,webview2" .
go run ./cmd/gru build webviewhello -webview2

Requires the Microsoft Edge WebView2 Runtime.

Rules

Debug

Set GRU_WEBVIEW_DEBUG=1 and use Shift+F11 for stderr traces. F12 is still the widget inspector.

Demos

Run with -tags "grudemo,webview2", then Tab to those scenes.

Full guide: WEBVIEW.md · chapter: architecture/webview.md.

Next: Architecture · Start · CLI