Skip to content

ludus::runtime::game_host::protocol

Ludus Wiki · API overview · Browse API

Namespace

Declared in modules/runtime/game_host/include/ludus/runtime/game_host/protocol.h

Enumerations

CommandKind

enum class CommandKind : uint32
Editor/supervisor -> host commands (design 10 minimum set).
The 32-bit base is a fixed ABI wire width, not a value-count choice.

Related types: uint32

Hello

Hello = 0

Status

Status = 1

Load

Load = 2

Pause

Pause = 3

Resume

Resume = 4

Step

Step = 5

Reload

Reload = 6

ReadProperties

ReadProperties = 7

ApplyEdits

ApplyEdits = 8

ReloadAsset

ReloadAsset = 9

Stop

Stop = 10

ScriptDebug

ScriptDebug = 11
ABI 1.1 capability-gated debugger extension over the existing control channel. Carries extension=1, expected_generation and bounded payload; request IDs retain/reconcile results like other mutations. Unsupported modules reject it without entering a provider.

Declared in modules/runtime/game_host/include/ludus/runtime/game_host/protocol.h

EventKind

enum class EventKind : uint32
Host -> editor/supervisor events (design 10).

Related types: uint32

SessionReady

SessionReady = 0

ModuleReady

ModuleReady = 1

CommandResult

CommandResult = 2

PropertiesChanged

PropertiesChanged = 3

ReloadPhase

ReloadPhase = 4

SessionEnded

SessionEnded = 5

FramePresented

FramePresented = 6

Declared in modules/runtime/game_host/include/ludus/runtime/game_host/protocol.h

CommandStatus

enum class CommandStatus : uint32
Terminal command status.
Reuses the editor failure vocabulary plus the new explicit statuses required by the design. Ordinary returned failure, native HostFailed and CleanupUnknown stay distinguishable.

Related types: uint32

Ok

Ok = 0

InvalidRequest

InvalidRequest = 1

Busy

Busy = 2

IncompatibleModule

IncompatibleModule = 3

Superseded

Superseded = 4

ReloadRejected

ReloadRejected = 5

RestartRequired

RestartRequired = 6

StaleRevision

StaleRevision = 7

SchemaChanged

SchemaChanged = 8

ProtocolError

ProtocolError = 9

HostFailed

HostFailed = 10

CleanupUnknown

CleanupUnknown = 11

Declared in modules/runtime/game_host/include/ludus/runtime/game_host/protocol.h

ReloadPhase

enum class ReloadPhase : uint32
Reload phases reported in a ReloadPhase event (design 4/7).

Related types: uint32

Validate

Validate = 0

Quiesce

Quiesce = 1

Snapshot

Snapshot = 2

Stage

Stage = 3

Commit

Commit = 4

Retire

Retire = 5

Rejected

Rejected = 6

Done

Done = 7

Declared in modules/runtime/game_host/include/ludus/runtime/game_host/protocol.h

Constants and variables

kProtocolVersion

constexpr uint32 ludus::runtime::game_host::protocol::kProtocolVersion = 1

Related types: uint32

Declared in modules/runtime/game_host/include/ludus/runtime/game_host/protocol.h

kMaxControlFrameBytes

constexpr usize ludus::runtime::game_host::protocol::kMaxControlFrameBytes = static_cast<usize>(64) * 1024
64 KiB control frame

Related types: usize

Declared in modules/runtime/game_host/include/ludus/runtime/game_host/protocol.h

kMaxSchemaTransferBytes

constexpr usize ludus::runtime::game_host::protocol::kMaxSchemaTransferBytes = static_cast<usize>(256) * 1024
256 KiB schema transfer

Related types: usize

Declared in modules/runtime/game_host/include/ludus/runtime/game_host/protocol.h

kMaxPendingCommands

constexpr uint32 ludus::runtime::game_host::protocol::kMaxPendingCommands = 128
128 pending commands

Related types: uint32

Declared in modules/runtime/game_host/include/ludus/runtime/game_host/protocol.h

kMaxCommandQueueBytes

constexpr usize ludus::runtime::game_host::protocol::kMaxCommandQueueBytes = static_cast<usize>(1024) * 1024
1 MiB total command queue

Related types: usize

Declared in modules/runtime/game_host/include/ludus/runtime/game_host/protocol.h

kMaxPropertyBatch

constexpr uint32 ludus::runtime::game_host::protocol::kMaxPropertyBatch = 64
64 property values per batch

Related types: uint32

Declared in modules/runtime/game_host/include/ludus/runtime/game_host/protocol.h

kMaxRetainedResults

constexpr uint32 ludus::runtime::game_host::protocol::kMaxRetainedResults = 128
mutation-result ledger

Related types: uint32

Declared in modules/runtime/game_host/include/ludus/runtime/game_host/protocol.h

kMaxStringFieldBytes

constexpr usize ludus::runtime::game_host::protocol::kMaxStringFieldBytes = 4096
4 KiB string field

Related types: usize

Declared in modules/runtime/game_host/include/ludus/runtime/game_host/protocol.h

Functions

CommandKindName

std::string_view ludus::runtime::game_host::protocol::CommandKindName(CommandKind kind) noexcept

Related types: CommandKind

Declared in modules/runtime/game_host/include/ludus/runtime/game_host/protocol.h

EventKindName

std::string_view ludus::runtime::game_host::protocol::EventKindName(EventKind kind) noexcept

Related types: EventKind

Declared in modules/runtime/game_host/include/ludus/runtime/game_host/protocol.h

CommandStatusName

std::string_view ludus::runtime::game_host::protocol::CommandStatusName(CommandStatus status) noexcept

Related types: CommandStatus

Declared in modules/runtime/game_host/include/ludus/runtime/game_host/protocol.h

ReloadPhaseName

std::string_view ludus::runtime::game_host::protocol::ReloadPhaseName(ReloadPhase phase) noexcept

Related types: ReloadPhase

Declared in modules/runtime/game_host/include/ludus/runtime/game_host/protocol.h

Aliases

uint32

using ludus::foundation::core::uint32 = std::uint32_t
Exact 32-bit unsigned integer for explicit-width values.

Declared in modules/runtime/game_host/include/ludus/runtime/game_host/protocol.h

uint64

using ludus::foundation::core::uint64 = std::uint64_t
Exact 64-bit unsigned integer for explicit-width values.

Declared in modules/runtime/game_host/include/ludus/runtime/game_host/protocol.h

usize

using ludus::foundation::core::usize = std::size_t
Native unsigned size/index type; matches sizeof and container sizes, not a wire format.

Declared in modules/runtime/game_host/include/ludus/runtime/game_host/protocol.h