# UniFFI iOS Build Makefile # No Python dependencies required .PHONY: all clean ios android wasm help install-deps # Default target all: ios # Build iOS framework with UniFFI bindings ios: @echo "๐Ÿš€ Building iOS framework..." @./build_ios.sh # Clean all build artifacts clean: @echo "๐Ÿงน Cleaning build artifacts..." @rm -rf target/ @rm -rf bindings/ @rm -rf libchurch_core_universal.a # Install required dependencies install-deps: @echo "๐Ÿ“ฆ Installing build dependencies..." @rustup target add aarch64-apple-ios @rustup target add x86_64-apple-ios @rustup target add aarch64-apple-ios-sim @cargo install uniffi_bindgen --bin uniffi-bindgen # Test the Rust library test: @echo "๐Ÿงช Running tests..." @cargo test --features uniffi # Build for development (faster, debug mode) dev: @echo "๐Ÿ”ง Building development version..." @cargo build --features uniffi # Generate only Swift bindings (no rebuild) bindings-only: @echo "โšก Generating Swift bindings only..." @mkdir -p bindings/ios @uniffi-bindgen generate \ --library target/aarch64-apple-ios/release/libchurch_core.a \ --language swift \ --out-dir bindings/ios \ src/church_core.udl @echo "๐Ÿ“‹ Creating module map..." @echo 'module church_coreFFI {\n header "church_coreFFI.h"\n export *\n}' > bindings/ios/church_coreFFI.modulemap # Copy generated files to iOS project copy-to-ios: @echo "๐Ÿ“ฆ Copying files to iOS project..." @cp bindings/ios/church_core.swift ../RTSDA-iOS/RTSDA/ @cp bindings/ios/church_coreFFI.h ../RTSDA-iOS/RTSDA/ @cp bindings/ios/church_coreFFI.modulemap ../RTSDA-iOS/RTSDA/ @cp bindings/ios/libchurch_core_universal.a ../RTSDA-iOS/RTSDA/libchurch_core.a # Help help: @echo "๐Ÿ“š Available commands:" @echo " make ios - Build complete iOS framework (default)" @echo " make clean - Clean all build artifacts" @echo " make install-deps - Install required build dependencies" @echo " make test - Run Rust tests" @echo " make dev - Quick development build" @echo " make bindings-only - Generate Swift bindings only" @echo " make copy-to-ios - Copy generated files to iOS project" @echo " make help - Show this help message"