1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//! Build automation for mobile platforms.
//!
//! This module provides builders for Android and iOS that automate the process
//! of compiling Rust code to mobile libraries and packaging them into mobile apps.
//!
//! ## Overview
//!
//! The builders handle the complete build pipeline:
//!
//! 1. **Rust compilation** - Cross-compile Rust to mobile targets
//! 2. **Binding generation** - Generate UniFFI Kotlin/Swift bindings
//! 3. **Native library packaging** - Copy `.so` files to Android or create xcframework for iOS
//! 4. **App building** - Run Gradle (Android) or xcodebuild (iOS)
//!
//! ## Builders
//!
//! | Builder | Platform | Output |
//! |---------|----------|--------|
//! | [`AndroidBuilder`] | Android | APK with native `.so` libraries |
//! | [`IosBuilder`] | iOS | xcframework with static libraries |
//!
//! ## Common Utilities
//!
//! The `common` module (internal) provides shared functionality:
//!
//! - Workspace-aware Cargo target directory detection
//! - Host library path resolution for UniFFI binding generation
//! - Consistent command execution with actionable error messages
//!
//! ## Builder Options
//!
//! Both builders support the following configuration:
//!
//! - **`verbose(bool)`** - Enable detailed output showing each build step
//! - **`dry_run(bool)`** - Preview build steps without making changes
//! - **`output_dir(path)`** - Customize output location (default: `target/mobench/`)
//! - **`crate_dir(path)`** - Override auto-detected crate location
//!
//! ## Example
//!
//! ```ignore
//! use mobench_sdk::builders::{AndroidBuilder, IosBuilder};
//! use mobench_sdk::{BuildConfig, BuildProfile, Target};
//!
//! // Build for Android with dry-run
//! let android = AndroidBuilder::new(".", "my-bench")
//! .verbose(true)
//! .dry_run(true); // Preview only
//!
//! // Build for iOS
//! let ios = IosBuilder::new(".", "my-bench")
//! .verbose(true);
//!
//! let config = BuildConfig {
//! target: Target::Android,
//! profile: BuildProfile::Release,
//! incremental: true,
//! };
//!
//! android.build(&config)?;
//! # Ok::<(), mobench_sdk::BenchError>(())
//! ```
// Re-export builders
pub use AndroidBuilder;
pub use ;
pub use ;