Aborting on panic

Minimum Rust version: 1.10

By default, Rust programs will unwind the stack when a panic! happens. If you'd prefer animmediate abort instead, you can configure this in Cargo.toml:

  1. [profile.dev]
  2. panic = "abort"
  3. [profile.release]
  4. panic = "abort"

Why might you choose to do this? By removing support for unwinding, you'llget smaller binaries. You will lose the ability to catch panics. Which choiceis right for you depends on exactly what you're doing.