An adventure with optimization, Rust and Z3