Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

min sized -lib (.a) #55

Open
bltpanda opened this issue Nov 3, 2023 · 0 comments
Open

min sized -lib (.a) #55

bltpanda opened this issue Nov 3, 2023 · 0 comments

Comments

@bltpanda
Copy link

bltpanda commented Nov 3, 2023

I followed the instructions to compile the library, creating a static library(.a) that contains only the simplest method. The final size is 221kb. Is this in line with expectations?

[package]
name = "greetings"
version = "0.1.1"
authors = ["fluffyemily <[email protected]>"]
description = "Example static library project built for iOS"
publish = false

[target.'cfg(target_os="android")'.dependencies]
jni = { version = "0.5", default-features = false }

[lib]
name = "greetings"
crate-type = ["staticlib", "cdylib"]

[profile.release]
debug = false
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        # Automatically strip symbols from the binary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant