Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Crate map

The authoritative map of the workspace: every crate, its one-line role, the dependency direction, and a flat “where things live” lookup.

Why this layering exists is the CLAD concept page. This page is the lookup table CLAD defers to.

The crates

Khora is 16 crates: 13 khora-* plus sandbox, xtask, and hub. Twelve khora-* crates are workspace members; khora-macros is a path crate (a build-dependency of khora-data, not a workspace member).

CrateOne-line role
khora-coreThe trait floor — traits, math, GORNA types, the Runtime containers, scene format. Depends on nothing else in the workspace.
khora-macrosThe #[derive(Component)] proc macro (path crate).
khora-dataCRPECS ECS, component storage, SoA/AGDF layout, Flows, scene serialization strategies.
khora-controlThe DCC, GORNA arbitration, cost model, scheduler, the Substrate Pass.
khora-lanesHot-path Lanes — render, physics, audio, asset, scene, UI; the WGSL shaders.
khora-agentsStrategist Agents — one per LaneKind — plus PhysicsQueryService.
khora-infraConcrete backends: wgpu, Rapier3D, CPAL, Taffy, winit, native telemetry.
khora-ioAsset service, VFS, serialization service, pack/file loaders.
khora-telemetryMetrics, monitors, telemetry events.
khora-pluginsPlugin loading and registration.
khora-sdkThe single public API for game developers (façade).
khora-editorThe editor application built on the SDK (panels, gizmos, dock).
khora-runtimeThe generic player binary, stamped with packed assets.
sandboxExample game using the SDK (examples/sandbox).
xtaskBuild automation (cargo xtask …).
hubProject manager / engine launcher.

Dependency direction

Dependencies flow downward only — never introduce a cycle:

khora-core
  └─► khora-data / khora-control  (and khora-macros, khora-telemetry)
        └─► khora-lanes
              └─► khora-agents
                    └─► khora-infra
                          └─► khora-sdk
                                └─► khora-editor / khora-runtime / sandbox
graph LR
    subgraph User
        SDK[khora-sdk]
        ED[khora-editor]
    end
    subgraph Engine
        CTRL[khora-control]
        AGT[khora-agents]
        LANE[khora-lanes]
        IO[khora-io]
        DATA[khora-data]
        CORE[khora-core]
        INFRA[khora-infra]
        TELE[khora-telemetry]
    end
    subgraph Support
        MACRO[khora-macros]
        PLUG[khora-plugins]
    end
    SDK --> CTRL
    SDK --> AGT
    SDK --> IO
    SDK --> INFRA
    SDK --> TELE
    SDK --> DATA
    CTRL --> CORE
    AGT --> CORE
    AGT --> DATA
    AGT --> LANE
    AGT --> IO
    LANE --> CORE
    LANE --> DATA
    IO --> CORE
    IO --> DATA
    IO --> TELE
    DATA --> CORE
    DATA --> MACRO
    INFRA --> CORE
    INFRA --> DATA
    TELE --> CORE
    ED --> SDK
    ED --> AGT
    ED --> IO

Abstract traits live in khora-core; concrete backends live in per-backend subfolders under khora-infra (graphics/wgpu/, physics/rapier/, audio/cpal/, ui/taffy/, …). Changing a khora-core trait means updating every downstream implementation in the same change.

Where things live

A flat lookup for “I want to find X.”

ConcernCrate / module
Lane traitkhora-core::lane
Agent traitkhora-core::agent
Math typeskhora-core::math
GORNA typeskhora-core::control::gorna
Runtime containers (Services / Backends / Resources)khora-core::runtime
Scene file format + SerializationGoalkhora-core::scene
ECS World and componentskhora-data::ecs
Component storage / pages / archetypeskhora-data::ecs
Flows (read-only projectors)khora-data::flow
Scene serialization strategieskhora-data::scene
VFS and asset loadingkhora-io::asset, khora-io::vfs
Serialization servicekhora-io::serialization
Render pipelineskhora-lanes::render_lane
WGSL shaderskhora-lanes::render_lane::shaders
Physics laneskhora-lanes::physics_lane
Audio laneskhora-lanes::audio_lane
Asset decoder laneskhora-lanes (asset-loader lanes)
Scene / transform laneskhora-lanes::scene_lane
Agent implementationskhora-agents
Scheduler and GORNA arbitrationkhora-control
wgpu backendkhora-infra::graphics::wgpu
Rapier backendkhora-infra::physics::rapier
CPAL backendkhora-infra::audio::cpal
Taffy backendkhora-infra::ui::taffy
Resource monitorskhora-infra::telemetry
User-facing APIkhora-sdk
Editor UIkhora-editor
Sandbox appexamples/sandbox

The descent through these crates — Control → Agent → Lane → Data — is explained in CLAD. The public surface of khora-sdk is mapped in SDK surface.