Use the neon crate to compile your Rust library into a single binary compatible with both Android and iOS.
cargo install neon-cli
neon create mylib
# Add your Rust code to src/lib.rs
neon build --release
This generates a target/release folder containing the compiled library for your current platform. To build for the other platform, install the corresponding Xcode (iOS) or Android SDK (Android) and run neon build again with the appropriate environment.