From b2610387d3917f936ecb6ce3c21f2f2778470fd9 Mon Sep 17 00:00:00 2001 From: Boshen Date: Sat, 25 Feb 2023 20:51:25 +0800 Subject: [PATCH] chore(rust): comment on profile.release and set abort = "panic" for performance --- Cargo.toml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 82789152c..4e4976253 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,10 +31,11 @@ clap = "4.1.6" indextree = "4.5.0" [profile.release] +# Configurations explicitly listed here for clarity. +# Using the best options for performance. +opt-level = 3 lto = "fat" codegen-units = 1 -strip = true - -# DO NOT SET PANIC TO ABORT -# we are using catch_unwind for panic recovery -panic = "unwind" +strip = "debuginfo" +debug = false +panic = "abort" # Let it crash and force ourselves to write safe Rust.