euv-cli 0.50.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
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
/// Default Android SDK API level used for compilation and manifest targetSdkVersion.
pub(crate) const ANDROID_DEFAULT_API_LEVEL: &str = "35";
/// Default Android SDK build-tools version directory.
pub(crate) const ANDROID_DEFAULT_BUILD_TOOLS: &str = "35.0.0";
/// Minimum Android API level for DEX compilation and AndroidManifest minSdkVersion.
pub(crate) const ANDROID_MIN_SDK_LEVEL: &str = "30";
/// Default Android application package identifier.
pub(crate) const ANDROID_DEFAULT_PACKAGE_ID: &str = "vip.ltpp.euv.showcase";
/// Default Android launcher activity component suffix.
pub(crate) const ANDROID_ACTIVITY_COMPONENT: &str = ".EuvActivity";
/// Default Android phone application display label.
pub(crate) const ANDROID_PHONE_APP_LABEL: &str = "Euv Studio";
/// Default Wear OS smartwatch application display label.
pub(crate) const ANDROID_WEAROS_APP_LABEL: &str = "Euv Watch";
/// Default Android phone APK output filename.
pub(crate) const ANDROID_PHONE_APK_NAME: &str = "EuvShowcase.apk";
/// Default Wear OS APK output filename.
pub(crate) const ANDROID_WEAROS_APK_NAME: &str = "EuvShowcaseWearOS.apk";
/// Default Android phone AVD name.
pub(crate) const ANDROID_DEFAULT_PHONE_AVD: &str = "euv_android_phone";
/// Default Wear OS AVD name.
pub(crate) const ANDROID_DEFAULT_WEAROS_AVD: &str = "euv_wearos_watch";
/// Default fallback semantic version when workspace manifest parsing fails.
pub(crate) const MOBILE_FALLBACK_VERSION: &str = "0.1.0";
/// Target kind label for Android smartphones and tablets.
pub(crate) const ANDROID_KIND_PHONE: &str = "phone";
/// Target kind label for Android Wear OS smartwatches.
pub(crate) const ANDROID_KIND_WEAROS: &str = "wearos";
/// Subdirectory under `dist/` for Android phone artifacts.
pub(crate) const ANDROID_OUT_SUBDIR_PHONE: &str = "android";
/// Subdirectory under `dist/` for Wear OS artifacts.
pub(crate) const ANDROID_OUT_SUBDIR_WEAROS: &str = "wearos";
/// Host build directory name under `target/mobile-hosts/` for Android phones.
pub(crate) const ANDROID_HOST_DIR_PHONE: &str = "android-host";
/// Host build directory name under `target/mobile-hosts/` for Wear OS watches.
pub(crate) const ANDROID_HOST_DIR_WEAROS: &str = "wearos-host";
/// Rust `PlatformKind` constant expression for Android phones.
pub(crate) const ANDROID_PLATFORM_EXPR_PHONE: &str = "PlatformKind::Android";
/// Rust `PlatformKind` constant expression for Wear OS watches.
pub(crate) const ANDROID_PLATFORM_EXPR_WEAROS: &str = "PlatformKind::Wearable";
/// Rust `RenderMode` expression for automatic renderer selection.
pub(crate) const HOST_RENDER_EXPR_AUTO: &str = "RenderMode::Auto";
/// Rust `RenderMode` expression for hardware GPU rendering.
pub(crate) const HOST_RENDER_EXPR_HARDWARE: &str = "RenderMode::Hardware";
/// Rust `RenderMode` expression for hybrid rendering.
pub(crate) const HOST_RENDER_EXPR_HYBRID: &str = "RenderMode::Hybrid";
/// Rust `RenderMode` expression for software CPU rendering.
pub(crate) const HOST_RENDER_EXPR_SOFTWARE: &str = "RenderMode::Software";
/// Android ABI directory name for 64-bit ARM.
pub(crate) const ANDROID_ABI_ARM64: &str = "arm64-v8a";
/// Android ABI directory name for 32-bit ARM.
pub(crate) const ANDROID_ABI_ARMV7: &str = "armeabi-v7a";
/// Android ABI directory name for 64-bit x86.
pub(crate) const ANDROID_ABI_X86_64: &str = "x86_64";
/// Rust target triple for 64-bit ARM Android.
pub(crate) const ANDROID_TRIPLE_ARM64: &str = "aarch64-linux-android";
/// Rust target triple for 32-bit ARM Android.
pub(crate) const ANDROID_TRIPLE_ARMV7: &str = "armv7-linux-androideabi";
/// Rust target triple for 64-bit x86 Android.
pub(crate) const ANDROID_TRIPLE_X86_64: &str = "x86_64-linux-android";
/// NDK clang executable prefix for 64-bit ARM Android.
pub(crate) const ANDROID_CLANG_PREFIX_ARM64: &str = "aarch64-linux-android";
/// NDK clang executable prefix for 32-bit ARM Android.
pub(crate) const ANDROID_CLANG_PREFIX_ARMV7: &str = "armv7a-linux-androideabi";
/// NDK clang executable prefix for 64-bit x86 Android.
pub(crate) const ANDROID_CLANG_PREFIX_X86_64: &str = "x86_64-linux-android";
/// Cargo environment variable triple suffix for 64-bit ARM Android.
pub(crate) const ANDROID_ENV_TRIPLE_ARM64: &str = "aarch64_linux_android";
/// Cargo environment variable triple suffix for 32-bit ARM Android.
pub(crate) const ANDROID_ENV_TRIPLE_ARMV7: &str = "armv7_linux_androideabi";
/// Cargo environment variable triple suffix for 64-bit x86 Android.
pub(crate) const ANDROID_ENV_TRIPLE_X86_64: &str = "x86_64_linux_android";
/// Cargo linker environment variable name for 64-bit ARM Android.
pub(crate) const ANDROID_LINKER_ENV_ARM64: &str = "CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER";
/// Cargo linker environment variable name for 32-bit ARM Android.
pub(crate) const ANDROID_LINKER_ENV_ARMV7: &str = "CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER";
/// Cargo linker environment variable name for 64-bit x86 Android.
pub(crate) const ANDROID_LINKER_ENV_X86_64: &str = "CARGO_TARGET_X86_64_LINUX_ANDROID_LINKER";
/// NDK prebuilt LLVM host tag on macOS (Apple Silicon and Intel both ship under `darwin-x86_64`).
pub(crate) const ANDROID_NDK_HOST_TAG_MACOS: &str = "darwin-x86_64";
/// NDK prebuilt LLVM host tag on Linux x86_64.
pub(crate) const ANDROID_NDK_HOST_TAG_LINUX: &str = "linux-x86_64";
/// NDK prebuilt LLVM host tag on Windows x86_64.
pub(crate) const ANDROID_NDK_HOST_TAG_WINDOWS: &str = "windows-x86_64";
/// Environment variable naming the Android NDK root directory.
pub(crate) const ENV_ANDROID_NDK_HOME: &str = "ANDROID_NDK_HOME";
/// GitHub Actions environment variable naming the latest preinstalled Android NDK directory.
pub(crate) const ENV_ANDROID_NDK_LATEST_HOME: &str = "ANDROID_NDK_LATEST_HOME";
/// Environment variable specifying preferred Android NDK version.
pub(crate) const ENV_EUV_ANDROID_NDK_VERSION: &str = "EUV_ANDROID_NDK_VERSION";
/// Environment variable specifying Android API level override.
pub(crate) const ENV_ANDROID_API_LEVEL: &str = "ANDROID_API_LEVEL";
/// Environment variable specifying Android build-tools override.
pub(crate) const ENV_ANDROID_BUILD_TOOLS: &str = "ANDROID_BUILD_TOOLS";
/// Environment variable specifying Android phone AVD name.
pub(crate) const ENV_ANDROID_AVD_NAME: &str = "ANDROID_AVD_NAME";
/// Environment variable specifying Wear OS AVD name.
pub(crate) const ENV_ANDROID_WEAR_AVD_NAME: &str = "ANDROID_WEAR_AVD_NAME";
/// Environment variable specifying custom Android signing keystore path.
pub(crate) const ENV_EUV_ANDROID_KEYSTORE: &str = "EUV_ANDROID_KEYSTORE";
/// Environment variable specifying custom Android keystore password.
pub(crate) const ENV_EUV_ANDROID_KEYSTORE_PASS: &str = "EUV_ANDROID_KEYSTORE_PASS";
/// Environment variable specifying custom Android key password.
pub(crate) const ENV_EUV_ANDROID_KEY_PASS: &str = "EUV_ANDROID_KEY_PASS";
/// Environment variable specifying custom Android signing key alias.
pub(crate) const ENV_EUV_ANDROID_KEY_ALIAS: &str = "EUV_ANDROID_KEY_ALIAS";
/// Environment variable pointing to the user home directory on Unix.
pub(crate) const MOBILE_ENV_HOME: &str = "HOME";
/// Environment variable pointing to the user home directory on Windows.
pub(crate) const MOBILE_ENV_USERPROFILE: &str = "USERPROFILE";
/// Default Android debug keystore password.
pub(crate) const ANDROID_DEFAULT_KEYSTORE_PASS: &str = "android";
/// Default Android debug signing key alias.
pub(crate) const ANDROID_DEFAULT_KEY_ALIAS: &str = "androiddebugkey";
/// Default Android debug keystore distinguished name.
pub(crate) const ANDROID_DEBUG_DNAME: &str = "CN=Android Debug,O=Android,C=US";
/// Default Android SDK location on GitHub Actions Ubuntu runners.
pub(crate) const ANDROID_CI_LINUX_SDK_FALLBACK: &str = "/usr/local/lib/android/sdk";
/// Relative Android SDK directory under `$HOME` on macOS.
pub(crate) const ANDROID_MACOS_HOME_SDK_REL: &str = "Library/Android/sdk";
/// Relative Android SDK directory under `$HOME` on Linux.
pub(crate) const ANDROID_LINUX_HOME_SDK_REL: &str = "Android/Sdk";
/// Relative Android SDK directory under `%USERPROFILE%` on Windows.
pub(crate) const ANDROID_WINDOWS_HOME_SDK_REL: &str = "AppData/Local/Android/Sdk";
/// Relative directory for Android host staging under `target/`.
pub(crate) const MOBILE_HOSTS_SUBDIR: &str = "target/mobile-hosts";
/// Relative directory for built distribution outputs.
pub(crate) const MOBILE_DIST_DIR_NAME: &str = "dist";
/// Compiled Rust Android native host shared library filename.
pub(crate) const ANDROID_HOST_SO_NAME: &str = "libeuv_android_host.so";
/// Compiled Android DEX filename packed at the APK root.
pub(crate) const ANDROID_CLASSES_DEX_NAME: &str = "classes.dex";
/// Java source package relative directory path.
pub(crate) const ANDROID_JAVA_PKG_REL: &str = "java/vip/ltpp/euv/showcase";
/// Java JNI native bridge source filename.
pub(crate) const ANDROID_JAVA_BRIDGE_FILE: &str = "EuvNativeBridge.java";
/// Java Activity host source filename.
pub(crate) const ANDROID_JAVA_ACTIVITY_FILE: &str = "EuvActivity.java";
/// Android manifest filename.
pub(crate) const ANDROID_MANIFEST_FILE: &str = "AndroidManifest.xml";
/// Android launcher icon resource filename.
pub(crate) const ANDROID_LAUNCHER_ICON_FILE: &str = "ic_launcher.png";
/// Android mipmap density directories paired with exact square pixel sizes.
pub(crate) const ANDROID_MIPMAP_DENSITIES: &[(&str, u32)] = &[
    ("mipmap-mdpi", 48),
    ("mipmap-hdpi", 72),
    ("mipmap-xhdpi", 96),
    ("mipmap-xxhdpi", 144),
    ("mipmap-xxxhdpi", 192),
];
/// Dev-only AI Schema v1 marker bytes prohibited in release binaries.
pub(crate) const MOBILE_AI_SCHEMA_V1_MARKER: &[u8] = b"euv.ai.schema.v1";
/// Dev-only AI Schema v2 marker bytes prohibited in release binaries.
pub(crate) const MOBILE_AI_SCHEMA_V2_MARKER: &[u8] = b"euv.ai.schema.v2";
/// Minimal valid 1x1 transparent RGBA PNG used as fallback when no icon callback is supplied.
pub(crate) const MOBILE_FALLBACK_ICON_PNG_BYTES: &[u8] = &[
    0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52,
    0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1F, 0x15, 0xC4,
    0x89, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x44, 0x41, 0x54, 0x78, 0x9C, 0x63, 0x60, 0x60, 0x60, 0x60,
    0x00, 0x00, 0x00, 0x05, 0x00, 0x01, 0xA5, 0xF6, 0x45, 0x40, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45,
    0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82,
];
/// Embedded Android Rust JNI host crate source template.
pub(crate) const ANDROID_HOST_LIB_RS_TEMPLATE: &str = include_str!("host_lib.rs.tmpl");
/// Embedded Android Java JNI bridge source template.
pub(crate) const ANDROID_JAVA_BRIDGE_TEMPLATE: &str = include_str!("euv_native_bridge.java.tmpl");
/// Embedded Android Java Activity host source template.
pub(crate) const ANDROID_JAVA_ACTIVITY_TEMPLATE: &str = include_str!("euv_activity.java.tmpl");
/// Android light launch theme resource XML.
pub(crate) const ANDROID_STYLES_LIGHT_XML: &str = r#"<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="euv_launch_bg">#FAFAFA</color>
    <style name="EuvLaunchTheme" parent="@android:style/Theme.DeviceDefault.Light.NoActionBar">
        <item name="android:windowBackground">@color/euv_launch_bg</item>
        <item name="android:statusBarColor">@android:color/transparent</item>
        <item name="android:navigationBarColor">@android:color/transparent</item>
        <item name="android:enforceStatusBarContrast">false</item>
        <item name="android:enforceNavigationBarContrast">false</item>
    </style>
</resources>
"#;
/// Android dark launch theme resource XML.
pub(crate) const ANDROID_STYLES_NIGHT_XML: &str = r#"<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="euv_launch_bg">#09090B</color>
    <style name="EuvLaunchTheme" parent="@android:style/Theme.DeviceDefault.NoActionBar">
        <item name="android:windowBackground">@color/euv_launch_bg</item>
        <item name="android:statusBarColor">@android:color/transparent</item>
        <item name="android:navigationBarColor">@android:color/transparent</item>
        <item name="android:enforceStatusBarContrast">false</item>
        <item name="android:enforceNavigationBarContrast">false</item>
    </style>
</resources>
"#;
/// Android API 31+ light splash launch theme resource XML.
pub(crate) const ANDROID_STYLES_V31_XML: &str = r#"<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="EuvLaunchTheme" parent="@android:style/Theme.DeviceDefault.Light.NoActionBar">
        <item name="android:windowBackground">@color/euv_launch_bg</item>
        <item name="android:windowSplashScreenBackground">@color/euv_launch_bg</item>
        <item name="android:statusBarColor">@android:color/transparent</item>
        <item name="android:navigationBarColor">@android:color/transparent</item>
        <item name="android:enforceStatusBarContrast">false</item>
        <item name="android:enforceNavigationBarContrast">false</item>
    </style>
</resources>
"#;
/// Android API 31+ dark splash launch theme resource XML.
pub(crate) const ANDROID_STYLES_NIGHT_V31_XML: &str = r#"<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="EuvLaunchTheme" parent="@android:style/Theme.DeviceDefault.NoActionBar">
        <item name="android:windowBackground">@color/euv_launch_bg</item>
        <item name="android:windowSplashScreenBackground">@color/euv_launch_bg</item>
        <item name="android:statusBarColor">@android:color/transparent</item>
        <item name="android:navigationBarColor">@android:color/transparent</item>
        <item name="android:enforceStatusBarContrast">false</item>
        <item name="android:enforceNavigationBarContrast">false</item>
    </style>
</resources>
"#;
/// Wear OS hardware feature XML stanza inserted into `AndroidManifest.xml`.
pub(crate) const ANDROID_WEAROS_FEATURE_XML: &str =
    "    <uses-feature android:name=\"android.hardware.type.watch\" />\n";
/// Wear OS standalone metadata XML stanza inserted into `AndroidManifest.xml`.
pub(crate) const ANDROID_WEAROS_META_XML: &str = "        <meta-data android:name=\"com.google.android.wearable.standalone\" android:value=\"true\" />\n";
/// ZIP local file header signature (`PK\x03\x04`).
pub(crate) const ZIP_LOCAL_FILE_SIG: u32 = 0x0403_4B50;
/// ZIP central directory header signature (`PK\x01\x02`).
pub(crate) const ZIP_CENTRAL_DIR_SIG: u32 = 0x0201_4B50;
/// Minimum ZIP end of central directory record length in bytes.
pub(crate) const ZIP_EOCD_MIN_LEN: usize = 22;
/// Maximum ZIP comment length searched when locating EOCD.
pub(crate) const ZIP_MAX_COMMENT_LEN: usize = 65_535;
/// Standard IEEE 802.3 CRC-32 reflected polynomial.
pub(crate) const CRC32_POLY_REFLECTED: u32 = 0xEDB8_8320;
/// Command names and reusable flags for Android toolchain invocations.
pub(crate) const MOBILE_CMD_CARGO: &str = "cargo";
/// Java compiler binary name.
pub(crate) const CMD_JAVAC: &str = "javac";
/// JDK keytool binary name.
pub(crate) const CMD_KEYTOOL: &str = "keytool";
/// Android `aapt2` tool stem.
pub(crate) const TOOL_AAPT2: &str = "aapt2";
/// Android `d8` tool stem.
pub(crate) const TOOL_D8: &str = "d8";
/// Android `zipalign` tool stem.
pub(crate) const TOOL_ZIPALIGN: &str = "zipalign";
/// Android `apksigner` tool stem.
pub(crate) const TOOL_APKSIGNER: &str = "apksigner";
/// Android `adb` tool stem.
pub(crate) const TOOL_ADB: &str = "adb";
/// Android `emulator` tool stem.
pub(crate) const TOOL_EMULATOR: &str = "emulator";
/// LLVM archiver binary stem inside Android NDK.
pub(crate) const TOOL_LLVM_AR: &str = "llvm-ar";
/// Subdirectory names inside generated Android host projects and SDKs.
pub(crate) const MOBILE_DIR_RUST: &str = "rust";
/// Rust source subdirectory name.
pub(crate) const MOBILE_DIR_SRC: &str = "src";
/// Java compiled classes directory name.
pub(crate) const DIR_CLASSES: &str = "classes";
/// Compiled DEX directory name.
pub(crate) const DIR_DEX: &str = "dex";
/// Android resources directory name.
pub(crate) const DIR_RES: &str = "res";
/// Android compiled resources zip filename.
pub(crate) const FILE_RES_ZIP: &str = "res.zip";
/// Unaligned intermediate APK filename.
pub(crate) const FILE_UNALIGNED_APK: &str = "unaligned.apk";
/// Aligned intermediate APK filename.
pub(crate) const FILE_ALIGNED_APK: &str = "aligned.apk";
/// Workspace Cargo manifest filename.
pub(crate) const MOBILE_FILE_CARGO_TOML: &str = "Cargo.toml";
/// Rust library entry filename.
pub(crate) const MOBILE_FILE_LIB_RS: &str = "lib.rs";
/// Generated host configuration Rust file.
pub(crate) const MOBILE_FILE_HOST_CONFIG_RS: &str = "host_config.rs";
/// Android values resource subdirectory.
pub(crate) const DIR_VALUES: &str = "values";
/// Android night values resource subdirectory.
pub(crate) const DIR_VALUES_NIGHT: &str = "values-night";
/// Android API 31 values resource subdirectory.
pub(crate) const DIR_VALUES_V31: &str = "values-v31";
/// Android API 31 night values resource subdirectory.
pub(crate) const DIR_VALUES_NIGHT_V31: &str = "values-night-v31";
/// Android styles XML filename.
pub(crate) const FILE_STYLES_XML: &str = "styles.xml";
/// Workspace package section header searched in root `Cargo.toml`.
pub(crate) const TOML_SECTION_WORKSPACE_PKG: &str = "[workspace.package]";
/// Package section header searched in `Cargo.toml`.
pub(crate) const TOML_SECTION_PKG: &str = "[package]";
/// Version key prefix searched in `Cargo.toml`.
pub(crate) const TOML_VERSION_KEY: &str = "version";
/// Host operating system label for macOS.
pub(crate) const MOBILE_HOST_OS_MACOS: &str = "macos";
/// Host operating system label for Windows.
pub(crate) const MOBILE_HOST_OS_WINDOWS: &str = "windows";
/// Relative path under Android NDK root to prebuilt LLVM toolchains.
pub(crate) const ANDROID_NDK_PREBUILT_REL: &str = "toolchains/llvm/prebuilt";
/// Relative directory inside Android SDK holding platform jars.
pub(crate) const ANDROID_PLATFORMS_DIR: &str = "platforms";
/// Relative directory inside Android SDK holding build-tools versions.
pub(crate) const ANDROID_BUILD_TOOLS_DIR: &str = "build-tools";
/// Relative directory inside Android SDK holding platform-tools (`adb`).
pub(crate) const ANDROID_PLATFORM_TOOLS_DIR: &str = "platform-tools";
/// Relative directory inside Android SDK holding emulator binary.
pub(crate) const ANDROID_EMULATOR_DIR: &str = "emulator";
/// Relative directory inside Android SDK holding NDK versions.
pub(crate) const ANDROID_NDK_DIR: &str = "ndk";
/// Subdirectory holding executables inside prebuilt toolchains.
pub(crate) const MOBILE_DIR_BIN: &str = "bin";
/// Android platform jar filename.
pub(crate) const FILE_ANDROID_JAR: &str = "android.jar";
/// Relative debug keystore path under user home.
pub(crate) const ANDROID_DEBUG_KEYSTORE_REL: &str = ".android/debug.keystore";
/// Example crate subdirectory name.
pub(crate) const MOBILE_DIR_EXAMPLE: &str = "example";
/// Cargo release profile subdirectory name.
pub(crate) const MOBILE_DIR_RELEASE: &str = "release";
/// Cargo debug profile subdirectory name.
pub(crate) const MOBILE_DIR_DEBUG: &str = "debug";
/// Target directory name inside generated host crate.
pub(crate) const MOBILE_DIR_TARGET: &str = "target";
/// Cargo `build` subcommand argument.
pub(crate) const MOBILE_ARG_BUILD: &str = "build";
/// Cargo `--release` flag.
pub(crate) const MOBILE_ARG_RELEASE: &str = "--release";
/// Cargo `--target` flag.
pub(crate) const MOBILE_ARG_TARGET: &str = "--target";
/// Java `--source` / `-source` flag.
pub(crate) const ARG_SOURCE: &str = "-source";
/// Java `-target` flag.
pub(crate) const ARG_JAVA_TARGET: &str = "-target";
/// Java target bytecode level.
pub(crate) const JAVA_BYTECODE_LEVEL: &str = "11";
/// Java `-classpath` flag.
pub(crate) const ARG_CLASSPATH: &str = "-classpath";
/// `d8` `--min-api` flag.
pub(crate) const ARG_MIN_API: &str = "--min-api";
/// `d8` `--lib` flag.
pub(crate) const MOBILE_ARG_LIB: &str = "--lib";
/// `d8` `--output` flag.
pub(crate) const ARG_OUTPUT: &str = "--output";
/// `aapt2` `compile` subcommand.
pub(crate) const ARG_COMPILE: &str = "compile";
/// `aapt2` `--dir` flag.
pub(crate) const ARG_DIR: &str = "--dir";
/// `aapt2` `link` subcommand.
pub(crate) const ARG_LINK: &str = "link";
/// `aapt2` `--manifest` flag.
pub(crate) const ARG_MANIFEST: &str = "--manifest";
/// `aapt2` `--auto-add-overlay` flag.
pub(crate) const ARG_AUTO_ADD_OVERLAY: &str = "--auto-add-overlay";
/// `zipalign` 16 KiB page alignment value.
pub(crate) const ARG_ALIGN_PAGE_16: &str = "16";
/// `zipalign` 4-byte alignment value.
pub(crate) const ARG_ALIGN_BYTES_4: &str = "4";
/// `apksigner` `sign` subcommand.
pub(crate) const ARG_SIGN: &str = "sign";
/// `apksigner` `verify` subcommand.
pub(crate) const ARG_VERIFY: &str = "verify";
/// `apksigner` `--ks` flag.
pub(crate) const ARG_KS: &str = "--ks";
/// `apksigner` `--ks-pass` flag.
pub(crate) const ARG_KS_PASS: &str = "--ks-pass";
/// `apksigner` `--key-pass` flag.
pub(crate) const ARG_KEY_PASS: &str = "--key-pass";
/// `apksigner` `--ks-key-alias` flag.
pub(crate) const ARG_KS_KEY_ALIAS: &str = "--ks-key-alias";
/// `apksigner` `--out` flag.
pub(crate) const ARG_OUT: &str = "--out";
/// `keytool` `-genkeypair` flag.
pub(crate) const ARG_GENKEYPAIR: &str = "-genkeypair";
/// `keytool` `-keystore` flag.
pub(crate) const ARG_KEYSTORE: &str = "-keystore";
/// `keytool` `-storepass` flag.
pub(crate) const ARG_STOREPASS: &str = "-storepass";
/// `keytool` `-alias` flag.
pub(crate) const ARG_ALIAS: &str = "-alias";
/// `keytool` `-keypass` flag.
pub(crate) const ARG_KEYTOOL_KEYPASS: &str = "-keypass";
/// `keytool` `-keyalg` flag.
pub(crate) const ARG_KEYALG: &str = "-keyalg";
/// `keytool` RSA algorithm name.
pub(crate) const ARG_KEYALG_RSA: &str = "RSA";
/// `keytool` `-keysize` flag.
pub(crate) const ARG_KEYSIZE: &str = "-keysize";
/// `keytool` 2048-bit key size.
pub(crate) const ARG_KEYSIZE_2048: &str = "2048";
/// `keytool` `-validity` flag.
pub(crate) const ARG_VALIDITY: &str = "-validity";
/// `keytool` validity duration in days.
pub(crate) const ARG_VALIDITY_10000: &str = "10000";
/// `keytool` `-dname` flag.
pub(crate) const ARG_DNAME: &str = "-dname";
/// `adb` `start-server` subcommand.
pub(crate) const ARG_ADB_START_SERVER: &str = "start-server";
/// `adb` `devices` subcommand.
pub(crate) const ARG_ADB_DEVICES: &str = "devices";
/// `adb` `wait-for-device` subcommand.
pub(crate) const ARG_ADB_WAIT_FOR_DEVICE: &str = "wait-for-device";
/// `adb` `shell` subcommand.
pub(crate) const ARG_ADB_SHELL: &str = "shell";
/// `adb` `getprop` command.
pub(crate) const ARG_ADB_GETPROP: &str = "getprop";
/// Android boot completion system property.
pub(crate) const ANDROID_PROP_BOOT_COMPLETED: &str = "sys.boot_completed";
/// `adb` `install` subcommand.
pub(crate) const ARG_ADB_INSTALL: &str = "install";
/// `adb` `start` subcommand for activity manager.
pub(crate) const ARG_ADB_START: &str = "start";
/// `adb` `device` status token.
pub(crate) const ANDROID_ADB_STATUS_DEVICE: &str = "device";
/// `emulator` `-avd` flag.
pub(crate) const ARG_EMULATOR_AVD: &str = "-avd";
/// `emulator` `-no-boot-anim` flag.
pub(crate) const ARG_EMULATOR_NO_BOOT_ANIM: &str = "-no-boot-anim";
/// `emulator` `-gpu` flag.
pub(crate) const ARG_EMULATOR_GPU: &str = "-gpu";
/// `emulator` `auto` GPU mode.
pub(crate) const ARG_EMULATOR_GPU_AUTO: &str = "auto";
/// Windows `.exe` executable extension.
pub(crate) const MOBILE_WIN_EXE_EXT: &str = ".exe";
/// Windows `.cmd` batch extension.
pub(crate) const MOBILE_WIN_CMD_EXT: &str = ".cmd";
/// Windows `.bat` batch extension.
pub(crate) const MOBILE_WIN_BAT_EXT: &str = ".bat";
/// Java compiled class file extension.
pub(crate) const EXT_CLASS: &str = "class";
/// Android clang executable suffix.
pub(crate) const CLANG_SUFFIX: &str = "-clang";
/// Maximum boot wait iterations (90 * 2s = 180s) for Android emulator startup.
pub(crate) const ANDROID_AVD_BOOT_POLL_ATTEMPTS: usize = 90;
/// Boot wait sleep duration in seconds between `sys.boot_completed` checks.
pub(crate) const ANDROID_AVD_BOOT_POLL_SECS: u64 = 2;
/// Settle delay in seconds after Android emulator reports boot complete.
pub(crate) const ANDROID_AVD_BOOT_SETTLE_SECS: u64 = 3;
/// Short ABI alias for 64-bit ARM.
pub(crate) const ANDROID_ABI_ALIAS_ARM64: &str = "arm64";
/// Short ABI alias for 64-bit ARM (`aarch64`).
pub(crate) const ANDROID_ABI_ALIAS_AARCH64: &str = "aarch64";
/// Short ABI alias for 32-bit ARM (`armv7`).
pub(crate) const ANDROID_ABI_ALIAS_ARMV7: &str = "armv7";
/// Short ABI alias for 64-bit x86 (`amd64`).
pub(crate) const ANDROID_ABI_ALIAS_AMD64: &str = "amd64";
/// Error when an APK exceeds the 32-bit ZIP offset limit.
pub(crate) const ERR_ZIP_4GIB_LIMIT: &str = "APK exceeds 4 GiB ZIP limit";
/// Error when a single ZIP entry exceeds 4 GiB.
pub(crate) const ERR_ZIP_ENTRY_4GIB: &str = "ZIP entry exceeds 4 GiB";
/// Error when a ZIP entry name exceeds `u16::MAX` bytes.
pub(crate) const ERR_ZIP_NAME_TOO_LONG: &str = "ZIP entry name too long";
/// Error when the ZIP central directory offset overflows `u32`.
pub(crate) const ERR_ZIP_CD_OVERFLOW: &str = "APK central directory overflow";
/// Error when the ZIP central directory size overflows `u32`.
pub(crate) const ERR_ZIP_CD_TOO_LARGE: &str = "APK central directory too large";
/// Error when the ZIP entry count overflows `u16`.
pub(crate) const ERR_ZIP_ENTRY_COUNT_OVERFLOW: &str = "APK entry count overflow";
/// Error when a ZIP file is shorter than the 22-byte minimum EOCD record.
pub(crate) const ERR_ZIP_SHORT_EOCD: &str = "ZIP archive is shorter than minimum EOCD header";
/// Error when the ZIP end-of-central-directory signature cannot be found.
pub(crate) const ERR_ZIP_NO_EOCD: &str = "ZIP end-of-central-directory signature not found";
/// Error when Android SDK root cannot be located on the host.
pub(crate) const ERR_ANDROID_SDK_MISSING: &str =
    "Android SDK root not found (set ANDROID_HOME or ANDROID_SDK_ROOT)";
/// Error when the user HOME directory cannot be resolved for the Android debug keystore.
pub(crate) const ERR_ANDROID_HOME_MISSING: &str =
    "unable to resolve HOME directory for Android debug keystore";