I did a similar attempt to produce small AppImages for GTK applications where static binaries are not an option. With a bit of recompiling dependencies with different flags and trimming i18n away, I went from 897MB to ~20MB.
I initially tried GTK but found it added a lot of overhead. In my experiment, I used Wayland directly and draw the pixels using the CPU. Another trick was to render fonts directly. Using these approaches, the binary is under 300MiB and the initial PSS is < 1MiB.
I was thinking of maybe turning it into a minimal UI framework. I noticed that Quickshell apps in Hyprland are comparatively very large so something lighter weight might be useful.
I was thinking of maybe turning it into a minimal UI framework. I noticed that Quickshell apps in Hyprland are comparatively very large so something lighter weight might be useful.