iOS binary size

Hey,
I'm building a library for multiple platforms including iOS and Android. The resulting binary size is about 1MB for all targets but the iOS binary has 5MB. I'm using cargo lipo for the build.

I suspect that cargo-features = ["strip"] doesn't work with iOS but invoking strip directly also doesn't help much.

Do you have an idea how to build a small binary for iOS?

Here are a few methods:

If you're using static linking, then remember that size of .a is not comparable to sizes of dylib/so, since archives are not linked yet. For the same reason to enable LTO you'll need to enable it in Xcode, not in Rust/Cargo.