I'm writing a program that's quite compute heavy, and it's annoyingly slow to run in debug mode.
My program is also plagued by integer overflows, because I'm reading data from u8 arrays and u8 type spreads to unexpected places via type inference, and Rust prefers to overflow rather than to promote integers to larger types.
Building in release mode disables overflow checks:
cargo run --release
How can I build Rust executable with optimizations and runtime overflow checks enabled as well?