euv_cli/platform/struct.rs
1use super::*;
2
3/// Target platform metadata describing Rust triple, system APIs, and output bundle.
4#[derive(Clone, Debug, Deserialize, Eq, Getter, New, PartialEq, Serialize)]
5pub struct TargetSpec {
6 /// Human-readable target key (`web`, `android`, `ios`, `ipad`, `macos`, `windows`, `linux`).
7 pub(crate) name: String,
8 /// Rust compiler target triple.
9 pub(crate) rust_triple: String,
10 /// Direct OS/browser system API stack used by `euv-core`.
11 pub(crate) system_api: String,
12 /// Primary packaged output artifact path.
13 pub(crate) artifact: String,
14 /// Core `PlatformKind` discriminant.
15 pub(crate) platform_kind: String,
16 /// Preferred hardware GPU backend reported by `euv-core`.
17 pub(crate) preferred_gpu: String,
18}
19
20/// Single executable command step inside a cross-platform `BuildPlan`.
21#[derive(Clone, Debug, Deserialize, Eq, Getter, New, PartialEq, Serialize)]
22pub struct BuildStep {
23 /// Human-readable purpose of this step.
24 pub(crate) description: String,
25 /// Executable program name.
26 pub(crate) program: String,
27 /// Command-line arguments passed to `program`.
28 pub(crate) args: Vec<String>,
29}
30
31/// Complete declarative build plan for one target platform.
32#[derive(Clone, Debug, Deserialize, Eq, Getter, New, PartialEq, Serialize)]
33pub struct BuildPlan {
34 /// Target specification metadata.
35 pub(crate) target: TargetSpec,
36 /// Selected default render mode (`Auto`, `Software`, `Hardware`, `Hybrid`).
37 pub(crate) render_mode: String,
38 /// Whether release optimization profile is enabled.
39 #[get(type(copy))]
40 pub(crate) release: bool,
41 /// Ordered build and packaging steps.
42 pub(crate) steps: Vec<BuildStep>,
43}