Skip to content
hikari
RenderingEditorAIToolchainDocumentation
Download

© 2026 Flying Rat Studio.
All rights reserved.

Explore the engineDocumentationContributorsDownloadLicenseBack to top
Documentation / Language reference
Browse docs
Overview
Tutorials17
OverviewPlay, Edit, and scenesFirst UI documentFirst game projectFirst entityComponent properties and the inspectorFirst mesh and materialFirst physics body and triggerFirst character controllerFirst session servicesFirst UIFirst input actionFirst messagesFirst runtime spawnFirst motionFirst skeletal animationAssets in Play (soft refs and hot reload)Dynamic editor recompile
Guides25
OverviewWorking in the editorDevelopment guideGameplay APIActor and component lifecycleThreads, jobs, events, and routinesGameplay AI tasksGame AI: perception and movement playgroundBrain assetsBrain execution for swarm populationsLocalizationGame cursorsChoosing component storageBuild and packagingProject filePluginsHikari Plugin APIData-driven content, JSON, and pathsScripting with KawaShader authoringChoosing and scaling shadowsTime of dayUser interfaceUI layoutUI widgetsMigration from Unity / Unreal
Systems32
OverviewArchitectureApplication lifecycleFrontends and driversPlatforms and supportSession services and cross-scene stateScenes and gameplayActor communication (hi.actors)Game-facing refsSave / replication wire versionCoordinate space and camera conventionsRenderingRenderer architecture mapFrame governorPipeline compilationSkeletal animationGPU particlesVisual ZonesVolumetric mediaInputAudioPhysicsMotion KitTemporal KitUI documentsAssets and ShinraPrefabsAsset residencyAsset formats (Shinra pipeline)Document schemasUI and editorEditor asset hot reloadEditor Project Selector
Language reference3
OverviewAkari GPU ABIAkari language referenceKawa language reference
Engine overview
Start exploring
  • No matching sections. Try fewer words or another topic.
NavigateEnter Openesc Close
Overview
Tutorials17
OverviewPlay, Edit, and scenesFirst UI documentFirst game projectFirst entityComponent properties and the inspectorFirst mesh and materialFirst physics body and triggerFirst character controllerFirst session servicesFirst UIFirst input actionFirst messagesFirst runtime spawnFirst motionFirst skeletal animationAssets in Play (soft refs and hot reload)Dynamic editor recompile
Guides25
OverviewWorking in the editorDevelopment guideGameplay APIActor and component lifecycleThreads, jobs, events, and routinesGameplay AI tasksGame AI: perception and movement playgroundBrain assetsBrain execution for swarm populationsLocalizationGame cursorsChoosing component storageBuild and packagingProject filePluginsHikari Plugin APIData-driven content, JSON, and pathsScripting with KawaShader authoringChoosing and scaling shadowsTime of dayUser interfaceUI layoutUI widgetsMigration from Unity / Unreal
Systems32
OverviewArchitectureApplication lifecycleFrontends and driversPlatforms and supportSession services and cross-scene stateScenes and gameplayActor communication (hi.actors)Game-facing refsSave / replication wire versionCoordinate space and camera conventionsRenderingRenderer architecture mapFrame governorPipeline compilationSkeletal animationGPU particlesVisual ZonesVolumetric mediaInputAudioPhysicsMotion KitTemporal KitUI documentsAssets and ShinraPrefabsAsset residencyAsset formats (Shinra pipeline)Document schemasUI and editorEditor asset hot reloadEditor Project Selector
Language reference3
OverviewAkari GPU ABIAkari language referenceKawa language reference
Engine overview
Language reference2 min read

Akari GPU ABI

On this page
On this pageScalar and vectorMatricesStructsArraysBuffer kindsEndiannessValidation Back to top

Self-contained layout rules. Akari never links engine code; hosts must match these offsets on the CPU.

Language syntax: docs/reference/akari-language.md. Grammar: syntax.ebnf. Product shader packaging: docs/guides/shaders.md.

Scalar and vector

TypeSizeUniform alignStorage align
bool4 (0/1 as u32)44
i32 / u32 / f32444
uint64 / u64888
float2 / int2 / uint2884
float3 / int3 / uint312164
float4 / int4 / uint416164

Matrices

Column-major. Each column is a vector with the alignment rules above.

TypeUniform size (rounded)Notes
float4x4644 × float4
float3x3483 × float3 padded to 16 per column in uniform

Structs

  • Alignment = max member alignment
  • Size rounded up to struct alignment
  • Members laid out in declaration order with padding for alignment
  • No bitfields
  • @packed on a struct forces storage packing for that type even when nested under a uniform context (tight member align; no std140 float3 padding). Use only for storage/vertex-like payloads that the CPU mirrors the same way.
akari
@packed
struct PackedV {
    a: float
    b: float3   // offset 4, size 12 under storage rules
}

Arrays

ContextElement stride
Uniform / constanteach element aligned to 16 (std140 array rule)
Structured / storage (Buf / RwBuf)tightly packed to element size/align
Inside @packed structstorage packing (tight)

Buffer kinds

Authoring typeLayout rules
Uniform<T>uniform/constant (std140-like)
Buf<T> / RwBuf<T>structured/storage packing
AtomicBuf<T>storage packing

Endianness

Little-endian (documented assumption).

Validation

Layout queries use checked 32-bit sizes and offsets. Recursive value types, unknown types, and arithmetic overflow are compilation errors; layouts are memoized per type and packing class. Layout traversal also diagnoses excessively deep value-type nesting. Use akari transpile --dump-layout for JSON offsets/sizes. Host CI that compares CPU mirrors is optional and lives outside Akari.

PreviousReferenceNext Akari language reference

Documentation follows the current engine checkout.

Snapshot 86f12d68Source docs/reference/akari-abi.md
On this pageScalar and vectorMatricesStructsArraysBuffer kindsEndiannessValidation Back to top