Maybe work with GNOME/KDE team to add to KDE and GNOME runtime some webassembly support?
This support will be placed in each runtime for each architecture, so GNOME/x86,GNOME/x86_64,GNOME/aarch,KDE/x86,etc. Difference is the app could be in webassembly architecture.
Another think is to add standard interface for interact with platform libraries. Some wrapper for dlopen and dlsym.