Hacker News new | ask | show | jobs
by steveklabnik 1093 days 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.
1 comments

What is the one line? (I shall benchmark!)
iirc 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.

Thanks!
… I just realized that second should have been true not false. Lol. Hope I didn’t lead you astray.