feat(plugin-cli): tune rust template release profile for size

This commit is contained in:
t8y2
2026-09-13 01:10:11 +08:00
parent f7f2e181ee
commit 71ddcfb79e
2 changed files with 13 additions and 0 deletions
@@ -9,3 +9,8 @@ license = "Apache-2.0"
[dependencies]
dbx-plugin-sdk = { path = "../../../sdk/rust/dbx-plugin-sdk" }
serde_json = "1"
[profile.release]
strip = true
lto = true
codegen-units = 1
@@ -9,3 +9,11 @@ license = "Apache-2.0"
[dependencies]
dbx-plugin-sdk = {{RUST_SDK_DEPENDENCY}}
serde_json = "1"
# Keep plugin binaries close to the host app's size: default release settings
# leave ~20MB of symbols and unoptimized generic code in an OpenDAL-sized backend.
# panic stays "unwind" so the sidecar protocol can report panics as errors.
[profile.release]
strip = true
lto = true
codegen-units = 1