From fcce5bd5935c35bc9fb537b020c6b2af946cab5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Djk=C3=A1=C5=A5o?= Date: Fri, 19 Apr 2024 21:55:47 +0200 Subject: [PATCH] size optimalisations --- Cargo.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 8896f07..f50e128 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,3 +29,10 @@ tokio = { version = "1.32.0", features = [ [[bin]] name = "nmb" path = "src/main.rs" + +[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 +panic = 'abort' # Abort on panic +strip = true # Strip symbols from binary*