The retained runtime
Alicorn’s shorthand is direct to write, retained to run.
Your application describes the UI with ordinary control flow. Alicorn keeps the runtime identity and derived products needed to preserve interaction and avoid repeating work that has not become dirty.
Ownership stays explicit
Section titled “Ownership stays explicit”Your application owns its data and decisions. Alicorn does not inspect arbitrary Odin memory or infer that one of your fields changed. The native host owns the window, input pump, event loop, GPU submission, and platform services.
application state │ logical change or user action ▼explicit invalidation │ ▼Odin UI description │ stable call sites and keys ▼retained identity, interaction, geometry, text, paint │ dirty stages only ▼native host presentsThe high-level alicorn:ui package writes into the same retained
runtime as the lower-level API. It does not create a second widget tree or an
application state store.
What Alicorn retains
Section titled “What Alicorn retains”Stable node identity allows the runtime to associate focus, selection, scroll, layout, text products, semantic information, and paint with logical controls across descriptions. A description may run after an interaction or state change; retained identity keeps the control from becoming a new object each time.
The application still decides what changed. See Invalidation and identity for that contract.
The host is a separate boundary
Section titled “The host is a separate boundary”The native host translates platform input, manages the event loop, and submits GPU work. Application code receives typed capabilities and UI context; it does not receive SDL command buffers or render-pass pointers. That separation keeps UI intent portable across Alicorn’s lower-level runtime and native host.