Expand description
Deterministic localized Workshop emitter.
Serializes validated Workshop IR into localized Workshop text with a
selectable output locale. Canonical catalog identities resolve to
locale-specific spellings; missing target-locale mappings fail explicitly
with a WorkshopError::MissingMapping diagnostic — never a guess, never
a silent passthrough of another locale’s spelling. Fallback to another
declared locale is opt-in (EmitOptions) and every fell-back identity
is recorded in EmitOutput::fallback_ids. The formatting is fixed and
presentation-canonical, so the same WIR/config emits byte-stable text that
reparses to equivalent WIR — except for the settings section:
settings-bearing emissions are deliberately rejected by the Workshop
parser (a .ws decompiler is a non-goal). Settings names are resolved from
the generated locale corpus, with an explicit en-US fallback when needed.
Structs§
- Action
Layout - The number of native Workshop actions emitted by a canonical WIR action sequence.
- Emit
Options - Emission options: opt-in fallback for missing target-locale mappings.
- Emit
Output - The result of a localized emission.
Enums§
- Action
Layout Error - Errors returned while querying canonical native action layout.
Functions§
- action_
width - Query the native Workshop action width of a validated WIR action sequence.
- emit
- Emit a Workshop IR program as localized Workshop text, failing explicitly on any missing target-locale mapping (no fallback).
- emit_
with_ options - Emit a Workshop IR program as localized Workshop text with emission options (opt-in fallback locale).