1use apple_platforms::platform::{ApplePlatform, Platform};
2
3fn main() {
4 println!("=== Apple Platforms (from LLVM MachO.def) ===\n");
5 println!(
6 "{:<20} {:>2} {:<18} {:<18} {:<22} {}",
7 "Platform", "ID", "Target", "TAPI Target", "Marketing", "SDK"
8 );
9 println!("{}", "-".repeat(100));
10
11 for ap in ApplePlatform::iter() {
12 let p = Platform::from(ap);
13 println!(
14 "{:<20} {:>2} {:<18} {:<18} {:<22} {}",
15 p.platform,
16 p.id,
17 p.target,
18 p.tapi_target,
19 p.marketing,
20 p.sdk.unwrap_or("-"),
21 );
22 }
23
24 println!("\nSimulators (sim → device):");
25 for ap in ApplePlatform::iter().filter(|p| p.is_simulator()) {
26 println!(" {:<22} → {}", ap, ap.device());
27 }
28
29 println!("\nDevice platforms (device → sim):");
30 for ap in ApplePlatform::iter().filter(|p| p.is_device()) {
31 let sim = ap.simulator()
32 .map(|s| s.to_string())
33 .unwrap_or_else(|| "(none)".to_string());
34 println!(" {:<22} → {}", ap, sim);
35 }
36}