Introducing cargo-xcodebuild: helps cargo build and run apps for iOS
cargo-xcodebuild automates a lot of routines required to run Rust apps on iOS.
For example, with these small changes in your bevy/miniquad/wgpu/etc.. game, it can be run with one simple command:
1.Cargo.toml:
[lib]
crate-type = ["staticlib"]
[package.metadata.ios]
build_targets = ["aarch64-apple-ios", "aarch64-apple-ios-sim", "x86_64-apple-ios"]
lib.rs:#[no_mangle]
pub extern "C" fn main_rs() {
// start game code here
}
Running steps:
- Boot a simulator
cargo xcodebuild run
Following instruction to run on a simulator or a device or check a README for another useful commands.