From be1f6cd699ecca85907cf7be868ef035cb2090b8 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Thu, 30 Nov 2023 17:28:33 +0100 Subject: [PATCH] Use `panic = "abort"` for slightly faster compilation --- Cargo.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 45f2f3c30..9eeb1849a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,16 +32,21 @@ opt-level = 2 # fast and small wasm, basically same as `opt-level = 's'` # debug = true # include debug symbols, useful when profiling wasm +panic = "abort" # This leads to better optimizations and smaller binaries (and is the default in Wasm anyways). + [profile.dev] # Can't leave this on by default, because it breaks the Windows build. Related: https://github.com/rust-lang/cargo/issues/4897 # split-debuginfo = "unpacked" # faster debug builds on mac # opt-level = 1 # Make debug builds run faster -# Optimize all dependencies even in debug builds (does not affect workspace packages): +panic = "abort" # This leads to better optimizations and smaller binaries (and is the default in Wasm anyways). + [profile.dev.package."*"] +# Optimize all dependencies even in debug builds (does not affect workspace packages): opt-level = 2 + [workspace.dependencies] puffin = "0.18" raw-window-handle = "0.5.0"