cargo lipo

Provides a cargo lipo subcommand which automatically creates a universal library for use with your iOS application.
Maintenance Status
Please consider this project deprecated / passively maintained. This is partly because I am not currently working on any iOS projects, and partly because I believe that there exists a better alternative to using lipo:
One can use architecture (and OS) specific environment variables in Xcode. The OS specific part could be configured in the Xcode project editor last time I tried, but the architecture specific part needed to be added by manually editing the project.pbxproj file, for example like this:
"LIBRARY_SEARCH_PATHS[sdk=iphoneos*]" = ../path/to/target/debug/<...>;
"LIBRARY_SEARCH_PATHS[sdk=macosx11.1][arch=arm64]" = ../path/to/target/<...>;
"LIBRARY_SEARCH_PATHS[sdk=macosx11.1][arch=x86_64]" = ../path/to/target/<...>;
Thus, I believe that a future iOS support crate should offer primarily two features:
- Something similar to the current
--xcode-integflag. - Something which can do the
project.pbxprojediting.
Usage
From anywhere you would usually run cargo you can now run cargo lipo or cargo lipo --release to create a universal library for ios, which can be found in $target/universal/{release|debug}/$lib_name.a.
Make sure you have a library target in your Cargo.toml with a crate type of staticlib:
[lib]
name = "..."
crate-type = ["staticlib"]