From 467afe279af2fbac0925398844396a1c4f104aeb Mon Sep 17 00:00:00 2001 From: Yujia Qiao Date: Sun, 26 Dec 2021 14:47:31 +0800 Subject: [PATCH] feat: opt binary size for `minimal` profile --- Cargo.toml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7cd9a98..c79915e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,12 +16,18 @@ tls = ["tokio-native-tls"] noise = ["snowstorm", "base64"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[profile.release] +lto = true + [profile.bench] debug = 1 [profile.minimal] inherits = "release" -opt-level = "s" +opt-level = "z" +lto = true +codegen-units = 1 +panic = "abort" [dependencies] tokio = { version = "1", features = ["full"] }