Skip to content

ludus::runtime::game_api

Ludus Wiki · API overview · Browse API

Namespace

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/abi.h

Enumerations

Status

enum class Status : uint32
Explicit status for every boundary call.
Ok is always success. The host never treats a non-zero status as a crash; native crashes/hangs are host failures handled by the supervisor, not catchable reload statuses (design 6/7). The 32-bit base is a fixed part of the ABI wire layout, not a value-count choice.

Related types: uint32

Ok

Ok = 0

InvalidArgument

InvalidArgument = 1

Unsupported

Unsupported = 2

IncompatibleAbi

IncompatibleAbi = 3

IncompatibleIdentity

IncompatibleIdentity = 4

BufferTooSmall

BufferTooSmall = 5

StaleRevision

StaleRevision = 6

SchemaChanged

SchemaChanged = 7

OutOfRange

OutOfRange = 8

NotPrepared

NotPrepared = 9

MigrationUnsupported

MigrationUnsupported = 10

Internal

Internal = 11

ScriptPaused

ScriptPaused = 12
Update suspended a partial authoritative tick at a script safepoint. Valid only with ScriptDebug; control/platform pumping continues, simulation does not. The module must retire a stopped VM before Destroy returns.

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/abi.h

Capability

enum class Capability : uint32
Optional capabilities a module advertises in its metadata.
Mandatory operations (Query/Create/Destroy/Update) are always present; these flags gate the reload and live-edit tables. A module lacking Reload offers only Restart. The 32-bit base is the fixed ABI capability bitset width.

Related types: uint32

None

None = 0

Reload

Reload = 1u << 0

Properties

Properties = 1u << 1

AssetReload

AssetReload = 1u << 2

ScriptDebug

ScriptDebug = 1u << 3
ABI 1.1 bounded, owner-thread debugger request/response and script pause. Requires ProcessScriptDebug in the negotiated table; no VM pointer crosses.

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/abi.h

PropertyKind

enum class PropertyKind : uint32
Supported property value kinds for this phase: bool, int32, finite float32, enum and bounded UTF-8 string (design 9).
Fixed 32-bit ABI wire width.

Related types: uint32

Bool

Bool = 0

Int32

Int32 = 1

Float32

Float32 = 2

Enum

Enum = 3

String

String = 4

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/properties.h

PropertyScope

enum class PropertyScope : uint32
Persistence scope: whether a value is a persistable authored parameter or a read-only simulation field.
Only persistable fields reach Apply to Document. Fixed 32-bit ABI wire width.

Related types: uint32

SessionOnly

SessionOnly = 0

Persistable

Persistable = 1

ReadOnly

ReadOnly = 2

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/properties.h

LogSeverity

enum class LogSeverity : uint32
Diagnostic severity mirrored across the ABI as an explicit integer.
The host maps these onto LUDUS_LOG_* so the module needs no logging headers. The 32-bit base is a fixed part of the ABI wire layout.

Related types: uint32

Trace

Trace = 0

Debug

Debug = 1

Info

Info = 2

Warning

Warning = 3

Error

Error = 4

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/services.h

Aliases

GetGameApiFn

using ludus::runtime::game_api::GetGameApiFn = Status (*)(uint32 hostAbiMajor, uint32 hostAbiMinor, GameApiTable* outTable) noexcept
Entry function signature.
The module fills *outTable up to the host-provided StructSize and returns Ok, or IncompatibleAbi when AbiMajor disagrees.

Related types: uint32 · Status · GameApiTable

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/api.h

uint32

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

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/abi.h

uint64

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

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/abi.h

uint8

using ludus::foundation::core::uint8 = std::uint8_t
Exact 8-bit unsigned integer for explicit-width values.

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/abi.h

float32

using ludus::foundation::core::float32 = float
IEEE binary32 scalar; does not select rounding, trap or denormal policy.

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/properties.h

int32

using ludus::foundation::core::int32 = std::int32_t
Exact 32-bit signed integer for explicit-width values.

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/properties.h

uint32

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

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/properties.h

uint64

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

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/properties.h

uint8

using ludus::foundation::core::uint8 = std::uint8_t
Exact 8-bit unsigned integer for explicit-width values.

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/properties.h

float32

using ludus::foundation::core::float32 = float
IEEE binary32 scalar; does not select rounding, trap or denormal policy.

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/services.h

float64

using ludus::foundation::core::float64 = double
IEEE binary64 scalar; does not select rounding, trap or denormal policy.

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/services.h

uint32

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

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/services.h

uint64

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

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/services.h

uint8

using ludus::foundation::core::uint8 = std::uint8_t
Exact 8-bit unsigned integer for explicit-width values.

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/services.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_api/include/ludus/runtime/game_api/services.h

Constants and variables

kAbiMajor

constexpr uint32 ludus::runtime::game_api::kAbiMajor = 1
ABI major version.
Bumped on any incompatible layout/semantics change. The host rejects a module whose AbiMajor differs before calling Create.

Related types: uint32

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/abi.h

kAbiMinor

constexpr uint32 ludus::runtime::game_api::kAbiMinor = 1
ABI 1.1 appends the optional ScriptDebug callback; common-prefix negotiation preserves modules that advertise only earlier capabilities.

Related types: uint32

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/abi.h

kIdentityMax

constexpr uint32 ludus::runtime::game_api::kIdentityMax = 256
Maximum byte length of an opaque identity string in module metadata.
Keeps every metadata record a bounded POD; the host validates lengths before use.

Related types: uint32

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/abi.h

kFrameClearAssetId

constexpr foundation::uint64 ludus::runtime::game_api::kFrameClearAssetId = 0x1000000000000001ULL

Related types: foundation::uint64

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/frame_clear.h

kFrameClearArtifactBytes

constexpr foundation::usize ludus::runtime::game_api::kFrameClearArtifactBytes = 24

Related types: foundation::usize

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/frame_clear.h

kMaxObjects

constexpr uint32 ludus::runtime::game_api::kMaxObjects = 256

Related types: uint32

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/properties.h

kMaxProperties

constexpr uint32 ludus::runtime::game_api::kMaxProperties = 4096

Related types: uint32

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/properties.h

kMaxStringBytes

constexpr uint32 ludus::runtime::game_api::kMaxStringBytes = 4096

Related types: uint32

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/properties.h

kMaxEditBatch

constexpr uint32 ludus::runtime::game_api::kMaxEditBatch = 64

Related types: uint32

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/properties.h

kMaxLabelBytes

constexpr uint32 ludus::runtime::game_api::kMaxLabelBytes = 64

Related types: uint32

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/properties.h

Functions

operator|

constexpr Capability ludus::runtime::game_api::operator|(Capability a, Capability b) noexcept

Related types: Capability

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/abi.h

HasCapability

constexpr bool ludus::runtime::game_api::HasCapability(uint32 bits, Capability c) noexcept

Related types: uint32 · Capability

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/abi.h

WriteCheckpointUint

bool ludus::runtime::game_api::WriteCheckpointUint(ByteSpan bytes, uint64 value) noexcept

Related types: uint64 · ByteSpan

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/checkpoint.h

ReadCheckpointUint

uint64 ludus::runtime::game_api::ReadCheckpointUint(const uint8 *bytes, usize width) noexcept

Related types: uint64 · uint8 · usize

Declared in modules/runtime/game_api/include/ludus/runtime/game_api/checkpoint.h