Project Description
Clay is a high-performance 2D UI layout library designed for creating complex, responsive layouts with minimal overhead. Key features include microsecond layout performance, a flex-box-like layout model, and a single ~4k LOC header file with zero dependencies. It supports WebAssembly, enabling browser use with a compact 15kb uncompressed .wasm file. Clay uses static arena-based memory management, eliminating malloc/free and reducing memory usage (e.g., ~3.5MB for 8192 elements). It offers a React-like declarative syntax for nested UI structures and is renderer-agnostic, outputting a sorted list of rendering primitives compatible with any 3D engine or HTML. Ideal for high-performance, lightweight UI development.