Skip to content

Optimize library size if possible #220

@SubatomicPlanets

Description

@SubatomicPlanets

I use the UniFFI Kotlin bindings, and when I analyze my APK, I can see that libmdk_uniffi.so file uses 6.3MB (plus another 5.2MB for armv7. This is the largest library in my app). Other libraries like rust-nostr use configuration code like this to optimize space:

[profile.release]
opt-level = 'z'     # Optimize for size
lto = true          # Enable Link Time Optimization
codegen-units = 1   # Reduce the number of codegen units to increase optimizations
panic = "abort"     # Abort on panic
strip = true        # Full strip the binary. A debug binary will be used for generating UniFFI foreign languages!

(copied directly from rust-nostr)

I don't know how much something like this would help, but the smaller the better!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions