scarpe-team / scarpe

Scarpe - shoes but running on webview
Other
162 stars 29 forks source link

Multiple apps in Lacci and Niente #557

Closed noahgibbs closed 1 month ago

noahgibbs commented 2 months ago

Description

Support multiple Shoes apps in Lacci and in Niente. Display services that don't opt into multiple apps with the :multi_app feature won't change behaviour.

Checklist

noahgibbs commented 2 months ago

Nope, found a problem, not ready to merge.

Right now we start the event loop inside Shoes::App#run, after eval'ing the app code in Shoes::App#init. That doesn't work well for what we want here -- unless we just exit the event loop, it doesn't work. Though I guess we could exit the event loop then add an at_exit handler to run it.

Making an event-loop-agnostic API library is definitely being an interesting challenge.

noahgibbs commented 2 months ago

Okay, now I think I have it, including having Niente actually support multiple apps properly, and a test to demonstrate that.