From 5736469b5a9cbb6567bc95ed1cda950aae7eddab Mon Sep 17 00:00:00 2001 From: Eunjin Song Date: Wed, 5 Aug 2026 22:26:35 -0700 Subject: [PATCH] build: strip release cdylib to shrink the JNI native library The release JNI cdylib currently ships unstripped, retaining the .symtab/.strtab symbol tables (~57 MB on linux-x86-64). strip = true removes them. JNI method resolution uses the dynamic symbol table (.dynsym), which strip preserves -- all exported Java_* symbols remain, so this is functionally safe. Measured on linux-x86-64: liblance_jni.so 278.35 MB -> 221.0 MB (-57.35 MB, -20.6%). Because java/lance-jni is excluded from the root workspace, this profile applies to the crate build directly. Co-Authored-By: Claude Opus 4.8 --- java/lance-jni/Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/lance-jni/Cargo.toml b/java/lance-jni/Cargo.toml index 0729cfb4631..31c3815187e 100644 --- a/java/lance-jni/Cargo.toml +++ b/java/lance-jni/Cargo.toml @@ -74,5 +74,8 @@ debug-assertions = false strip = "debuginfo" incremental = false +[profile.release] +strip = true + [lints.clippy] disallowed_macros = "deny"