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

Concepts

FLUI uses declarative Rust values to describe UI. A new description does not mean throwing away all the UI’s state: reconciliation matches it to retained elements, which own lifecycle and state. Render objects then lay out and paint the result.

View → Element → RenderObject → Layer → flui-engine → wgpu
                    │
                    └→ Semantics

Each part answers a different question:

PartResponsibilityLifetime
ViewWhat UI should this build describe?Immutable configuration replaced during rebuilds.
ElementWhich existing UI identity and state does that description match?Retained while reconciliation preserves its identity.
RenderObjectWhat size, paint output and hit-test behavior does it produce?Retained and updated by its owning element.
LayerHow should painted output be composited?A fresh layer tree is built for each frame.
SemanticsWhat roles, properties and actions should accessibility expose?A separate tree alongside the visual pipeline.

A view that composes other views need not own a render object. Rebuilding a view, laying out a render object and repainting it are separate operations; a change can invalidate the work it needs without recreating the entire pipeline.

Read the concepts in order

From an interaction to a frame

An event callback changes state and requests the affected work. During build, views read state and describe children; reconciliation preserves matching elements. Layout passes constraints down and sizes up, then paint records output for composition. The engine consumes the scene and submits GPU work. The platform and scheduler arrange frames on demand.

Build, layout and paint run synchronously. Async work belongs at the IO and scheduling edges; its results enter UI work through the runtime’s delivery paths. Presentation capabilities such as focus and rebuild handles are acquired in lifecycle hooks, which receive LifecycleContext; build receives BuildContext for describing UI and reading dependencies.

For ownership, frame transactions and crate boundaries, continue with the architecture guide. The Flutter → FLUI mapping can help translate familiar vocabulary; FLUI’s contracts and Rust APIs determine the behavior here.