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
//! `--target` resolution: the registry mapping a CLI target name to a
//! [`etdl_compiler::CodeGenerator`] implementation.
//!
//! Lives here, not in `etdl-compiler`, so the compiler crate itself stays
//! target-agnostic — adding a target to the CLI never touches the parsing,
//! validation, or fault-tree-resolution pipeline. Every entry below is
//! actually wired to a real generator producing a thin, language-native
//! binding to the compiled `etdl-runtime-ffi` Rust runtime — none of them
//! reimplement ETDL semantics in their own language (see
//! `docs/architecture/targets.md`). `javascript`/`typescript` are designed
//! for but intentionally not listed here yet — advertising a target string
//! here is a promise it produces real, usable output, which is only true
//! for the targets actually compiled into this binary via their Cargo
//! feature.
//!
//! `java`/`python`/`go`/`dotnet` do not need their language's toolchain
//! *installed on this machine* to be listed here — this crate only emits
//! source text for them (via `etdl-runtime-ffi`'s C ABI + a
//! language-specific binding). Building/running the *generated* Java,
//! Python, Go, or C# code is where that target's own toolchain (and a
//! built `etdl-runtime-ffi`) becomes necessary — see each target's tests
//! for how that's gated.
use ;
/// Every target compiled into this binary, in a stable display order
/// (`rust` first, then everything else alphabetically) — used for both
/// dispatch and the `--target` help/error text.
/// Names of every target compiled into this binary, `rust` first. Used in
/// `--help` and in the unknown-target error so both always reflect exactly
/// what this build can actually generate.
/// Resolve one `--target` name to its generator, or `None` if this build
/// doesn't have that target compiled in.
/// Splits a `--target` value on commas (spec: "If practical, support
/// specifying multiple targets in one invocation, e.g. `--target
/// rust,java,python`"), trimming whitespace and dropping empty segments
/// (so a trailing comma or repeated commas don't produce a confusing empty
/// target name in error messages).