From f2963a3d4eb19411590714611f91e5899b849648 Mon Sep 17 00:00:00 2001 From: Rokas Puzonas Date: Sat, 6 May 2023 20:29:04 +0300 Subject: [PATCH] optimize release build --- Cargo.lock | 2 +- Cargo.toml | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d042993..82b8006 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2756,7 +2756,7 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "ubusman" -version = "0.1.0" +version = "1.0.0" dependencies = [ "anyhow", "async-ssh2-lite", diff --git a/Cargo.toml b/Cargo.toml index 745a838..ae90350 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,8 @@ [package] name = "ubusman" -version = "0.1.0" +version = "1.0.0" edition = "2021" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [dependencies] anyhow = "1.0.70" async-ssh2-lite = { version = "0.4.5", features = ["async-io"] } @@ -26,3 +24,9 @@ thiserror = "1.0.40" tokio = { version = "1.26.0", features = ["macros", "rt-multi-thread"] } toml = "0.7.3" version = "3.0.0" + +[profile.release] +opt-level = 'z' # Optimize for size +lto = true # Enable link-time optimization +codegen-units = 1 # Reduce number of codegen units to increase optimizations +strip = true # Strip symbols from binary* \ No newline at end of file