Incular logoIncular
Introduction

What is Incular?

The mental model behind Incular's declarative retained UI.

Incular is a declarative, retained, reactive native UI framework for Rust. You describe what the UI should look like given the current state; the runtime keeps a persistent tree and updates only what changed.

The five ideas

1. Declarative widgets

Widgets are cheap immutable descriptors, not live objects. Row, Text, Container describe intent; the runtime owns Elements, render objects, and layers. Every widget converts with From<X> for Widget, so children are generic over Into<Widget> and you call .into() per child.

2. Reactive state

Signal<T> is the primitive. Read it during build to subscribe; write it from callbacks to invalidate. Memo caches derivations, Effect runs side effects, Action models async operations with Idle / Loading / Ready / Error state.

3. Retained layout and rendering

Constraints flow down, sizes flow up (Constraints). Paint is recorded once into renderer-neutral commands (Canvas, Paint) and the WGPU backend executes them. Unchanged subtrees keep layout, picture, and text caches warm.

4. Layered design systems

Neutral widgets carry no theme. Add one layer:

  • Button — themed Incular controls (incular::controls_prelude)
  • MaterialApp — Material presentation (incular::material_prelude, implies Controls)

5. One desktop host

Windows, Linux, and macOS share a Winit/WGPU host behind the desktop feature. Android/iOS crates are semantic adapters for a native host, not full runners. There is no web target.

Status

Experimental, pre-0.1.0, intended for early adopters on an evolving API. Per-class rustdoc ships at docs.rs/incular after publication; this site is the application-author reference.

On this page