Since it's currently UB to panic across an FFI boundary (rust-lang/rust#52652), code executed in the window procedure either must not panic or needs wrapping with catch_unwind. You can then either abort on panic or resume it outside the callback.
Winit catches the panic here and then calls resume_unwind in the main loop here. AFAICT druid-shell doesn't handle this at all.
Since it's currently UB to panic across an FFI boundary (rust-lang/rust#52652), code executed in the window procedure either must not panic or needs wrapping with catch_unwind. You can then either abort on panic or resume it outside the callback.
Winit catches the panic here and then calls resume_unwind in the main loop here. AFAICT druid-shell doesn't handle this at all.