From 1f83ffdff4a90b76900a4be508f076e6c15eb7df Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Thu, 4 Feb 2021 16:04:55 -0600 Subject: [PATCH] Switch to panic='abort' for safety across FFI boundaries (#47) Co-authored-by: Pratyush Mishra --- CHANGELOG.md | 1 + Cargo.toml | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 809e1d0..9affa16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ - #29 Fix `to_non_unique_bytes` for `BLS12::G1Prepared` - #34 Fix `mul_by_inverse` for constants - #42 Fix regression in `mul_by_inverse` constraint count +- #47 Compile with `panic='abort'` in release mode, for safety of the library across FFI boundaries. ## v0.1.0 diff --git a/Cargo.toml b/Cargo.toml index d725874..7bd31ee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,12 @@ include = ["Cargo.toml", "src", "README.md", "LICENSE-APACHE", "LICENSE-MIT"] license = "MIT/Apache-2.0" edition = "2018" +[profile.release] +panic = 'abort' + +[profile.dev] +panic = 'abort' + [dependencies] ark-ff = { git = "https://github.com/arkworks-rs/algebra", default-features = false } ark-ec = { git = "https://github.com/arkworks-rs/algebra", default-features = false }