I created an application mixing GUI and skylark in single binary.
Skylark passes callbacks to GUI to change some settings (callbacks must be declared static/global).
GUI prepares some data to be shown by skylark in advance and stores them as static/global variables protected by mutexes.
Now I am thinking about using web sockets to update content of pages generated by skylark without page refresh.