From 52ff92e06db20e0a33286c3dbedab905035508a2 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Wed, 16 Mar 2022 01:24:16 +0100 Subject: [PATCH] Use env_logger w/o unnecessary regex feature to reduce binary size This reduces size of the swayr binary by ~57 %. It doesn't affect the size of the swayrd binary because swayrd uses regex. When building with lto = true, opt-level = "z" and panic = "abort" on Alpine Linux: swayr 1 294 kiB -> 554 kiB --- Cargo.lock | 1 - Cargo.toml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 16aa931..82c8408 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -99,7 +99,6 @@ dependencies = [ "atty", "humantime", "log", - "regex", "termcolor", ] diff --git a/Cargo.toml b/Cargo.toml index 343cb1b..4247067 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,4 +21,4 @@ lazy_static = "1.4.0" rand = "0.8.4" rt-format = "0.3.0" log = "0.4" -env_logger = "0.9.0" +env_logger = { version = "0.9.0", default-features = false, features = ["termcolor", "atty", "humantime"] } # without regex