From 1363560d0f1a52a997d191a3c2c4bd6eefab15d2 Mon Sep 17 00:00:00 2001 From: Ying Xiong Date: Fri, 8 Nov 2024 02:40:04 +0000 Subject: [PATCH 1/3] minimal build --- parser/Cargo.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/parser/Cargo.toml b/parser/Cargo.toml index f40b40a5..2070ba6b 100644 --- a/parser/Cargo.toml +++ b/parser/Cargo.toml @@ -25,3 +25,10 @@ crate-type = ["staticlib", "rlib"] [build-dependencies] cbindgen = "0.27.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 +panic = 'abort' # Abort on panic +strip = true # Strip symbols from binary* \ No newline at end of file From c45d85293711e0579e0fb0af738e56044101d99f Mon Sep 17 00:00:00 2001 From: Ying Xiong Date: Fri, 8 Nov 2024 02:58:15 +0000 Subject: [PATCH 2/3] add cdylib --- parser/Cargo.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/parser/Cargo.toml b/parser/Cargo.toml index 2070ba6b..9ae905c9 100644 --- a/parser/Cargo.toml +++ b/parser/Cargo.toml @@ -21,14 +21,12 @@ default = [] logging = [] [lib] -crate-type = ["staticlib", "rlib"] +crate-type = ["staticlib", "rlib", "cdylib"] [build-dependencies] cbindgen = "0.27.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 -panic = 'abort' # Abort on panic strip = true # Strip symbols from binary* \ No newline at end of file From 623ca9cdeb79d9466117436626d8ad2c88747c3d Mon Sep 17 00:00:00 2001 From: Ying Xiong Date: Fri, 8 Nov 2024 05:10:15 +0000 Subject: [PATCH 3/3] remove optimizations --- parser/Cargo.toml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/parser/Cargo.toml b/parser/Cargo.toml index 9ae905c9..1eb0f5c9 100644 --- a/parser/Cargo.toml +++ b/parser/Cargo.toml @@ -25,8 +25,3 @@ crate-type = ["staticlib", "rlib", "cdylib"] [build-dependencies] cbindgen = "0.27.0" - -[profile.release] -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