Add panic example

This commit is contained in:
laurens 2020-06-21 17:14:48 +02:00
parent ef4d3222fa
commit 3abff3cb7a
2 changed files with 20 additions and 0 deletions

17
panic/Cargo.toml Normal file
View file

@ -0,0 +1,17 @@
[package]
name = "panic"
version = "0.1.0"
authors = ["laurens <miers132@gmail.com>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
# Instead of unwinding on panic,
# meaning we walk back up the stack and clean up
# the data of every function, we abort immediatelly
# and let the underlying OS cleanup for us.
# This is usefull if you want to keep program binary as small as possible
[profile.release]
panic = 'abort'