Skip to main content

Crate delvewright_dsl

Crate delvewright_dsl 

Source
Expand description

Delvewright DSL: serde types, validation, canonical serialization and JSON Schema export for the staged campaign DSL (spec-0001).

Entry points:

Determinism (ADR-0006): all iteration is over BTreeMap/BTreeSet or slices; nothing depends on hash order, wall-clock, or absolute paths.

Re-exports§

pub use canonical::to_canonical_string;
pub use chrome::Chrome;
pub use chrome::ChromeString;
pub use chrome::validate_chrome_namespace;
pub use diagnostic::Diagnostic;
pub use diagnostic::Severity;
pub use diagnostic::codes;
pub use effects::EffectRootKind;
pub use effects::EffectRootOwner;
pub use effects::EffectRootSite;
pub use effects::RootBinding;
pub use effects::for_each_effect_root;
pub use effects::for_each_effect_root_mut;
pub use envelope::Campaign;
pub use envelope::Envelope;
pub use envelope::RawCampaign;
pub use envelope::SUPPORTED_DSL_VERSION;
pub use envelope::SUPPORTED_DSL_VERSIONS;
pub use envelope::Stage;
pub use envelope::check_campaign;
pub use envelope::is_supported_version;
pub use envelope::is_v03;
pub use envelope::is_v04;
pub use envelope::is_v05;
pub use envelope::is_v06;
pub use envelope::is_v07;
pub use envelope::is_v08;
pub use envelope::is_v09;
pub use envelope::parse_campaign;
pub use ids::ActorId;
pub use ids::AmbushId;
pub use ids::AnchorId;
pub use ids::AreaId;
pub use ids::BranchId;
pub use ids::BranchPointId;
pub use ids::CampaignId;
pub use ids::ClassId;
pub use ids::DialogueId;
pub use ids::EditBatchId;
pub use ids::EndingId;
pub use ids::FlagId;
pub use ids::NpcId;
pub use ids::ObjectiveId;
pub use ids::PoolId;
pub use ids::PrefabId;
pub use ids::QuestId;
pub use ids::RegionId;
pub use ids::ShortcutId;
pub use ids::TimedGateId;
pub use ids::TriggerId;
pub use ids::WaveId;
pub use l10n::ArtNarrate;
pub use l10n::CANONICAL_LANG;
pub use l10n::L10nDoc;
pub use l10n::L10nKind;
pub use l10n::MARKER_SIGIL;
pub use l10n::OptionLabel;
pub use l10n::ScreenNarrate;
pub use l10n::SoundRef;
pub use l10n::TR_SIGIL;
pub use l10n::art_narrates;
pub use l10n::bonfire_option_labels;
pub use l10n::declared_mc_codes;
pub use l10n::dialogue_option_labels;
pub use l10n::each_string;
pub use l10n::has_tr_sigil;
pub use l10n::inventory as l10n_inventory;
pub use l10n::key_speaker;
pub use l10n::local_id;
pub use l10n::localize;
pub use l10n::on_screen_narrates;
pub use l10n::plain as l10n_plain;
pub use l10n::play_sound_actor_refs;
pub use l10n::sound_refs;
pub use l10n::tag_translatables;
pub use l10n::untag as l10n_untag;
pub use l10n::validate_l10n;
pub use l10n::validate_l10n_provenance;
pub use l10n::validate_marker_channel;
pub use l10n::validate_tr_sigil;
pub use mclang::mc_lang_code;
pub use registry::AnchorRegistry;
pub use registry::BlockRegistry;
pub use registry::EffectRegistry;
pub use registry::EntityRegistry;
pub use registry::ItemBackedBlockRegistry;
pub use registry::ItemRegistry;
pub use registry::Lighting;
pub use registry::LightingProfile;
pub use registry::VendoredAnchorRegistry;
pub use registry::VendoredEffectRegistry;
pub use registry::VendoredEntityRegistry;
pub use registry::VendoredItemRegistry;
pub use registry::is_potion_id;
pub use registry::is_technical_block;
pub use schema::stage_schema;
pub use stages::for_each_campaign_effect;
pub use stages::Actor;
pub use stages::Ambush;
pub use stages::Area;
pub use stages::AreaLighting;
pub use stages::AreaMitigation;
pub use stages::BONFIRE_PROMPT_EN;
pub use stages::BONFIRE_REST_LABEL_EN;
pub use stages::BONFIRE_SAVE_LABEL_EN;
pub use stages::BonfireLabels;
pub use stages::Boundary;
pub use stages::BranchDecl;
pub use stages::BranchPoint;
pub use stages::CameraShot;
pub use stages::CameraSubject;
pub use stages::CameraTarget;
pub use stages::CameraWaypoint;
pub use stages::Carrier;
pub use stages::CastAbsence;
pub use stages::CastBarks;
pub use stages::CastDialogue;
pub use stages::CastDialogueKeyword;
pub use stages::CastEntry;
pub use stages::CastPlace;
pub use stages::CastPlacement;
pub use stages::Class;
pub use stages::ClassesContent;
pub use stages::DamageKind;
pub use stages::DespawnStyle;
pub use stages::DialogueContent;
pub use stages::DialogueEffect;
pub use stages::DialogueNode;
pub use stages::DialogueOption;
pub use stages::EffectSite;
pub use stages::EnchantedItem;
pub use stages::EncounterTier;
pub use stages::EnvTrigger;
pub use stages::EquipItem;
pub use stages::EquipSlot;
pub use stages::Facing;
pub use stages::Fixture;
pub use stages::Happening;
pub use stages::HappeningVerb;
pub use stages::Horizon;
pub use stages::ItemDrop;
pub use stages::KitItem;
pub use stages::Lethality;
pub use stages::Loot;
pub use stages::LootItem;
pub use stages::MAX_POTION_AMPLIFIER;
pub use stages::MAX_POTION_DURATION_TICKS;
pub use stages::MobAttributes;
pub use stages::MobDrop;
pub use stages::MobEffect;
pub use stages::MobEquipment;
pub use stages::NarrateStyle;
pub use stages::Npc;
pub use stages::NpcDialogue;
pub use stages::NpcSkin;
pub use stages::NpcsContent;
pub use stages::Objective;
pub use stages::Persona;
pub use stages::Pieces;
pub use stages::PlannedQuest;
pub use stages::PotionContents;
pub use stages::PotionEffect;
pub use stages::Prop;
pub use stages::Quest;
pub use stages::QuestEffect;
pub use stages::QuestPlanContent;
pub use stages::QuestsContent;
pub use stages::Relationship;
pub use stages::Role;
pub use stages::SequenceStep;
pub use stages::Shortcut;
pub use stages::ShotStyle;
pub use stages::SkinModel;
pub use stages::SlotDrop;
pub use stages::SoundAt;
pub use stages::StealthZone;
pub use stages::TimedGate;
pub use stages::Trap;
pub use stages::TrapDisarm;
pub use stages::TrapEffect;
pub use stages::TrapReset;
pub use stages::TrapTrigger;
pub use stages::Trigger;
pub use stages::TriggerOn;
pub use stages::Wave;
pub use stages::WaveLane;
pub use stages::WaveMob;
pub use stages::WaveSummon;
pub use stages::WorldContent;
pub use stages::WorldDifficulty;
pub use stages::WorldTime;
pub use stages::WorldWeather;
pub use stages::is_potion_bearing_item;
pub use stages::EditBatch;
pub use stages::EditFrame;
pub use stages::FragmentRotation;
pub use stages::MorphOp;
pub use stages::PaletteBlock;
pub use stages::PaletteRecipe;
pub use stages::RegionShape;
pub use stages::SocketState;
pub use stages::TreeKind;
pub use stages::WorldEdit;
pub use stages::WorldEditsContent;
pub use validate::validate_campaign;
pub use validate::validate_campaign_with;

Modules§

canonical
The single canonical JSON writer.
chrome
Compiler chrome: the player-visible strings the compiler writes itself, which no campaign authored and no translator was ever asked for (owner ruling, 2026-08-06; spec-0029 addendum).
diagnostic
Diagnostics: the --json shape from spec-0002 and the stable DW01xx codes.
effects
The one enumeration of the campaign’s effect roots.
envelope
The stage envelope, the assembled Campaign, and parsing from raw JSON.
ids
Type-prefixed, kebab-case identifier newtypes (spec-0001 “IDs”).
l10n
Native i18n: author-declared languages, l10n sidecar documents, the authoritative key inventory, and the localization pass (spec-0001 i18n addendum; owner-approved 2026-07-31).
mclang
The pinned client’s own language set (Minecraft Java 1.21.11, ADR-0009).
registry
Registries for data that lives outside the DSL: the vanilla item registry and prefab anchor metadata.
schema
JSON Schema export (one full envelope schema per stage) via schemars.
stages
serde types for the six stage content payloads (spec-0001 v0.2).
validate
Campaign validation: all six rule groups from spec-0001.