euv_cli/builder/apple/struct.rs
1use super::*;
2
3/// Configuration for building an iOS, iPadOS, or watchOS `.app` bundle in pure Rust.
4#[derive(Clone, Data, Debug, Deserialize, Eq, PartialEq, Serialize)]
5pub struct AppleBuildConfig {
6 /// Root directory of the `euv` workspace containing `Cargo.toml` and `example/`.
7 pub(crate) workspace_root: PathBuf,
8 /// Selected Apple target kind (`IosSim`, `IpadSim`, `IosDevice`, `IpadDevice`, `WatchOsSim`, `WatchOsDevice`).
9 #[get(type(copy))]
10 pub(crate) target_kind: AppleTargetKind,
11 /// Default render pipeline mode configured in `host_config.rs`.
12 #[get(type(copy))]
13 pub(crate) render_mode: RenderArg,
14 /// Optional explicit semantic version overriding workspace `Cargo.toml`.
15 pub(crate) app_version: Option<String>,
16 /// Optional explicit numeric `CFBundleVersion` build number.
17 #[get(type(copy))]
18 pub(crate) build_number: Option<u32>,
19 /// Optional explicit `CFBundleIdentifier` overriding target defaults.
20 pub(crate) bundle_id: Option<String>,
21 /// Optional output directory containing the `.app` bundle (default `dist/ios` or `dist/wearable/watchos`).
22 pub(crate) out_dir: Option<PathBuf>,
23 /// Optional staging directory for the generated Rust staticlib crate and ObjC/Swift sources.
24 pub(crate) build_dir: Option<PathBuf>,
25 /// Optional `.tar.gz` archive path created from the signed `.app` bundle.
26 pub(crate) archive_path: Option<PathBuf>,
27 /// Optional codesign identity (defaults to `"-"` for ad-hoc signing).
28 pub(crate) codesign_identity: Option<String>,
29 /// Optional explicit iOS/iPadOS Simulator UDID overriding `EUV_IOS_SIM_UDID` auto-detection.
30 pub(crate) sim_udid: Option<String>,
31 /// Whether to build in release profile with AI-schema stripping verification.
32 #[get(type(copy))]
33 pub(crate) release: bool,
34 /// When `true` (or when `EUV_IOS_SKIP_LAUNCH=1`), skips Simulator boot/install/launch.
35 #[get(type(copy))]
36 pub(crate) no_launch: bool,
37 /// When `true`, generates host sources, `Info.plist`, and icons without invoking Xcode tools.
38 #[get(type(copy))]
39 pub(crate) shell_only: bool,
40}
41
42/// Machine-readable report produced after generating or building an Apple `.app` bundle.
43#[derive(Clone, Debug, Deserialize, Eq, Getter, PartialEq, Serialize)]
44pub struct AppleBuildReport {
45 /// Canonical target label (`ios-sim`, `ipad-sim`, `ios`, `ipad`, `watchos-sim`, `watchos`).
46 pub(crate) target_kind: String,
47 /// Rust target triple used to compile the static library.
48 pub(crate) rust_triple: String,
49 /// Resolved semantic version written into `Info.plist` and host `Cargo.toml`.
50 pub(crate) version: String,
51 /// Resolved `CFBundleVersion` build number string.
52 pub(crate) build_number: String,
53 /// Host project staging directory path.
54 pub(crate) build_dir: PathBuf,
55 /// Generated or compiled `.app` bundle directory path.
56 pub(crate) app_bundle_path: PathBuf,
57 /// Optional archived `.tar.gz` bundle path when archiving was requested.
58 pub(crate) archive_path: Option<PathBuf>,
59 /// Compiled executable binary size in bytes (`0` when `shell_only` is `true`).
60 #[get(type(copy))]
61 pub(crate) binary_bytes: u64,
62 /// Whether the release binary passed the zero AI-schema marker check.
63 #[get(type(copy))]
64 pub(crate) ai_schema_clean: bool,
65 /// Whether the bundle was installed and launched in a Simulator.
66 #[get(type(copy))]
67 pub(crate) launched: bool,
68}