Skip to content
Konjure / spatial intelligence

Architecture

Rust defines what a scene means. Adapters connect it to the world.

One semantic source of truth

The konjure-sdk crate owns the domain model, compiler, validation, geometry and deterministic runtime. Public JSON Schema and TypeScript definitions are generated from these Rust types. The C header is generated from the Rust FFI exports.

Sourcetext
Konjure DSL ── compiler ── validated SceneDocument

                         Rust runtime + geometry

                   frames · events · effect proposals
                     /             |             \
             WASM / browser    C ABI / Unity    native / Python

The runtime does not own a window, device SDK, graphics handle, database, model connection or network socket. It accepts explicit state and events and produces inspectable outputs.

Modules

ModuleOwns
domainTyped IDs, scene documents, observations, conversation, events and receipts
parserTokens, source spans, grammar and DSL diagnostics
validationVersion, bounds, referential integrity and spatial invariants
geometryPrepared mesh vertices, normals and indices
runtimeDeterministic animation, action state and composed matrices
recordingVersioned decision sequences, scene times and replay bounds

The browser package owns GPU resource lifetime, camera controls, input and WebXR sessions. Unity owns its renderer. The C ABI owns handles and buffer contracts. Applications decide where to store documents and how to connect models or devices.

Generated schemas describe structural shapes. Rust validation additionally checks units, finite ranges, references, topology and resource budgets; a schema validator alone is not an SDK validator.

Separate authored state from evidence

A scene document describes intent. An observation reports evidence with a source frame, clock, sequence, confidence and provenance. An assistant may propose a change using that evidence. The consumer validates the proposal before changing its scene or executing an effect.

Loading a document does not resolve a room anchor. A model confidence score does not prove spatial alignment. An effect proposal does not mean a robot moved.

Runtime profiles

The default crate includes the compiler. A no_std + alloc profile accepts precompiled Rust documents and runs the bounded geometry and behavior without a browser, OS, model provider or WASM engine. It still needs an allocator and floating-point math support.

WASM is a distribution target for the same core. JavaScript remains a small host adapter because browsers expose DOM, input and XR through their own APIs. Bulk geometry and frame transfers reduce boundary overhead; performance still needs measurement on each device.