~damien/gtk-hot-reload

A proof-of-concept demonstrating how to enable hot reloading of GTK UI definition files.
Some more work
Initial commit

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~damien/gtk-hot-reload
read/write
git@git.sr.ht:~damien/gtk-hot-reload

You can also use your local clone with git send-email.

This repository demonstrates hot reloading of GTK 4 builder files, so that changes will reflect immediately in a running application without requiring a restart. Currently this is just a proof-of-concept, but could pretty easily be extracted into a library.

It was inspired by the Uno platform's hot reload feature for XAML files. However, Uno appears to use a separate process listening over HTTP that the running application communicates with, whereas this approach simply monitors the filesystem directly.

#Building

Make sure you have the GTK 4 development files installed, and then run:

$ bear make  # if you have Bear installed
$ make       # if you don't

#Running

$ make run

#Running via Web

Make sure the gtk4-tools package is installed, then run Broadway in a separate pane:

$ gtk4-broadwayd :5

Open up http://localhost:8085 in a browser, then run

$ make web