euv-cli 0.51.0

Cross-platform CLI tool for the euv native UI framework supporting run, build, check, fmt, doctor, new, and Hyperlane SSE dynamic updates across all supported platforms.
Documentation
/// Target label for iOS Simulator.
pub(crate) const APPLE_LABEL_IOS_SIM: &str = "ios-sim";
/// Target label for iPadOS Simulator.
pub(crate) const APPLE_LABEL_IPAD_SIM: &str = "ipad-sim";
/// Target label for physical iOS devices.
pub(crate) const APPLE_LABEL_IOS_DEVICE: &str = "ios";
/// Target label for physical iPadOS devices.
pub(crate) const APPLE_LABEL_IPAD_DEVICE: &str = "ipad";
/// Target label for watchOS Simulator.
pub(crate) const APPLE_LABEL_WATCHOS_SIM: &str = "watchos-sim";
/// Target label for physical Apple Watch devices.
pub(crate) const APPLE_LABEL_WATCHOS_DEVICE: &str = "watchos";
/// Rust target triple for 64-bit ARM iOS and iPadOS Simulator.
pub(crate) const APPLE_TRIPLE_IOS_SIM: &str = "aarch64-apple-ios-sim";
/// Rust target triple for 64-bit ARM physical iOS and iPadOS devices.
pub(crate) const APPLE_TRIPLE_IOS_DEVICE: &str = "aarch64-apple-ios";
/// Rust target triple for 64-bit ARM watchOS Simulator.
pub(crate) const APPLE_TRIPLE_WATCHOS_SIM: &str = "aarch64-apple-watchos-sim";
/// Rust target triple for 64-bit ARM physical Apple Watch devices.
pub(crate) const APPLE_TRIPLE_WATCHOS_DEVICE: &str = "aarch64-apple-watchos";
/// Xcode SDK name for iOS Simulator.
pub(crate) const APPLE_SDK_IPHONE_SIM: &str = "iphonesimulator";
/// Xcode SDK name for physical iOS devices.
pub(crate) const APPLE_SDK_IPHONE_OS: &str = "iphoneos";
/// Xcode SDK name for watchOS Simulator.
pub(crate) const APPLE_SDK_WATCH_SIM: &str = "watchsimulator";
/// Xcode SDK name for physical watchOS devices.
pub(crate) const APPLE_SDK_WATCH_OS: &str = "watchos";
/// Default iOS/iPadOS `.app` bundle directory name.
pub(crate) const APPLE_IOS_BUNDLE_NAME: &str = "EuvShowcase.app";
/// Default iOS/iPadOS executable binary name inside the bundle.
pub(crate) const APPLE_IOS_EXEC_NAME: &str = "EuvShowcase";
/// Default iOS/iPadOS bundle identifier.
pub(crate) const APPLE_IOS_BUNDLE_ID: &str = "vip.ltpp.euv.showcase";
/// Default watchOS `.app` bundle directory name.
pub(crate) const APPLE_WATCHOS_BUNDLE_NAME: &str = "EuvWatch.app";
/// Default watchOS executable binary name inside the bundle.
pub(crate) const APPLE_WATCHOS_EXEC_NAME: &str = "EuvWatch";
/// Default watchOS bundle identifier.
pub(crate) const APPLE_WATCHOS_BUNDLE_ID: &str = "vip.ltpp.euv.showcase.watchkitapp";
/// Default output subdirectory under `dist/` for iOS/iPadOS builds.
pub(crate) const APPLE_OUT_SUBDIR_IOS: &str = "ios";
/// Default output subdirectory under `dist/` for watchOS builds.
pub(crate) const APPLE_OUT_SUBDIR_WATCHOS: &str = "wearable/watchos";
/// Staging directory name under `target/mobile-hosts/` for iOS/iPadOS host.
pub(crate) const APPLE_HOST_DIR_IOS: &str = "ios-host";
/// Staging directory name under `target/mobile-hosts/` for watchOS host.
pub(crate) const APPLE_HOST_DIR_WATCHOS: &str = "watchos-host";
/// Compiled Rust iOS static library filename.
pub(crate) const APPLE_IOS_STATICLIB_NAME: &str = "libeuv_ios_host.a";
/// Compiled Rust watchOS static library filename.
pub(crate) const APPLE_WATCHOS_STATICLIB_NAME: &str = "libeuv_watchos_host.a";
/// Objective-C entry file generated for iOS/iPadOS.
pub(crate) const APPLE_IOS_MAIN_M_FILE: &str = "main.m";
/// Property list manifest filename inside Apple bundles.
pub(crate) const APPLE_INFO_PLIST_FILE: &str = "Info.plist";
/// WatchOS SwiftUI source subdirectory.
pub(crate) const APPLE_WATCHOS_APP_SRC_DIR: &str = "EuvWatchApp";
/// WatchOS Objective-C bridging header filename.
pub(crate) const APPLE_WATCHOS_BRIDGE_H_FILE: &str = "EuvWatchBridge.h";
/// WatchOS SwiftUI app entry filename.
pub(crate) const APPLE_WATCHOS_SWIFT_FILE: &str = "EuvWatchApp.swift";
/// WatchOS AppIcon asset catalog relative directory.
pub(crate) const APPLE_WATCHOS_ICONSET_REL: &str = "EuvWatchApp/Assets.xcassets/AppIcon.appiconset";
/// WatchOS AppIcon asset catalog descriptor filename.
pub(crate) const APPLE_CONTENTS_JSON_FILE: &str = "Contents.json";
/// WatchOS AppIcon 1024px image filename.
pub(crate) const APPLE_APP_ICON_PNG_FILE: &str = "AppIcon.png";
/// WatchOS static library staging root directory name.
pub(crate) const APPLE_LIBS_DIR_NAME: &str = "libs";
/// iOS AppIcon filenames paired with exact square pixel dimensions.
pub(crate) const APPLE_IOS_ICON_FILES: &[(&str, u32)] = &[
    ("AppIcon60x60@2x.png", 120),
    ("AppIcon60x60@3x.png", 180),
    ("AppIcon.png", 1024),
];
/// WatchOS AppIcon asset catalog JSON contents.
pub(crate) const APPLE_WATCHOS_ICONSET_JSON: &str = r#"{
  "images": [
    { "filename": "AppIcon.png", "idiom": "watch", "scale": "1x", "size": "1024x1024" }
  ],
  "info": { "author": "euv", "version": 1 }
}
"#;
/// Embedded iOS Rust staticlib host template.
pub(crate) const APPLE_IOS_HOST_LIB_RS_TEMPLATE: &str = include_str!("ios_host_lib.rs.tmpl");
/// Embedded iOS Objective-C UIKit/Metal host template.
pub(crate) const APPLE_IOS_MAIN_M_TEMPLATE: &str = include_str!("ios_main.m.tmpl");
/// Embedded watchOS Rust staticlib host template.
pub(crate) const APPLE_WATCHOS_HOST_LIB_RS_TEMPLATE: &str =
    include_str!("watchos_host_lib.rs.tmpl");
/// Embedded watchOS Objective-C bridging header template.
pub(crate) const APPLE_WATCHOS_BRIDGE_H_TEMPLATE: &str = include_str!("watchos_bridge.h.tmpl");
/// Embedded watchOS SwiftUI app template.
pub(crate) const APPLE_WATCHOS_APP_SWIFT_TEMPLATE: &str = include_str!("watchos_app.swift.tmpl");
/// All 10 Apple system frameworks linked into the iOS/iPadOS host executable.
pub(crate) const APPLE_IOS_FRAMEWORKS: &[&str] = &[
    "UIKit",
    "WebKit",
    "UserNotifications",
    "CoreMotion",
    "Metal",
    "CoreGraphics",
    "QuartzCore",
    "CoreText",
    "CoreFoundation",
    "Foundation",
];
/// All 7 Apple system frameworks linked into the watchOS SwiftUI host executable.
pub(crate) const APPLE_WATCHOS_FRAMEWORKS: &[&str] = &[
    "SwiftUI",
    "WatchKit",
    "CoreGraphics",
    "CoreText",
    "CoreFoundation",
    "CoreMotion",
    "Foundation",
];
/// Apple developer CLI launcher binary.
pub(crate) const CMD_XCRUN: &str = "xcrun";
/// Apple binary symbol stripping tool.
pub(crate) const CMD_STRIP: &str = "strip";
/// Apple bundle code-signing tool.
pub(crate) const CMD_CODESIGN: &str = "codesign";
/// POSIX tar archiver command used for `.tar.gz` bundle archives.
pub(crate) const APPLE_CMD_TAR: &str = "tar";
/// Xcode `xcrun --sdk` flag.
pub(crate) const ARG_XCRUN_SDK: &str = "--sdk";
/// Xcode `xcrun --show-sdk-path` flag.
pub(crate) const ARG_XCRUN_SHOW_SDK_PATH: &str = "--show-sdk-path";
/// Xcode `xcrun --find` flag.
pub(crate) const ARG_XCRUN_FIND: &str = "--find";
/// Xcode `clang` tool lookup name.
pub(crate) const TOOL_CLANG: &str = "clang";
/// Xcode `swiftc` tool name.
pub(crate) const TOOL_SWIFTC: &str = "swiftc";
/// Xcode `simctl` subcommand name.
pub(crate) const TOOL_SIMCTL: &str = "simctl";
/// Clang `-arch` flag.
pub(crate) const ARG_ARCH: &str = "-arch";
/// 64-bit ARM architecture flag for Apple toolchains.
pub(crate) const ARG_ARM64: &str = "arm64";
/// Clang `-isysroot` flag.
pub(crate) const ARG_ISYSROOT: &str = "-isysroot";
/// Clang Objective-C ARC flag.
pub(crate) const ARG_FOBJC_ARC: &str = "-fobjc-arc";
/// Clang `-framework` linker flag.
pub(crate) const ARG_FRAMEWORK: &str = "-framework";
/// Minimum iOS Simulator deployment target flag.
pub(crate) const ARG_MIN_IOS_SIM: &str = "-mios-simulator-version-min=17.0";
/// Minimum physical iOS deployment target flag.
pub(crate) const ARG_MIN_IOS_DEVICE: &str = "-miphoneos-version-min=17.0";
/// Swiftc `-parse-as-library` flag.
pub(crate) const ARG_PARSE_AS_LIBRARY: &str = "-parse-as-library";
/// Swiftc `-target` flag.
pub(crate) const ARG_SWIFTC_TARGET: &str = "-target";
/// Swiftc `-sdk` flag.
pub(crate) const ARG_SWIFTC_SDK: &str = "-sdk";
/// Swiftc `-import-objc-header` flag.
pub(crate) const ARG_IMPORT_OBJC_HEADER: &str = "-import-objc-header";
/// Swiftc watchOS Simulator target triple.
pub(crate) const ARG_WATCHOS_SIM_TRIPLE: &str = "arm64-apple-watchos10.0-simulator";
/// Swiftc watchOS device target triple.
pub(crate) const ARG_WATCHOS_DEVICE_TRIPLE: &str = "arm64-apple-watchos10.0";
/// Codesign `--force` flag.
pub(crate) const ARG_CODESIGN_FORCE: &str = "--force";
/// Codesign `--sign` flag.
pub(crate) const ARG_CODESIGN_SIGN: &str = "--sign";
/// `simctl list` subcommand.
pub(crate) const ARG_SIMCTL_LIST: &str = "list";
/// `simctl devices` category.
pub(crate) const ARG_SIMCTL_DEVICES: &str = "devices";
/// `simctl booted` filter.
pub(crate) const ARG_SIMCTL_BOOTED: &str = "booted";
/// `simctl available` filter.
pub(crate) const ARG_SIMCTL_AVAILABLE: &str = "available";
/// `simctl boot` subcommand.
pub(crate) const ARG_SIMCTL_BOOT: &str = "boot";
/// `simctl terminate` subcommand.
pub(crate) const ARG_SIMCTL_TERMINATE: &str = "terminate";
/// `simctl install` subcommand.
pub(crate) const ARG_SIMCTL_INSTALL: &str = "install";
/// `simctl launch` subcommand.
pub(crate) const ARG_SIMCTL_LAUNCH: &str = "launch";
/// Device filter token for iPhone simulators.
pub(crate) const SIM_DEVICE_IPHONE: &str = "iPhone";
/// Device filter token for iPad simulators.
pub(crate) const SIM_DEVICE_IPAD: &str = "iPad";
/// Environment variable skipping automatic iOS Simulator launch.
pub(crate) const ENV_EUV_IOS_SKIP_LAUNCH: &str = "EUV_IOS_SKIP_LAUNCH";
/// Environment variable overriding the target iOS Simulator UDID.
pub(crate) const ENV_EUV_IOS_SIM_UDID: &str = "EUV_IOS_SIM_UDID";
/// Environment variable naming the Xcode SDK root for Cargo builds.
pub(crate) const ENV_SDKROOT: &str = "SDKROOT";
/// Environment variable forwarded as `SIMCTL_CHILD_EUV_UPDATE_URL`.
pub(crate) const ENV_EUV_UPDATE_URL: &str = "EUV_UPDATE_URL";
/// Environment variable forwarded as `SIMCTL_CHILD_EUV_PROXY_URL`.
pub(crate) const ENV_EUV_PROXY_URL: &str = "EUV_PROXY_URL";
/// Environment variable forwarded as `SIMCTL_CHILD_EUV_UPDATE_CHANNEL`.
pub(crate) const ENV_EUV_UPDATE_CHANNEL: &str = "EUV_UPDATE_CHANNEL";
/// Prefix added by `simctl launch` to forward env vars into simulator processes.
pub(crate) const ENV_SIMCTL_CHILD_PREFIX: &str = "SIMCTL_CHILD_";
/// `tar -czf` compression flag.
pub(crate) const ARG_TAR_CZF: &str = "-czf";
/// Error returned when an Apple native build is attempted on a non-macOS host.
pub(crate) const ERR_APPLE_REQUIRES_MACOS: &str =
    "Apple native bundle compilation requires a macOS host with Xcode installed";
/// Error returned when no available iOS/iPadOS simulator UDID can be resolved.
pub(crate) const ERR_APPLE_NO_SIMULATOR: &str = "no available iOS/iPadOS Simulator found via xcrun simctl (pass --no-launch or set EUV_IOS_SIM_UDID)";
/// WatchOS icon pixel dimension for AppIcon.appiconset.
pub(crate) const APPLE_WATCHOS_ICON_SIZE: u32 = 1024;
/// Standard UUID string byte length (`8-4-4-4-12`).
pub(crate) const APPLE_UUID_LEN: usize = 36;