I did an experiment to see how small and efficient I could make a desktop Linux app. One thing I learned is GPU adds a lot of memory overhead without much benefit for very basic apps.
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.
Agree. I learned quite a few things in this exercise, actually. Another one is that conventional font rendering uses a lot of memory as well. Link below if anyone is interested:
https://simonshine.dk/articles/nix-appimage-when-musl-is-not...