Taffy is a layout engine that calculates the size and position of user interface components. It is a language-agnostic tool that computes element geometry using Flexbox and Grid algorithms.
The engine operates on custom tree structures and node storage through a trait-based interface. This design allows it to be integrated into various programming languages and custom memory management systems.
The system handles UI layout computation, including leaf node measurement and floating point pixel snapping to prevent blurring on displays. It utilizes layout result caching to avoid redundant calculations for unchanged elements.