# ios

Building and Deploying a Rust library on iOS (opens new window)

# cargo lipo

Cargo subcommand to automatically create universal libraries for iOS. (opens new window)

cd localnative_rs/localnative_core
cargo lipo --release

This will build

localnative-rs/target/universal/release/liblocalnative_core.a
localnative-ios/liblocalnative_core.a

is symbolically linked to the above rust library.

# lib crate type

To build for iOS, Cargo.toml must use staticlib

[lib]
name = "localnative_core"
# ios works as below
crate-type = ["staticlib"]