From 2e4d6b572356096bc5ee836a3e9695b9dcacbacc Mon Sep 17 00:00:00 2001 From: alexhroom Date: Thu, 5 Jan 2023 11:56:37 +0000 Subject: [PATCH] added compilation options to reduce libs size --- src/rust/Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rust/Cargo.toml b/src/rust/Cargo.toml index f30e689..169b227 100644 --- a/src/rust/Cargo.toml +++ b/src/rust/Cargo.toml @@ -8,3 +8,7 @@ crate-type = [ 'staticlib' ] [dependencies] extendr-api = { git = "https://github.com/extendr/extendr", rev = "b32fd0365bfc1c682a09dd7b4bceca0a91ac085d" } + +[profile.release] +opt-level = 'z' # Optimize for size +lto = true # Enable link-time optimization