Our Rust code is always built in debug mode
In src/rust/Cargo.toml
:
[profile.release]
debug = true
This enables certain things, e.g. debug_assert!(false = true)
will panic. It also does stuff like bounds checks for every access and integer overflow/underflow checks every time any number is used. These are great things to do, but they are usually done in debug builds which are used in testing, not in release. This will make our code literally hundreds of times slower, so we should probably remove this.