5 unstable releases

Uses new Rust 2024

new 0.13.1 Feb 12, 2026
0.13.0 Feb 7, 2026
0.12.2 Jan 25, 2026
0.12.0 Jan 22, 2026
0.11.0 Jan 18, 2026

#216 in Caching


Used in 6 crates (via repose-ui)

GPL-3.0-or-later

140KB
3.5K SLoC

repose-tree

Persistent view tree with incremental reconciliation.

Instead of rebuilding the entire view tree every frame, this module maintains a persistent tree structure that:

  1. Stable Identity: Nodes have stable IDs across frames
  2. Change Detection: Content hashing identifies what changed
  3. Incremental Updates: Only changed subtrees are processed
  4. Layout Caching: Unchanged nodes keep their cached layout

Architecture

┌─────────────────────────────────────────────────────────┐
│ ViewTree │
│ ┌─────────────────────────────────────────────────────┐│
│ │ nodes: SlotMap<NodeId, TreeNode> ││
│ │ root: NodeId ││
│ │ dirty: FxHashSet<NodeId> ││
│ │ generation: u64 ││
│ └─────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ TreeNode │
│ ┌─────────────────────────────────────────────────────┐│
│ │ id: NodeId ││
│ │ view_id: ViewId (stable user-facing ID) ││
│ │ kind: ViewKind ││
│ │ modifier: Modifier ││
│ │ children: SmallVec<[NodeId; 4]> ││
│ │ parent: Option<NodeId> ││
│ │ content_hash: u64 ││
│ │ layout_cache: Option<LayoutCache> ││
│ │ generation: u64 ││
│ └─────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────┘

Dependencies

~2.5–3.5MB
~62K SLoC