Skip to main content

delvewright_dsl/
lib.rs

1//! Delvewright DSL: serde types, validation, canonical serialization and JSON
2//! Schema export for the staged campaign DSL (spec-0001).
3//!
4//! Entry points:
5//! - [`parse_campaign`] / [`check_campaign`]: parse the six raw stage documents.
6//! - [`validate_campaign`]: run all spec-0001 v0.2 rule groups on a parsed
7//!   [`Campaign`], returning [`Diagnostic`]s (spec-0002 `--json` shape).
8//! - [`to_canonical_string`]: the single canonical writer — pretty JSON put
9//!   through [`fmt`], so what the compiler WRITES is what `delvec fmt --check`
10//!   accepts. One canonical form, one implementation.
11//! - [`fmt`]: that canonical form as a grammar-level formatter over any
12//!   authored JSON (stage documents, l10n sidecars, prefab metadata).
13//! - [`stage_schema`]: export a stage's JSON Schema.
14//!
15//! Each stage type lives in the module of the object it declares (ADR-0031), and
16//! the root re-exports every module's public items through one glob per module.
17//! Every stage struct is `deny_unknown_fields`; reserved enum values a campaign's
18//! `dsl_version` is too low for parse and are refused by [`validate`].
19//!
20//! Determinism (ADR-0006): all iteration is over `BTreeMap`/`BTreeSet` or slices;
21//! nothing depends on hash order, wall-clock, or absolute paths.
22
23pub mod actor;
24pub mod ambush;
25pub mod assembly;
26pub mod blocks;
27pub mod blockshape;
28pub mod body;
29pub mod canonical;
30pub mod cast;
31pub mod celestial;
32pub mod chrome;
33pub mod class;
34pub mod color;
35pub mod cutscene;
36pub mod design;
37pub mod detailplan;
38pub mod diagnostic;
39pub mod dialogue;
40pub mod economy;
41pub mod effects;
42pub mod envelope;
43pub mod equipment;
44pub mod fight;
45pub mod firework;
46/// **What a cell does when there is fluid beside it** — block knowledge, so it
47/// lives beside [`blocks`] and [`blockshape`] rather than beside any one reader
48/// of it. `delvewright_schem::fluid` re-exports it, and the prefab generators
49/// reach it through their dependency on this crate: they may not depend on
50/// `delvec`, and this is the crate every reader of a block fact can reach.
51pub mod fluid;
52pub mod fmt;
53pub mod gate;
54pub mod healthbar;
55pub mod ids;
56pub mod l10n;
57pub mod layout;
58pub mod lethal;
59pub mod license;
60pub mod lightning;
61pub mod r#loop;
62pub mod loot;
63pub mod mark;
64pub mod mclang;
65pub mod metrics;
66pub mod npc;
67pub mod onkill;
68pub mod perception;
69pub mod placement;
70pub mod prefab;
71pub mod quest;
72pub mod quest_plan;
73pub mod registry;
74pub mod rig;
75pub mod schema;
76mod serde_fields;
77pub mod shortcut;
78pub mod siteplan;
79pub mod split;
80pub mod state;
81pub mod stealth;
82pub mod textstyle;
83pub mod timed_gate;
84pub mod trap;
85pub mod trigger;
86pub mod validate;
87pub mod viewdistance;
88pub mod wave;
89pub mod world;
90pub mod world_edits;
91
92pub use actor::*;
93pub use ambush::*;
94pub use assembly::*;
95pub use body::*;
96pub use canonical::*;
97pub use cast::*;
98pub use celestial::*;
99pub use chrome::*;
100pub use class::*;
101pub use cutscene::*;
102pub use design::*;
103pub use detailplan::*;
104pub use diagnostic::*;
105pub use dialogue::*;
106pub use economy::*;
107pub use effects::*;
108pub use envelope::*;
109pub use equipment::*;
110pub use fight::*;
111pub use firework::*;
112pub use gate::*;
113pub use healthbar::*;
114pub use ids::*;
115pub use l10n::*;
116pub use layout::*;
117pub use lethal::*;
118pub use r#loop::*;
119pub use loot::*;
120pub use mark::*;
121pub use mclang::*;
122pub use npc::*;
123pub use onkill::*;
124pub use placement::*;
125pub use prefab::*;
126pub use quest::*;
127pub use quest_plan::*;
128pub use registry::*;
129pub use schema::*;
130pub use shortcut::*;
131pub use siteplan::*;
132pub use state::*;
133pub use stealth::*;
134pub use timed_gate::*;
135pub use trap::*;
136pub use trigger::*;
137pub use validate::*;
138pub use wave::*;
139pub use world::*;
140pub use world_edits::*;