
Some checks are pending
iOS UniFFI Build / build-ios (push) Waiting to run
Add church management API library with cross-platform support for iOS, Android, and WASM. Features include event management, bulletin handling, contact forms, and authentication.
24 lines
716 B
Rust
24 lines
716 B
Rust
use std::path::Path;
|
|
use uniffi_bindgen::library_mode::generate_bindings;
|
|
|
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
let lib_path = "target/aarch64-apple-ios/release/libchurch_core.a";
|
|
let out_dir = Path::new("bindings/ios");
|
|
|
|
// Create output directory if it doesn't exist
|
|
std::fs::create_dir_all(out_dir)?;
|
|
|
|
// Generate Swift bindings
|
|
generate_bindings(
|
|
&uniffi_bindgen::bindings::swift::SwiftBindingGenerator,
|
|
lib_path,
|
|
None, // no UDL file
|
|
None, // default config
|
|
None, // no config file
|
|
out_dir,
|
|
false, // not a library mode
|
|
)?;
|
|
|
|
println!("Swift bindings generated in {:?}", out_dir);
|
|
Ok(())
|
|
} |