Contract payloads
Contract reference · contract.json (crates/manifold-wasm-abi/wit/contract.json)
Contract 0.2.0, track 0.2: open, unreleased. Nothing on track 0.2 is released yet, so any item may still change in place (spec §7.2).
Every list<u8> in the contract is classified (payloads, spec §11): a schema payload is a postcard value of one registered type, a packed layout a little-endian record buffer, and opaque bytes have their description elsewhere.
A schema payload’s shape is its postcard encoding: struct fields in order with no names, an enum as its variant index (a varint) then the variant’s payload, an option as a 0 or 1 byte then the value, a list, string, bytes or map as a varint length then the items, an array as exactly its elements, integers wider than a byte as varints (signed ones zigzag-encoded), floats as little-endian bytes. envelope payloads begin with a u16 format version that the host migrates forward; track payloads only append variants within a track (never a field: postcard reads exactly the declared fields). A pending part is a shape not described yet, named with the work that will describe it; nothing checks it.
Schema payloads
hud-layer-policies
Rust Vec<(smol_str::SmolStr, manifold_ui_protocol::client_plugin::HookPolicy)> · owner enki · versioning track
Shape: list<tuple<string, HookPolicy>>
Sites:
Types it reaches: HookPolicy.
layout-transforms
Rust Vec<manifold_ui_protocol::client_plugin::LayoutTransform> · owner enki · versioning track
Shape: list<LayoutTransform>
Sites:
Types it reaches: Anchor2D, HookTarget, LayoutOp, LayoutTransform.
mod-declarations
Rust manifold_mod_types::ModDeclarations · owner contract-foundation · versioning envelope, format version 13 (manifold_mod_types::DECLARATIONS_FORMAT_VERSION)
Shape: ModDeclarations
Sites:
Types it reaches: A11yDeclWire, AccumulationWire, ActionDeclWire, ActionScopeWire, BackBehaviourWire, BandWire, BlockDefWire, CommandKindWire, CommandLeafWire, CommandNodeWire, ComponentDeclWire, ContextDeclWire, ContextKindWire, CursorModeWire, DefaultBindingDeclWire, DefaultHostWire, EngineRequests, EntityArchetypeWire, EventDeclWire, FieldKindWire, FieldSchemaWire, HostResourceDeclWire, InputCommandKindWire, InputRoleBindingWire, InputRoleWire, ModDeclarations, PermissionLevelWire, PluginManifestWire, PointerScopeWire, ReplicationModeWire, ReplicationWire, ResourceSyncSpecWire, SamplingWire, Schedule, Side, SinkWire, SlotWire, SystemDeclWire, TerrainRecipeWire, ValueKindWire.
plugin-command
Rust manifold_ui_protocol::client_plugin::PluginCommand · owner enki · versioning track
Shape: PluginCommand
Sites:
Types it reaches: PluginCommand.
plugin-ui-registration
Rust manifold_ui_protocol::client_plugin::PluginUiRegistration · owner enki · versioning track
Shape: PluginUiRegistration
Sites:
Types it reaches: BindingValueKind, PluginUiRegistration, RecordSchemaWire, UiField, UiFieldSchema.
read-value
Rust manifold_ui_protocol::client_plugin::ReadValue · owner enki · versioning track
Shape: ReadValue
Sites:
Types it reaches: ItemStackView, ReadValue.
reskin-transforms
Rust Vec<manifold_ui_protocol::client_plugin::ReskinTransform> · owner enki · versioning track
Shape: list<ReskinTransform>
Sites:
Types it reaches: FontSpec, FontWeight, HookTarget, ReskinScope, ReskinTransform, TokenValue.
start-context
Rust manifold_mod_types::StartContext · owner contract-foundation · versioning envelope, format version 1 (manifold_mod_types::START_CONTEXT_FORMAT_VERSION)
Shape: StartContext
Sites:
Types it reaches: StartContext, StartSide.
txn-results
Rust Vec<manifold_mod_types::contract::txn::TxnResult> · owner enki · versioning track
Shape: list<TxnResult>
Sites:
Types it reaches: BlockBox, BlockPos, ConflictKind, ConflictReport, LocArg, LocalizedText, TxnProgress, TxnReject, TxnResult, TxnStatus, TxnSummary.
ui-event
Rust manifold_ui_protocol::mod_ui::UiEvent · owner enki · versioning track
Shape: UiEvent
Sites:
Types it reaches: BindingValue, ClickButton, ModifierSet, NodeId, UiEvent.
ui-registrations
Rust Vec<manifold_ui_protocol::mod_ui::UiRegistration> · owner enki · versioning track
Shape: list<UiRegistration>
Sites:
Types it reaches: ActionDef, Align, Anchor2D, BindingPath, BindingValueKind, ComponentOverride, Direction, DropdownAppend, DropdownOption, Ellipsis, FieldRef, FontSpec, FontWeight, ImageFit, KeyId, Mirror, NamespaceId, Node, OverflowWrap, OverrideProperty, Position, Pred, ProgressKind, RecordSchemaWire, ShapeKind, Stroke, TextArg, TextDir, TextOptions, TextValue, TokenValue, UiField, UiFieldSchema, UiKey, UiRegistration, ValueSource, Vec2.
- Pending
ActionDef::Typed.1: C P0 (enki/c-p0): ron::Value becomes the typed UiValue enum, which postcard can decode - Pending
DropdownOption.value: C P0 (enki/c-p0): ron::Value becomes the typed UiValue enum, which postcard can decode
ui-state-map
Rust manifold_ui_protocol::mod_ui::UiStateMap · owner enki · versioning track
Shape: UiStateMap
Sites:
Types it reaches: BindingValue, FieldId, UiStateMap.
Payload types
Type A11yDeclWire
Accessibility metadata (§7.5).
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
toggle | bool | Hold or toggle. | ||
repeat_to_hold | option<tuple<u16, u16>> | yes | (initial_ms, interval_ms) for press-repeatedly → hold. |
Type AccumulationWire
How bindings combine (§8.6).
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Any | none | Buttons: reference-counted. | |
| 1 | MaxAbs | none | Axes: the largest magnitude. | |
| 2 | Sum | none | Axes: sum. |
Type ActionDeclWire
Wire form of one input-action declaration (input spec §7.2): the
fully-qualified key and every declaration field. Bindings travel as RON
text, parsed host-side by manifold_input::InputBinding::parse (which
also reads format 2’s Key(code: Space)), so this crate needs no
key-code mirror. Labels, categories and descriptions are implied catalog
keys (§7.4), never strings.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
key | string | Fully-qualified action key, "namespace:local" (e.g. "flagship-game:jump"). | ||
kind | ValueKindWire | The value kind (in the input-action hash for Simulation actions). | ||
scope | ActionScopeWire | Simulation or Local. | ||
contexts | list<string> | Contexts it may be bound in; empty means manifold:gameplay. | ||
defaults | list<DefaultBindingDeclWire> | Default bindings per slot and host. | ||
category | option<string> | yes | Category catalog-key suffix. | |
order | i16 | Menu order within the category. | ||
sampling | SamplingWire | Axis sampling. | ||
accumulation | option<AccumulationWire> | yes | How bindings combine; None takes the kind’s default. | |
consume | bool | Whether a firing binding consumes its source. | ||
a11y | A11yDeclWire | Accessibility metadata. | ||
remappable | bool | Whether the player may rebind it (false only for platform actions). | ||
shares_with | list<string> | Actions it may share a chord with. | ||
command | option<InputCommandKindWire> | yes | The command payload it accepts. | |
processors_ron | list<string> | Action processors, as RON (§8.7). |
Type ActionDef
Action body, postcard-encoded against the UI’s registered Action type.
RON authors typically use the Postcard(<bytes-list>) shape but tooling
will encode/decode this from a higher-level RON form in Slice D.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Postcard | bytes | ||
| 1 | Typed | string, pending(C P0 (enki/c-p0): ron::Value becomes the typed UiValue enum, which postcard can decode) | Typed authoring: action: Typed("SetReady", true) in RON. Loader looks up the BuiStateType registered for the enclosing Window’s bui_key and instantiates the named variant via the Action’s deserializer; resolves to Postcard at load time. | |
| 2 | Ron | string | RON-text action for local UIs (B4). Dispatched verbatim through the runtime’s ctx.dispatch closure, which calls the registered LocalUiRegistration::action_decoder for the enclosing local UI. Not lowered at tree-load time — distinct from Typed, which IS lowered to Postcard against a BuiStateType decoder. |
Type ActionScopeWire
Simulation or Local (D9).
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Simulation | none | Reaches the server. | |
| 1 | Local | none | Client only. |
Type Align
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Auto | none | align-self only: inherit the container’s align-items. Invalid as an align-items value (treated as Start defensively); resolved away before reaching the egui layout. | |
| 1 | Start | none | ||
| 2 | Center | none | ||
| 3 | End | none | ||
| 4 | Stretch | none |
Type Anchor2D
9-grid screen anchor (DL-504-07). Lowers to egui::Align2 at render
time. Custom positions express via the offset: Vec2 companion on
Node::Anchor.
The Start/End variants are logical: in a right-to-left UI they
resolve to the opposite physical edge and the offset’s x flips sign with
them, so a layout written once mirrors for Arabic or Hebrew. The physical
Left/Right variants never mirror; use them deliberately (minimaps,
compasses, media controls). Variants are append-only (wire order).
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | TopLeft | none | ||
| 1 | TopCenter | none | ||
| 2 | TopRight | none | ||
| 3 | CenterLeft | none | ||
| 4 | Center | none | ||
| 5 | CenterRight | none | ||
| 6 | BottomLeft | none | ||
| 7 | BottomCenter | none | ||
| 8 | BottomRight | none | ||
| 9 | TopStart | none | ||
| 10 | TopEnd | none | ||
| 11 | CenterStart | none | ||
| 12 | CenterEnd | none | ||
| 13 | BottomStart | none | ||
| 14 | BottomEnd | none |
Type BackBehaviourWire
What back does when the context is the top handler (§10.7).
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | PassThrough | none | The context below handles it. | |
| 1 | Pop | none | Pop this context. | |
| 2 | Action | string | Press this action instead. |
Type BandWire
Priority bands (§10.3).
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Base | none | ||
| 1 | Game | none | ||
| 2 | Tool | none | ||
| 3 | EngineUi | none | ||
| 4 | EngineSystem | none |
Type BindingPath
A parsed but UNRESOLVED binding path (i.e., post-RON-deserialize).
Resolution against the live Bindable registry happens in voxel-ui-runtime.
Deserializes from either a RON struct ((component: "…", field_chain: […]))
or a plain string ("Component.field"). The string form calls
[BindingPath::parse] and surfaces any parse error as a serde error.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
component | string | e.g. “DebugUiTarget” | ||
field_chain | list<FieldRef> | e.g. [“slots”, Index(0)] |
Type BindingValue
Runtime-side typed value produced by a binding accessor.
WIRE-STABLE (C1+): BindingValue is postcard-serialized inside
UiStateMap, whose bytes are golden-locked (tests/golden_mod_ui.rs)
and depended on by mods forever. New variants may only be APPENDED —
never reorder or remove existing variants, as that shifts postcard enum
discriminants and breaks every persisted/replicated UiStateMap.
Host-runtime use must not drive variant ordering.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | U16 | u16 | ||
| 1 | U32 | u32 | ||
| 2 | F32 | f32 | ||
| 3 | Bool | bool | ||
| 4 | Str | string | ||
| 5 | SlotContentsBytes | bytes | ||
| 6 | List | list<BindingValue> | Homogeneous list of values. The corresponding BindingValueKind is List(Box<kind_of_first_element_or_String_if_empty>). | |
| 7 | Record | list<tuple<string, BindingValue>> | A structured element: named fields in declared order. Built at runtime by BindableRecord::to_record; never const. APPEND-ONLY. |
Type BindingValueKind
Discriminator for the type a binding produces. Widgets check this against what they need at load time.
WIRE-STABLE (C1+): BindingValueKind is postcard-serialized inside
UiFieldSchema / UiRegistration, whose bytes are golden-locked
(tests/golden_mod_ui.rs). New variants may only be APPENDED — never
reorder or remove existing variants, as that shifts postcard enum
discriminants and breaks every persisted/replicated UiRegistration.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | U16 | none | ||
| 1 | U32 | none | ||
| 2 | F32 | none | ||
| 3 | Bool | none | ||
| 4 | String | none | ||
| 5 | SlotContentsBytes | none | Postcard-encoded slot contents. The Slot widget decodes per the UI’s registered slot-content type. | |
| 6 | List | u8 | Homogeneous list of values sharing the same inner kind. Stores the inner kind’s discriminant as a u8 to keep BindingValueKind const-evaluable (no Box::new). Use list_inner_kind() to recover the full kind at runtime. Wire format is identical to a hypothetical List(Box<BindingValueKind>) — postcard encodes small u32 varints and u8 as the same single byte for discriminants 0–127. | |
| 7 | Record | none | A record element. Bare marker — the field schema is NOT here; it lives in the record-schema registry, keyed by the element type name carried on the list field’s registration. Const- and serde-safe. APPEND-ONLY. |
Type BlockBox
A box of blocks, inclusive on both corners: the WIT core/types.block-box.
min is not required to be the lesser corner on the wire; consumers
normalise with [BlockBox::normalized].
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
min | BlockPos | |||
max | BlockPos |
Type BlockDefWire
Wire form of one block definition: the block’s RON text, parsed host-side
by the SAME manifold_world::block_loader parser the native path used, so
BlockProperties (and the handshake hash) are byte-identical. Carrying raw
RON (not a structured mirror) keeps manifold-mod-types free of any
manifold-world dependency and eliminates field-mapping divergence.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
ron | string |
Type BlockPos
A block position: the WIT core/types.block-pos. World coordinates for
[VolumeRef::World], grid-local ones for [VolumeRef::Assembly].
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
x | i32 | X. | ||
y | i32 | Y. | ||
z | i32 | Z. |
Type ClickButton
Which mouse button drove a slot click. Append-only (postcard variant index).
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Left | none | ||
| 1 | Right | none |
Type CommandKindWire
Whether a declared command node is a terminal leaf or an interior branch.
has_root_exec = the branch is also invocable bare (like /time printing
the current time). (M4c-3)
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Leaf | none | ||
| 1 | Branch | { has_root_exec: bool } |
Type CommandLeafWire
A command leaf in [ModDeclarations::commands_server] and
[ModDeclarations::commands_client].
Wasm guests cannot provide fn pointers for command execution; the exec
fn pointer in the native Leaf<Exec> is replaced by a system id that the
host can use to call run-system when the command fires.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
path | list<string> | Full command path tokens (e.g. ["time", "set"]). | ||
help | string | Help text for the command. | ||
system_id | u32 | System-id to invoke when this command runs (maps to run-system). |
Type CommandNodeWire
Wire form of ONE node in a guest’s command tree. The host folds these into
its ServerCommandRegistry as ServerExec::Guest nodes (faithful tree:
per-node perm/help preserved, host keeps resolution + introspection).
A flat node list reconstructs the tree (the host builds intermediate
branches as needed). (M4c-3)
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
path | list<string> | Full path from the registry root, e.g. ["time"] or ["time","set"]. | ||
kind | CommandKindWire | |||
perm | PermissionLevelWire | |||
help | string | |||
usage | option<string> | yes |
Type ComponentDeclWire
Wire form of one novel guest-authored component declaration.
local_id is the component’s UNqualified local name (e.g. "mana"); the host
composes the fully-qualified key by prefixing the declaring plugin’s authenticated
id during the fold (→ "<plugin>:mana"). Declaring is a trust surface — carrying
only the local id makes it impossible for a guest to forge a component in another
mod’s namespace (e.g. claiming manifold-sim:position). This mirrors the
host-composed-namespace pattern used for entity archetypes and UI keys, in contrast
to references (EntityArchetypeWire.component_keys / novel_defaults) which point
at already-registered keys and so carry the fully-qualified form.
schema carries field names AND kinds in layout order (see FieldSchemaWire).
replication controls how the host replicates this component to clients.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
local_id | string | Unqualified local component name (e.g. "mana"); host composes the namespace. | ||
schema | list<FieldSchemaWire> | Ordered field layout. Position determines postcard byte offset. | ||
replication | ReplicationWire |
Type ComponentOverride
One path-keyed override targeting a node (by id) in the named definition.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
target | string | id of the target node inside the definition (its OWN direct nodes only). | ||
property | OverrideProperty |
Type ConflictKind
Why a revert or reapply refused to write.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Changed | none | Another player or process changed cells since the record was made (compare-and-set against the recorded values failed). | |
| 1 | Unmappable | none | The record names block states this server’s registry cannot hold exactly (a type lost the orientation or properties it recorded), so writing them would place a different block. |
Type ConflictReport
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
kind | ConflictKind | |||
cells | u64 | Cells that failed the check. | ||
sample | list<BlockPos> | Up to [CONFLICT_SAMPLE_MAX] of them, in record order. |
Type ContextDeclWire
A context declaration (§10.1, §15.1).
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
id | string | namespace:local. | ||
kind | ContextKindWire | Base or layer. | ||
band | BandWire | The band. | ||
priority | u16 | Priority within the band. | ||
sink | SinkWire | Unbound controls it consumes. | ||
sink_pointer | PointerScopeWire | Where its pointer sink applies. | ||
cursor | CursorModeWire | The cursor it asks for. | ||
exclusive | bool | Its owner alone sees its actions. | ||
active_while | option<string> | yes | A Button action; the layer applies only while it is held. | |
never_with | list<string> | Contexts it is never stacked with. | ||
blocks | list<string> | Actions released and suppressed while it is effective. | ||
back | BackBehaviourWire | What back does. |
Type ContextKindWire
Base or layer.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Base | none | ||
| 1 | Layer | none |
Type CursorModeWire
The cursor a context asks for.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Grabbed | none | ||
| 1 | Free | none | ||
| 2 | Inherit | none |
Type DefaultBindingDeclWire
One default binding.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
slot | SlotWire | The slot. | ||
binding_ron | string | The binding, as RON (§8.1). | ||
host | DefaultHostWire | The host it applies to. |
Type DefaultHostWire
The host a default applies to (D38).
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Any | none | ||
| 1 | Native | none | ||
| 2 | Browser | none |
Type Direction
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Horizontal | none | ||
| 1 | Vertical | none |
Type DropdownAppend
Options a Dropdown takes from the engine rather than its author.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | None | none | ||
| 1 | Languages | none | Every installed language, named in itself, valued by its BCP 47 tag. Tags already among the authored options are skipped. |
Type DropdownOption
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
label | TextValue | |||
value | pending(C P0 (enki/c-p0): ron::Value becomes the typed UiValue enum, which postcard can decode) |
Type Ellipsis
What is shown when text is cut by max_lines.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | End | none | End the last visible line with “…”. | |
| 1 | Clip | none | Cut without a mark. |
Type EngineRequests
Engine-feature requests in [ModDeclarations]. A new request is a new
field under a new declarations format version, not a WIT change.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
disable_sky | bool | Disable the engine’s default sky. |
Type EntityArchetypeWire
Wire form of one entity-archetype declaration: the archetype’s local id
(namespaced to the declaring plugin host-side) plus the fully-qualified
component keys ("namespace:local") it is composed of. The component keys
REFERENCE library components (e.g. manifold-sim:position); this wire does
NOT carry field schemas for native components (those stay native — F3 Slice A
scope). For NOVEL guest components, novel_defaults carries the per-component
postcard-encoded default value that is attached when an entity of this
archetype is spawned (mirrors ResourceDeclWire.default_bytes).
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
local_id | string | |||
component_keys | list<string> | |||
novel_defaults | list<tuple<string, list<u8>>> | yes | Per-novel-component (fully-qualified key, postcard default_bytes) for archetype-declared attachment. Present only for novel (guest-authored) components; native component keys in component_keys do not appear here. #[serde(default)] so older v5 payloads decode cleanly with an empty vec. |
Type EventDeclWire
Wire form of an event declaration.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
type_id | u64 | |||
side | Side | |||
capacity | u32 | Ring-buffer capacity. Default per spec is 64. |
Type FieldId
Tuple struct: (u16).
Type FieldKindWire
Primitive field kinds that a novel guest component may expose via
#[derive(HasSchemaValue)]. This is a postcard-friendly mirror of the
manifold_engine::FieldKind v1 primitive subset (D6).
Composite variants (List, Struct) are intentionally absent: the guest
derive pre-lowers glam vectors (e.g. Vec3 → three F32 fields pos.x/.y/.z)
and fieldless C-like enums (→ one U8 field discriminant) into primitives
before emitting the schema, so composite kinds never reach the wire in v1
(decision-critic C3 finding). Composites are deferred to a future slice.
This enum is defined here (not by importing manifold_engine::FieldKind)
because manifold-mod-types depends on serde only and must remain free of
any manifold-engine dep.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | U8 | none | ||
| 1 | U16 | none | ||
| 2 | U32 | none | ||
| 3 | U64 | none | ||
| 4 | I8 | none | ||
| 5 | I16 | none | ||
| 6 | I32 | none | ||
| 7 | I64 | none | ||
| 8 | F32 | none | ||
| 9 | F64 | none | ||
| 10 | Bool | none | ||
| 11 | String | none |
Type FieldRef
One segment of a binding path. Slice A supports field access and array indexing; deeper structures wait until Slice B+.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Field | string | ||
| 1 | Index | u32 |
Type FieldSchemaWire
One field in a novel component’s schema.
Field NAMES are carried on this in-process wire (contrast with the
network handshake hash, where names are NOT transmitted and each peer
reconstructs the schema from its own local mod copy). Names are required
here because the host interprets fields by name for the
/component <e> get <key>.<field> command (D2) and the dynamic codec
(§3.4). The ORDERED list is the layout contract: index position
determines postcard byte offset.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
name | string | |||
kind | FieldKindWire |
Type FontSpec
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
family | string | |||
size_px | f32 | |||
weight | FontWeight |
Type FontWeight
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Light | none | ||
| 1 | Regular | none | ||
| 2 | Medium | none | ||
| 3 | SemiBold | none | ||
| 4 | Bold | none |
Type HookPolicy
Per-layer hook policy authored by the trusted HUD author.
serde(default) means existing RON files with no hook_policy field get
a fully-hookable policy — no migration required.
Security model: locked: true is the hard floor — it rejects every transform
(reskin, move, hide). A non-locked layer grants/denies individual op types
via the per-op flags. reskin: false is the only honest concealment-protection
(see spec §4.3 — opacity floors are defeated by color-match and font-0).
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
locked | bool | yes | Hard floor: when true, every transform is rejected regardless of per-op flags. | |
reskin | bool | yes | Whether reskin transforms are permitted. false is the only concealment-safe setting. | |
move_ | bool | yes | Whether Move ops are permitted. | |
hide | bool | yes | Whether Hide ops are permitted. |
Type HookTarget
Identifies what a transform targets. anchor is the forward-compat seam for
C2b-b in-tree augment/inject; C2b-a always sets it to None.
WIRE-STABLE: new fields may only be appended.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
layer | string | HudLayerDef key, e.g. "flagship:block_indicator". | ||
anchor | option<string> | yes | Reserved for C2b-b in-tree augment/inject. Always None in C2b-a. |
Type HostResourceDeclWire
Wire form of one guest-declared HOST-side resource (#55 Slice 1).
Distinct from [ResourceDeclWire] (the guest-PRIVATE store path): a host
resource is created in the server world’s DynResources bag at world-ready,
bridged for the guest’s systems, and (Slice 2) replicated. local_id is the
UNqualified name — the host composes "<plugin>:<local>" and derives the
type_id, so a guest cannot forge another mod’s namespace (trust parity with
ComponentDeclWire). No schema field: host resources are opaque bytes; field
schema is deferred with composite-schema support (Slice-2+).
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
local_id | string | |||
replication | ReplicationWire | |||
default_bytes | bytes | Postcard-encoded default value (guest’s T::default() thunk). |
Type ImageFit
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Fit | none | ||
| 1 | Fill | none |
Type InputCommandKindWire
The command payload an action accepts (§13.6).
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Target | none | ||
| 1 | Point | none | ||
| 2 | TargetPoint | none | ||
| 3 | Slot | none | ||
| 4 | Bytes | none |
Type InputRoleBindingWire
One (role, action-name) binding declared by the guest. The host resolves
action_name against the InputActionRegistry built from the same manifest.
M4c-4b.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
role | InputRoleWire | The semantic role this binding covers. | ||
action_name | string | Fully-qualified action name, e.g. "flagship-game:jump". |
Type InputRoleWire
Wire mirror of manifold_engine::InputRole. Closed enum — the set of roles
platform machinery consumes. Kept in this crate so manifold-mod-types
stays free of a manifold-engine dep (same rule as FieldKindWire / Side).
M4c-4b.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Jump | none | Jump action. | |
| 1 | ToggleFlight | none | Toggle flight mode. | |
| 2 | Move | none | Horizontal movement, an Axis2D action (input spec §14.2). | |
| 3 | MoveVertical | none | Vertical movement, an Axis1D action. | |
| 4 | Sneak | none | Sneak / crouch. | |
| 5 | Sprint | none | Sprint. | |
| 6 | DebugSpeed | none | Debug speed multiplier (10×). | |
| 7 | Break | none | Break / mine the targeted block. | |
| 8 | Place | none | Place a block. | |
| 9 | Interact | none | Interact with the targeted entity or block. | |
| 10 | PushToTalk | none | Hold to transmit voice chat. Appended: postcard variant order is wire. | |
| 11 | OpenInventory | none | Toggle the player’s own inventory window. Appended: postcard variant order is wire. |
Type ItemStackView
Compact view of a single item stack, sufficient for overlay rendering.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
item_id | u32 | |||
count | u16 |
Type KeyId
Tuple struct: (u32).
Type LayoutOp
Move or hide a HUD layer.
WIRE-STABLE: new variants may only be appended.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Hide | none | ||
| 1 | Move | { anchor: Anchor2D, offset: array<f32, 2> } | Move to anchor with offset. Offset is range-validated at submit and clamped to screen rect at apply (anti-layout-DoS). |
Type LayoutTransform
One layout transform: move or hide. #[non_exhaustive] so C2b-b ops can append.
WIRE-STABLE: new fields may only be appended.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
target | HookTarget | |||
op | LayoutOp |
Type LocArg
A typed message argument. Each type is formatted for the reader’s locale when the message is resolved.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Str | string | Untranslated text: user input, a proper name, a file path. Always bidi-isolated when substituted. | |
| 1 | Int | i64 | An integer, formatted per locale and usable as a plural selector. | |
| 2 | Float | f64 | A decimal number, formatted per locale. | |
| 3 | Key | string | Another message, resolved (without arguments) in the reader’s language. | |
| 4 | Text | LocalizedText | Another message with its own arguments. | |
| 5 | Item | string | A namespaced item or block id (flagship:dirt). Resolves to that item’s display name in the reader’s language. | |
| 6 | Player | string | A player’s display name. User text: isolated, never translated. | |
| 7 | DurationMs | u64 | A duration in milliseconds. | |
| 8 | TimestampMs | i64 | A point in time, milliseconds since the Unix epoch (UTC). | |
| 9 | Currency | { minor: i64, code: string } | A currency amount in minor units (cents) with its ISO 4217 code. |
Type LocalizedText
A message for display to a player: a catalog key plus named arguments.
Arguments are named, as Fluent expects, so translators can reorder them. The wire form is positional (postcard); field order is part of the protocol.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
key | string | Namespaced key, <mod_id>.<segment>(.<segment>)*. See [key]. | ||
args | list<tuple<string, LocArg>> | Named arguments, in the order the sender supplied them. |
Type Mirror
Whether a node’s horizontal layout mirrors in a right-to-left UI.
Auto (the default) mirrors logical terms (Start/End anchors, start/
end insets) and lays horizontal containers out from the start edge.
Never keeps left-to-right order and pins logical terms to their
left-to-right meaning; it also records that a physical term is deliberate,
which silences ui-validate’s mirroring warning.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Auto | none | ||
| 1 | Never | none |
Type ModDeclarations
Everything a mod declares: the plugin-lifecycle.declarations() payload.
Pure and side-independent: the SDK builds it from the registrations
Plugin::build makes, calls no import but logging, and returns the same
bytes on every instance and side. The host reads it once per instance.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
format_version | u16 | [DECLARATIONS_FORMAT_VERSION] when written by this SDK. | ||
start_context_version | u16 | The [StartContext] format version this mod’s SDK decodes. The host encodes the context it passes to start at this version. | ||
shared | list<PluginManifestWire> | Side-less declarations (blocks, actions, archetypes) and those of either side. One entry per plugin in the component. | ||
server | list<PluginManifestWire> | Server-side declarations: the server instance’s systems, resources and events. | ||
client | list<PluginManifestWire> | Client-side declarations. | ||
commands_server | list<CommandLeafWire> | Server command leaves. | ||
commands_client | list<CommandLeafWire> | Client command leaves. | ||
synced_resources | list<ResourceSyncSpecWire> | Server-to-client sync specs, by index into the host’s table. | ||
engine | EngineRequests | Engine-feature requests. |
Type ModifierSet
Tuple struct: (u8).
Type NamespaceId
Tuple struct: (u32).
Type Node
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Window | { title: TextValue, bui_key: UiKey, closeable: bool, draggable: bool, root: Node, resizable?: bool, width?: option<f32>, height?: option<f32>, min_width?: option<f32>, min_height?: option<f32>, position?: option<Position>, style_class?: option<string>, theme_override?: option<map<string, TokenValue>>, visible_when?: option<Pred>, text_options?: TextOptions, id?: option<string> } | ||
| 1 | Box | { direction: Direction, spacing: f32, align: Align, children: list<Node>, align_self?: Align, style_class?: option<string>, theme_override?: option<map<string, TokenValue>>, visible_when?: option<Pred>, mirror?: Mirror, id?: option<string> } | ||
| 2 | Label | { text: TextValue, align_self?: Align, style_class?: option<string>, theme_override?: option<map<string, TokenValue>>, visible_when?: option<Pred>, text_options?: TextOptions, id?: option<string> } | ||
| 3 | ProgressBar | { value: ValueSource, kind: ProgressKind, direction: Direction, align_self?: Align, style_class?: option<string>, theme_override?: option<map<string, TokenValue>>, visible_when?: option<Pred>, id?: option<string> } | ||
| 4 | Button | { label: TextValue, action: ActionDef, align_self?: Align, style_class?: option<string>, theme_override?: option<map<string, TokenValue>>, visible_when?: option<Pred>, text_options?: TextOptions, id?: option<string> } | ||
| 5 | Slot | { container: BindingPath, index: u32, kind_type: string, align_self?: Align, style_class?: option<string>, theme_override?: option<map<string, TokenValue>>, visible_when?: option<Pred>, id?: option<string> } | ||
| 6 | HBox | { children: list<Node>, spacing: f32, align: Align, align_self?: Align, style_class?: option<string>, theme_override?: option<map<string, TokenValue>>, visible_when?: option<Pred>, mirror?: Mirror, id?: option<string> } | ||
| 7 | VBox | { children: list<Node>, spacing: f32, align: Align, align_self?: Align, style_class?: option<string>, theme_override?: option<map<string, TokenValue>>, visible_when?: option<Pred>, id?: option<string> } | ||
| 8 | Grid | { children: list<Node>, cols: u16, row_spacing: f32, col_spacing: f32, align_self?: Align, style_class?: option<string>, theme_override?: option<map<string, TokenValue>>, visible_when?: option<Pred>, mirror?: Mirror, id?: option<string> } | ||
| 9 | Margin | { top: f32, right: f32, bottom: f32, left: f32, child: Node, align_self?: Align, style_class?: option<string>, theme_override?: option<map<string, TokenValue>>, visible_when?: option<Pred>, start?: option<f32>, end?: option<f32>, mirror?: Mirror, id?: option<string> } | ||
| 10 | Anchor | { position: Position, child: Node, align_self?: Align, style_class?: option<string>, theme_override?: option<map<string, TokenValue>>, visible_when?: option<Pred>, id?: option<string> } | Screen-anchored container (5.4b). Anchors child at one of nine screen grid positions, offset by offset pixels. Non-interactive. Used by HUD layers; not valid in BUI window subtrees (compositional invariant: HUD anchoring is screen-space, BUI is window-local). | |
| 11 | Shape | { kind: ShapeKind, align_self?: Align, style_class?: option<string>, theme_override?: option<map<string, TokenValue>>, visible_when?: option<Pred>, id?: option<string> } | Geometric shape primitive (5.4b). Renders via a screen-space egui::Painter. Used by HUD layers (crosshair reticle, debug overlays, future minimap borders). | |
| 12 | Scroll | { direction: Direction, child: Node, clamp_to_content?: bool, align_self?: Align, style_class?: option<string>, theme_override?: option<map<string, TokenValue>>, visible_when?: option<Pred>, id?: option<string> } | ||
| 13 | TextEdit | { binding: BindingPath, placeholder?: option<TextValue>, max_chars: u16, multiline: bool, action: ActionDef, align_self?: Align, style_class?: option<string>, theme_override?: option<map<string, TokenValue>>, visible_when?: option<Pred>, text_options?: TextOptions, id?: option<string> } | ||
| 14 | Slider | { binding: BindingPath, min: f32, max: f32, step: f32, action: ActionDef, align_self?: Align, style_class?: option<string>, theme_override?: option<map<string, TokenValue>>, visible_when?: option<Pred>, id?: option<string> } | ||
| 15 | Checkbox | { binding: BindingPath, label: TextValue, action: ActionDef, align_self?: Align, style_class?: option<string>, theme_override?: option<map<string, TokenValue>>, visible_when?: option<Pred>, text_options?: TextOptions, id?: option<string> } | ||
| 16 | Dropdown | { selected: BindingPath, options: list<DropdownOption>, append?: DropdownAppend, action: ActionDef, align_self?: Align, style_class?: option<string>, theme_override?: option<map<string, TokenValue>>, visible_when?: option<Pred>, text_options?: TextOptions, id?: option<string> } | ||
| 17 | Image | { icon: TextValue, fit: ImageFit, align_self?: Align, style_class?: option<string>, theme_override?: option<map<string, TokenValue>>, visible_when?: option<Pred>, id?: option<string> } | ||
| 18 | Tooltip | { content: Node, child: Node, delay_ms?: u16, align_self?: Align, style_class?: option<string>, theme_override?: option<map<string, TokenValue>>, visible_when?: option<Pred>, id?: option<string> } | ||
| 19 | ForEach | { binding: BindingPath, template: Node, item_var?: string, direction: Direction, spacing: f32, node_id?: option<string>, align_self?: Align, style_class?: option<string>, theme_override?: option<map<string, TokenValue>>, visible_when?: option<Pred>, mirror?: Mirror, id?: option<string> } | Dynamic list container: stamps template once per element in the bound list. P1 feature — supports reorder via UiEvent::Reorder. | |
| 20 | Fragment | { children: list<Node>, visible_when?: option<Pred>, id?: option<string> } | Logical grouping that imposes no layout and no style of its own. Renders its children inline into the enclosing container exactly as if the Fragment were not present (same spacing, same align-items inheritance). Exists to bundle siblings for the editor (collapse in the tree, select/move as a unit) and as a transparent passthrough wrapper. Deliberately carries no align_self/style_class/theme_override/ spacing/direction — that absence IS the “zero layout/style” contract. visible_when is the sole exception: visibility is orthogonal to layout. | |
| 21 | Component | { name: string, overrides?: list<ComponentOverride>, align_self?: Align, style_class?: option<string>, theme_override?: option<map<string, TokenValue>>, visible_when?: option<Pred>, id?: option<string> } | A component instance: expands the named .component.ron at resolution, applying overrides to the definition’s own direct nodes (spec §4a). | |
| 22 | ExtensionPoint | { name: string, max_nodes?: u32, id?: option<string> } | A named insertion slot for plugin-contributed content (M2 extension points). Trusted screen authors declare these; plugins contribute .ext.ron documents addressing them. max_nodes caps the total resolved nodes accepted from contributions at this point. Palette-restricted to the Trusted tier — plugins cannot author this node. | |
| 23 | CarriedCursor | { container: BindingPath, kind_type: string, align_self?: Align, style_class?: option<string>, theme_override?: option<map<string, TokenValue>>, visible_when?: option<Pred>, id?: option<string> } | A floating, follow-the-mouse “carried cursor” overlay bound to a 1-cell SlotContentsBytes field. Renders nothing in layout; the engine paints the bound cell’s icon + count at the pointer when non-empty. The mod places exactly one per container window. The carried payload is the game’s authoritative state, projected to SlotCell by build_ui_state. |
Type NodeId
Tuple struct: (string).
Type OverflowWrap
What happens to a word wider than its box.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Normal | none | Break only at line-break opportunities; a long word overflows. | |
| 1 | BreakWord | none | Break inside a word only if it would otherwise overflow. UI default. | |
| 2 | Anywhere | none | Break anywhere. |
Type OverrideProperty
The bounded-but-extensible override vocabulary (spec §5). Keep minimal by design — a new variant needs a real authoring need, not speculation.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Text | TextValue | Replace a text-bearing field (Label.text, Window.title, Button.label). | |
| 1 | Value | ValueSource | Replace a value source (ProgressBar.value). | |
| 2 | StyleClass | option<string> | Replace the node’s style_class. | |
| 3 | VisibleWhen | option<Pred> | Replace the node’s visible_when predicate. |
Type PermissionLevelWire
Permission level mirror (postcard-safe; manifold-mod-types has no
manifold-engine dep). Maps 1:1 to manifold_engine::PermissionLevel.
ORDER IS THE LADDER: Player < Admin (the host maps by variant). (M4c-3)
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Player | none | ||
| 1 | Admin | none |
Type PluginCommand
Closed command allowlist. NO variant maps onto PlayerInput/PlayerActions (movement/look/attack/use) — that path is unreachable by construction.
WIRE-STABLE: new variants may only be APPENDED.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | SelectHotbarSlot | u8 | ||
| 1 | SendChat | string | ||
| 2 | OpenBlockUi | { ui_id: string, target_block: array<i32, 3> } | ||
| 3 | EditBlock | { pos: array<i32, 3>, action: u8 } |
Type PluginManifestWire
Wire form of one plugin’s full registrations.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
terrain_recipes | list<TerrainRecipeWire> | Server-only declarative terrain providers, authenticated by the host. | ||
plugin_id | string | |||
events | list<EventDeclWire> | |||
systems | list<SystemDeclWire> | |||
blocks | list<BlockDefWire> | Block definitions this plugin contributes (raw RON, folded host-side via parse_and_register_block). F3 Slice B. | ||
actions | list<ActionDeclWire> | Input-action definitions this plugin contributes (key + optional default binding RON, folded host-side). F3 Slice C. | ||
entity_archetypes | list<EntityArchetypeWire> | Entity-archetype declarations this plugin contributes (local id + component key refs, folded host-side). F3 Slice A. | ||
components | list<ComponentDeclWire> | yes | Novel guest-authored component declarations this plugin contributes (key + field schema + replication policy, folded host-side into the component registry). F3 Slice B novel-components. #[serde(default)] so older v5 payloads decode cleanly with an empty vec. | |
commands | list<CommandNodeWire> | yes | Guest-declared server console commands (faithful tree). #[serde(default)] so older v6 payloads decode cleanly with an empty vec. (M4c-3) | |
input_role_bindings | list<InputRoleBindingWire> | yes | Role→action-name bindings declared by the guest. Flat list; platform machinery resolves each name against the InputActionRegistry. Sidecar data — NOT folded into the hashed action set. #[serde(default)] so older v7 payloads decode cleanly with an empty vec. M4c-4b. | |
player_archetype | option<string> | yes | Local archetype id of the player entity (e.g. "player"). The host composes the fully-qualified key from this plugin’s id. None means the game declares no player archetype. #[serde(default)] so older v7 payloads decode cleanly as None. M4c-4b. | |
host_resources | list<HostResourceDeclWire> | yes | Guest-declared HOST-side resources (#55 Slice 1). Created in the server world’s DynResources bag at world-ready, bridged for guest systems. #[serde(default)] so older payloads decode with an empty vec. | |
contexts | list<ContextDeclWire> | yes | Input contexts this plugin declares (input spec §10.1, §15.1), in its own namespace. Format 13. |
Type PluginUiRegistration
Registration payload a client-plugin sends when it installs an overlay.
The overlay’s widget tree is NOT carried over the wire. Instead, the host
loads it from <plugin_dir>/ui/<overlay_name>.ron at plugin-load time
(authored, asset-scoped, host-validated). The wasm guest supplies only the
overlay name and its UiFieldSchema (the set of data fields build() will
populate each frame).
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
overlay_name | string | |||
schema | UiFieldSchema |
Type PointerScopeWire
Where a pointer sink applies.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Everywhere | none | ||
| 1 | WhenOverUi | none |
Type Position
A resolution-independent screen position: a 9-point anchor plus a pixel
offset. Shared by Node::Window (as Option<Position>) and Node::Anchor.
Lowers to an egui::Align2 + offset at render time.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
anchor | Anchor2D | |||
offset | Vec2 | |||
mirror | Mirror | yes |
Type Pred
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | And | list<Pred> | All children must be true. Empty And is vacuously true. | |
| 1 | Or | list<Pred> | Any child true. Empty Or is vacuously false. | |
| 2 | Not | Pred | Negation. | |
| 3 | Bind | BindingPath | Read a bool-kinded binding. Non-bool kinds → eval false + warn (see manifold-ui-runtime::pred_eval). | |
| 4 | Literal | bool | Constant bool. Useful for debug HUDs that want unconditional visibility: visible_when: Literal(true). |
Type ProgressKind
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | U16Normalized | none | ||
| 1 | F32Direct | none |
Type ReadValue
Typed value returned for a [ReadValueId] query.
WIRE-STABLE: new variants may only be APPENDED.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Position | array<f32, 3> | ||
| 1 | BlockHit | { pos: array<i32, 3>, block_id: u32, distance: f32 } | ||
| 2 | CameraMode | u8 | ||
| 3 | TimeOfDay | f32 | ||
| 4 | HotbarSelection | u8 | ||
| 5 | Container | list<option<ItemStackView>> |
Type RecordSchemaWire
Flat element-shape description, referenced by name from a record-list
UiField.element. Its fields are scalar UiFields; the table never
references itself, so the wire shape is single-level by construction.
APPEND-ONLY (golden-locked).
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
name | string | |||
fields | list<UiField> |
Type ReplicationModeWire
Replication mode for a novel component. Mirrors manifold_engine::ReplicationMode.
Defined here to keep manifold-mod-types free of any manifold-engine dep.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | OnChange | none | Replicate only when the changed-tick advances (byte-diff). | |
| 1 | EveryTick | none | Replicate every tick regardless of change. | |
| 2 | Manual | none | Application code drives replication explicitly. |
Type ReplicationWire
Replication policy for a novel component. Mirrors manifold_engine::Replication.
Defined here to keep manifold-mod-types free of any manifold-engine dep.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | ServerOnly | none | Component lives only on the server; never sent to clients. | |
| 1 | ClientOnly | none | Component lives only on the client; never sent from/to server. | |
| 2 | Replicated | { mode: ReplicationModeWire } | Component is replicated server → client at the given mode. |
Type ReskinScope
Reskin can target one layer or all hookable HUD layers (the theme-pack case).
WIRE-STABLE: new variants may only be appended.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Layer | HookTarget | ||
| 1 | AllHudLayers | none |
Type ReskinTransform
One reskin transform: token overrides applied to the target layer’s effective theme.
The payload reuses ThemeOverrideMap (already wire-proven across the wasm boundary
in UiRegistration) rather than an invented type.
WIRE-STABLE: new fields may only be appended.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
scope | ReskinScope | |||
overrides | map<string, TokenValue> |
Type ResourceSyncSpecWire
A synced resource spec in [ModDeclarations::synced_resources].
ResourceSyncSpec (in manifold-engine) carries fn pointers (serialize,
deserialize_and_install) that cannot cross the wasm boundary. This wire
type carries an index into the host-registered ResourceSyncSpecTable
instead; the host looks up the real fn pointers by index.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
type_name | string | Stable debug name: "<plugin>:<TypeName>". Must match the corresponding entry in the host’s ResourceSyncSpecTable. | ||
spec_index | u32 | Index into the host’s ResourceSyncSpecTable. The host validates that table[spec_index].type_name == self.type_name as a sanity check. | ||
initial_snapshot_on_join | bool | Whether the server includes an initial snapshot on handshake. |
Type SamplingWire
Axis sampling (§7.3).
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | State | none | The value at the end of the tick. | |
| 1 | Delta | none | The sum over the tick. |
Type Schedule
Closed v1 schedule set. 5.8a-substrate ships these four; later sub-steps may extend.
Side affinity is implicit in the variant — see [Schedule::side].
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | ServerStartup | none | Runs once on the server during on_server_world_ready. | |
| 1 | ServerTick | none | Runs every server tick (40 Hz). | |
| 2 | ClientStartup | none | Runs once on the client during on_client_world_ready. | |
| 3 | ClientTick | none | Runs every client tick (40 Hz). |
Type ShapeKind
Shape primitive — currently lines-only (DL-504-06). Future variants (rect, circle, icon) land as additional cases.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Lines | { segments: list<tuple<Vec2, Vec2>>, stroke: Stroke } |
Type Side
Server / client / both side affinity.
Resources, events, and systems are tagged with a Side to determine which ModInstance (per the DualInstance two-world model) receives them at registration time.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Server | none | Server-side only. | |
| 1 | Client | none | Client-side only. | |
| 2 | Both | none | Both server and client; registered on each independently. |
Type SinkWire
A context’s sink.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
keyboard | bool | |||
pointer | bool | |||
gamepad | bool |
Type SlotWire
A binding slot (§8.2).
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | KBM0 | none | ||
| 1 | KBM1 | none | ||
| 2 | PAD0 | none | ||
| 3 | PAD1 | none | ||
| 4 | TOUCH0 | none |
Type StartContext
What the host tells an instance when its world is ready: the
plugin-lifecycle.start(context) payload.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
format_version | u16 | [START_CONTEXT_FORMAT_VERSION] when written by this host. | ||
side | StartSide | The instance’s side. |
Type StartSide
The side a starting instance runs on. Every instance is one side; a singleplayer game runs two instances.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Server | none | The server instance. | |
| 1 | Client | none | The client instance. |
Type Stroke
Stroke geometry (width + color) for Node::Shape rendering.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
width | f32 | |||
color | string |
Type SystemDeclWire
Wire form of a system declaration.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
name | string | |||
schedule | Schedule | |||
read_set | list<u64> | Resource + event read-set (global, keyed by TypeId64). | ||
write_set | list<u64> | Resource + event write-set (global, keyed by TypeId64). | ||
read_components | list<u64> | yes | B2-EC: entity-component read-set — the bridged component types this system may read across the wasm boundary. #[serde(default)] so existing guests that don’t emit it decode to empty. The #[system] macro that lets a guest declare this is a follow-on; until then guests emit empty. | |
write_components | list<u64> | yes | B2-EC: entity-component write-set (applied by the entity bridge after the system runs). Empty until the macro populates it. | |
system_id | option<u32> | yes | Assigned by the host post-collection. None on guest→host; the host fills this in when building its dispatch table. | |
before | list<string> | Schedule-ordering constraints (F3 solver). Targets are namespaced "mod-id:system-name" or the wildcard "mod-id:*". Declared by the guest; consumed by the host-side solver. Empty = no constraints. | ||
after | list<string> |
Type TerrainRecipeWire
A mod-owned recipe for the engine’s bounded scripted terrain evaluator. The local id is namespaced by the host; recipe-internal semantic ids are content identity, not an authority to register in another mod’s namespace.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
local_id | string | |||
recipe_ron | string | |||
baked_recipe_ron | option<string> | yes | Optional material/feature recipe used with immutable baked heightfields. | |
default | bool |
Type TextArg
An argument of a [TextValue::Localized] message.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Literal | string | Untranslated text (bidi-isolated when substituted). | |
| 1 | Bind | BindingPath | A bound value; numbers are formatted for the player’s locale. | |
| 2 | Key | string | Another message key, resolved in the player’s language. |
Type TextDir
Paragraph direction of a text node.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Auto | none | From the text’s first strong letter. The default for bound user data (chat, names, signs). | |
| 1 | Ltr | none | ||
| 2 | Rtl | none | ||
| 3 | Locale | none | From the player’s locale. The default for Localized values. |
Type TextOptions
Text layout properties shared by text-bearing nodes (§5.3 of the text and localization design). All fields default, so existing RON is unchanged.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
dir | option<TextDir> | yes | None: Locale for Localized values, Auto for everything else. | |
overflow_wrap | OverflowWrap | yes | ||
max_lines | option<u16> | yes | Cut after this many lines. None: unlimited. | |
ellipsis | Ellipsis | yes | ||
untranslated | bool | yes | This node’s Literal/Template text is intentionally untranslated (a proper name, a symbol). Silences ui-validate’s warning. |
Type TextValue
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Literal | string | Creator content that is intentionally untranslated: proper names and fixed symbols like “×”. ui-validate warns on it in player-facing UI unless the node sets untranslated: true. | |
| 1 | Bind | BindingPath | ||
| 2 | Template | { format: string, args: list<BindingPath> } | Positional template substitution: {0}, {1}, … reference indices into args. {{/}} escape literal braces. Substitution happens at render time in manifold-ui-runtime. For formatting that doesn’t depend on language ({0} / {1}). | |
| 3 | Localized | { key: string, args?: map<string, TextArg> } | A message key resolved through the catalog of the player’s language, with named arguments: Localized(key: "mymod.shop.buy", args: { "price": Bind("Shop.price") }). Keys are <mod_id>.<segment>…; see manifold_l10n_types::key. |
Type TokenValue
One concrete value a token can carry. Tokens are atomic: they don’t
reference other tokens. Cascading happens at the StyleClass /
theme_override layer.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Color | string | ||
| 1 | Px | f32 | ||
| 2 | Font | FontSpec |
Type TxnProgress
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
chunks_done | u32 | |||
chunks_total | u32 |
Type TxnReject
Why a transaction was refused. Nothing was written.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | NotPermitted | string | The missing node, an identifier. | |
| 1 | Quota | none | The undo record would exceed the owner’s blob quota. | |
| 2 | Unsupported | u16 | An op kind this host does not implement. | |
| 3 | UnknownTarget | none | The volume, or an undo record the transaction names, does not exist. | |
| 4 | Malformed | none | ||
| 5 | ActorUnknown | none | ||
| 6 | Protected | LocalizedText | A protection or review veto, with its reason. | |
| 7 | Unloaded | u32 | Chunks the transaction touches that are not resident (unloaded = reject). | |
| 8 | TooLarge | u64 | Cells the transaction would change, over the cap that applies. | |
| 9 | RegionBusy | none | Overlaps another in-flight transaction. | |
| 10 | WaterBusy | none | ||
| 11 | InvalidValue | u32 | ||
| 12 | Cancelled | none | ||
| 13 | Storage | string | Diagnostic: an undo record could not be read or written. | |
| 14 | Reserved | none | A written cell is reserved (Daedalus’s GridReservations). |
Type TxnResult
One record of a take-results drain.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Status | { id: u64, status: TxnStatus } | The state of one transaction. | |
| 1 | Overflow | { dropped: u32 } | Results dropped because the requester’s ring was full (Talos G §6.8); reported once, on the next drain. |
Type TxnStatus
Where a transaction stands. Pending repeats once per tick while a
multi-tick transaction applies; every other status is final.
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Pending | TxnProgress | ||
| 1 | Committed | TxnSummary | ||
| 2 | Rejected | TxnReject | ||
| 3 | Conflict | ConflictReport | A revert or reapply found cells that no longer hold what its record expects. Nothing was written. |
Type TxnSummary
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
changed_cells | u64 | Cells whose value differs from before the transaction. | ||
skipped_cells | u64 | write-if-unchanged cells skipped because another writer changed them. | ||
chunks | u32 | Chunks with at least one changed cell. | ||
bounds | option<BlockBox> | yes | Bounds of the changed cells; None when nothing changed. | |
record_bytes | u64 | Size of the undo record written, 0 when none was requested. |
Type UiEvent
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | ButtonClicked | { node: NodeId, mods: ModifierSet } | ||
| 1 | SlotDragged | { node: NodeId, from: u32, to: u32, mods: ModifierSet } | Emitted when the user drag-drops one slot onto another slot within the same slot group. node is the slot group’s NodeId; from and to are slot indices within that group. Cross-group moves (source and target in different groups) are not representable in C1 and are silently dropped by the runtime. | |
| 2 | ValueChanged | { node: NodeId, value: BindingValue } | ||
| 3 | Reorder | { node: NodeId, from_index: u32, to_index: u32, mods: ModifierSet } | Emitted when the user drag-reorders an element within a ForEach list. node is the ForEach’s NodeId; from_index and to_index are positions in the list. The host does NOT automatically mutate the list — the mod/game-module handles the reorder in its event handler. | |
| 4 | SlotClicked | { node: NodeId, index: u32, button: ClickButton, mods: ModifierSet } | A single-slot click in a slot group. The “other operand” is the per-player, server-authoritative carried cursor. The guest’s handle_ui_event interprets it (pick / place / swap). v1 emits only button: Left; button/mods are present so RMB / shift-transfer are later additive DATA on this same variant, never a wire-breaking change. | |
| 5 | Closed | none | The player closed this UI window (server-synthesized when a BuiClient::Close tears down a mod-authored UI the player had open). The guest’s handle_ui_event receives it with the SAME read/write bundle as a normal event, so it can react to the close — e.g. return the carried cursor stack to the inventory (anti-loss). The window’s (key, entity) come from the handle call, so the variant itself carries no payload. Never emitted by the client; only the server raises it via the close hook. |
Type UiField
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
name | string | |||
kind | BindingValueKind | |||
element | option<string> | yes | For a List(record) field: the RecordSchemaWire.name describing the element shape. None for every non-record field. A flat SmolStr — NOT a nested struct, so UiField is NON-RECURSIVE. APPEND-ONLY (golden-locked). |
Type UiFieldSchema
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
fields | list<UiField> | |||
record_schemas | list<RecordSchemaWire> | |||
hash | u64 |
Type UiKey
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
namespace | NamespaceId | |||
key | KeyId |
Type UiRegistration
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
key | KeyId | The mod’s per-UI key WITHIN its own namespace. The host composes the full UiKey as UiKey { namespace_for_mod(mod_id), key } at registration — a mod cannot name a foreign namespace. | ||
schema | UiFieldSchema | |||
tree | Node | |||
read_components | list<u64> | |||
write_components | list<u64> | |||
read_resources | list<u64> | |||
write_resources | list<u64> | NOTE: declared resource writes are NOT yet applied in C1 (dropped with a host warning); component writes ARE applied. See ServerBuiWorldView::apply_mod_resource_writes. |
Type UiStateMap
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
schema_hash | u64 | |||
fields | list<tuple<FieldId, BindingValue>> |
Type ValueKindWire
An action’s value kind (§7.3).
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Button | none | A held bit plus edges. | |
| 1 | Axis1D | none | One f32. | |
| 2 | Axis2D | none | Two components. | |
| 3 | Axis3D | none | Three components. | |
| 4 | Command | none | No value: commands only (Items #486). |
Type ValueSource
Enum.
| Index | Variant | Payload | Since | About |
|---|---|---|---|---|
| 0 | Literal | f32 | ||
| 1 | Bind | BindingPath |
Type Vec2
2D float vector used by HUD-layer anchors, offsets, and line segments. Not used by any pre-5.4b widget — purely additive.
Struct.
| Field | Type | Optional | Since | About |
|---|---|---|---|---|
x | f32 | |||
y | f32 |
Packed layouts
None yet.
Opaque bytes
asset-file
Owner: calling mod. Described by the asset’s file format, which its path names; the loader that reads it owns the format.
component-value
Owner: declaring mod. Described by the declaration of the component or resource its TypeId64 names: a mod’s manifest components and resources, or the engine’s own registration.
manifold:ecs/resource-bundle.resource-bundle-handle.insert-entity-component#bytesmanifold:ecs/resource-bundle.resource-bundle-handle.read-entity-component#resultmanifold:ecs/resource-bundle.resource-bundle-handle.read-resource#resultmanifold:ecs/resource-bundle.resource-bundle-handle.write-entity-component#bytesmanifold:ecs/resource-bundle.resource-bundle-handle.write-resource#bytesmanifold:game/ui.ui-read-bundle.read-entity-component#resultmanifold:game/ui.ui-read-bundle.read-resource#resultmanifold:game/ui.ui-rw-bundle.read-entity-component#resultmanifold:game/ui.ui-rw-bundle.read-resource#resultmanifold:game/ui.ui-rw-bundle.write-entity-component#bytesmanifold:game/ui.ui-rw-bundle.write-resource#bytes
console-history
Owner: calling mod. Described by JSON lines, one per append-history call.
mod-config
Owner: calling mod. Described by the mod’s own format for the (scope, key) entry it wrote.
manifold:game/persistent-storage.read-config#resultmanifold:game/persistent-storage.write-config#bytes
mod-log
Owner: calling mod. Described by the mod’s own framing of its session log (typically JSON lines).