From e7db6ceea06e5af0f20d2e838db819337a24ae91 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Fri, 20 Dec 2019 17:32:42 +0100 Subject: [PATCH] optimize for size by following the first recommendations of https://github.com/johnthagen/min-sized-rust --- Cargo.toml | 5 +++++ deltachat-ffi/Cargo.toml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index ce3dac0c5..6e937e3d7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,11 @@ authors = ["Delta Chat Developers (ML) "] edition = "2018" license = "MPL" +[profile.release] +opt-level = 'z' # Optimize for size. +lto = true +codegen-units = 1 + [dependencies] deltachat_derive = { path = "./deltachat_derive" } diff --git a/deltachat-ffi/Cargo.toml b/deltachat-ffi/Cargo.toml index 949d99c2c..36bb8b986 100644 --- a/deltachat-ffi/Cargo.toml +++ b/deltachat-ffi/Cargo.toml @@ -10,6 +10,11 @@ license = "MIT OR Apache-2.0" keywords = ["deltachat", "chat", "openpgp", "email", "encryption"] categories = ["cryptography", "std", "email"] +[profile.release] +opt-level = 'z' # Optimize for size. +lto = true +codegen-units = 1 + [lib] name = "deltachat" crate-type = ["cdylib", "staticlib"]