panic inside rust extern "C" function is undefined behavior

panic="abort" needs to be set for all profiles in Cargo.toml, at least until the upstream bug is fixed: https://github.com/rust-lang/rust/issues/52652

This is already set for [profile.release] builds, but not for the others.

Trac:
Username: cyberpunks