#Make `App::run` non-blocking in web

2 messages · Page 1 of 1 (latest)

halcyon jungle
#

Hi! I managed to export my rust function to js via wasm_bindgen, but the question is if the function call would be non-blocking. Docs state, that I can make App::run non-blocking by setting WinitSettings::return_from_run flag, but it is not supported on web. Is there any other way to make my js API non-blocking?

vagrant echo
#

Theoretically we should be able to use the non-blocking EventLoop::spawn instead of EventLoop::run in WASM, but this hasn't happened yet...
I have a fork that attempts to make this work. It didn't solve the original issue I attempted this for, and I haven't really had the chance to look into it further, but this would be the right direction I believe.