Skip to content
Axiom/SDK
SDK / Types

Types

Every type in the surface, generated from the IDL as last changed on 2026-10-21. A struct holds scalars and other structs and never a span, so its bytes mean the same thing on both sides of the boundary.

Shared types

Value types no capability owns. A position is a position whoever reads it, so every capability names these without qualifying them.

TYPESfrom the IDL
struct Vec2 { x: f32, y: f32 }
struct Vec3 { x: f32, y: f32, z: f32 }
struct Vec4 { x: f32, y: f32, z: f32, w: f32 }
struct Quat { x: f32, y: f32, z: f32, w: f32 }
struct Transform { position: Vec3, rotation: Quat, scale: Vec3 }
struct Mat4 { c0: Vec4, c1: Vec4, c2: Vec4, c3: Vec4 }
struct Clip { near: f32, far: f32 }

In C each is the same name with Axiom in front, such as AxiomVec3.

Mat4: A 4x4 matrix as four columns, column-major, which is how the camera's view and projection cross. Four Vec4 rather than sixteen floats so the field names say which is which.

Clip: Near and far clip planes, as one answer because they are read together.

Owned by a capability

Most of these are handles: an index and a generation the host checks on every call, so a handle to something that has gone is refused as stale rather than read.

Type
Capability
In C
struct EntityId { index: u32, generation: u32 }
AxiomEntityQueryEntityId
struct Span { address: u64, length: u32 }
none, packs only
struct PanelId { index: u32, generation: u32 }
AxiomUiOverlayPanelId
struct NodeId { index: u32, generation: u32 }
AxiomUiOverlayNodeId
struct HookId { index: u32, generation: u32 }
AxiomHookHookId

Scalars

In the IDL
In C
u32
uint32_t
u64
uint64_t
f32
float
bool
int32_t, 0 or 1
str
const char*, uint32_t length
Blob
Bytes. Sent as a pointer and a length; received into a buffer the mod provides, with the length used written back.

How each of these crosses the boundary is on the guest ABI.