Documentation menu

Internals

Understand the runtime mechanisms behind view evaluation, layout, scene updates, and rendering.

A UI update moves through several representations before it reaches the display, and each representation has its own ownership and scheduling rules. These guides follow those mechanisms for contributors and advanced integrators, explaining where a change belongs and which invariants it needs to preserve.

Client Update Lifecycle

Within Kit, a model write changes runtime attributes and propagates affected derived computations through the attribute graph. The UI loop separately schedules view evaluation, which produces a candidate tree for layout to resolve. Reconciliation can then compare that geometry and content with the accepted tree to determine the necessary scene operations.

If those operations change the wire scene, the host sends them through IPC and waits for the retained outcome. Acceptance publishes the candidate as the client's new baseline, including its callbacks and ownership. The server then handles rendering and presentation through their own lifecycles.

Implementation Guides

Architectural Boundaries

These representations use different identities because they belong to different owners. Kit's AttrId, layout node ID, and mounted identity describe local runtime structures, whereas protocol node IDs refer to retained server state. The client UiNode tree and server SceneSnapshot likewise serve different stages of the update.

Keep those identities and ownership layers distinct when adding caches, debugging tools, or scheduling shortcuts. A local evaluation result becomes a retained server baseline only through the commit outcome protocol.

Source Reference

The following files in the Hera checkout define the behavior described on this page.

  • crates/kit/docs/INTERNALS.md
  • crates/kit/src/app/mod.rs
  • crates/renderer/src/vulkan/scene/README.md