From 2cddc4e7a863577b1cd11cf922283f6294f13ebb Mon Sep 17 00:00:00 2001 From: Ninjdai Date: Tue, 5 Aug 2025 15:15:44 +0200 Subject: [PATCH] configure release profile to reduce binary size --- Cargo.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 111794b..57d09c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,12 @@ name = "alexandria" version = "0.1.0" edition = "2024" +[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* + [dependencies] axum = { version = "0.8.4", features = [ "macros", "ws", "tokio" ] } axum-extra = { version = "0.10.1", features = ["typed-header"] }