I agree that libraries should avoid panicking, but it is not true you can't do anything about it. You can wrap a call to such library into https://doc.rust-lang.org/std/panic/fn.catch_unwind.html
Which of those is the case for the desktop app described by the parent?
I typically don’t control every type that I am interacting with.