3 ms·
You can pretty trivially turn on overflow checks yet compile with all of the other release options as normal. It's one line in cargo.toml or one flag to rustc.
by steveklabnik 3y ago
You can pretty trivially turn on overflow checks yet compile with all of the other release options as normal. It's one line in cargo.toml or one flag to rustc.
- nullc 3y agoWhat is the one line? (I shall benchmark!)
- steveklabnik 3y agoiirc it's `-C overflow-checks=y` to rustc or [profile.release] overflow-checks = false in cargo.toml. I would probably use the flags with RUSTFLAGS to make sure that it goes to all dependencies and not just the crate you're building, if what you're building has dependencies.
- nullc 3y agoThanks!
- steveklabnik 3y ago… I just realized that second should have been true not false. Lol. Hope I didn’t lead you astray.