Hacker News new | past | comments | ask | show | jobs | submit login

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.



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.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: