From 87c333ff7a7ec11cd8ac69814452e9639a756946 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 28 Jan 2023 16:30:21 +0000 Subject: [PATCH] Always optimize dependencies They are only built once, but the time of `cargo nextest run` is reduced by around 40% as a result. --- Cargo.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 41e9a89d5..5fc9047b6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,6 +13,12 @@ opt-level = 1 [profile.test] opt-level = 0 +# Always optimize dependencies. +# This does not apply to crates in the workspace. +# +[profile.dev.package."*"] +opt-level = 3 + [profile.release] lto = true panic = 'abort'