Yuvi GD
YUVI

Tether UI Engine

Tether is the foundational infrastructure needed to construct custom UI libraries. Written in pure C, it features a unified memory kernel, an OS-agnostic hardware bridge, and a modular rendering interface to guarantee absolute control over performance.

Technologies Used

CSokolWebGPUOpenGLlibyamlFontStashCMake

Plugin Info

In Development
startDate: 2026-05-01
platform: Cross-platform (C, OpenGL, WebGPU, Native)

System Topology & Gallery

diagram
1 / 2
100%

Tether 3-Layer Tree Branch Architecture

Tether is engineered to be the LLVM of user interfaces. It provides the robust, high-performance foundation necessary to build entirely custom UI systems without fighting bloated frameworks. Whether developing embedded dashboard screens, in-game overlays, or heavy desktop applications, Tether gives developers the unopinionated tools to build exactly what they need.

At its core, Tether is designed to be incredibly approachable while remaining blazing fast. It achieves this through a Data-Oriented Entity Component System (ECS) architecture. Traditional UI frameworks use scattered objects and deep class hierarchies, causing the CPU to constantly jump around in memory. Tether packs UI data into perfectly flat, contiguous arrays. When the engine processes layout or rendering, the CPU reads memory sequentially, resulting in massive CPU cache hits and unprecedented speed.

The rendering philosophy is a true Hybrid approach. It doesn't force you into a strict Retained Mode or a pure Immediate Mode. Because it is backed by the ECS, Tether can cache static UI elements in retained buffers for near-zero cost, while simultaneously allowing volatile, highly-dynamic widgets to be rebuilt every frame just like an immediate mode GUI.

Building UIs in Tether is just as flexible. You can construct your entire interface programmatically in pure C, or you can write declarative YAML files that the engine parses live. Most importantly, you can use a hybrid workflow: define your static layout and styling in YAML, and then attach your dynamic C logic and event handlers at runtime. This provides the rapid iteration of development with the raw performance of native C.

Looking forward, the ultimate vision includes Ahead-Of-Time compiled binary UI formats. Developers will define visual identities in high-level domain languages and compile them into instantaneous machine instructions. Tether is not just another UI library. It is the definitive canvas for the next generation of software interfaces.

Core Capabilities

Data-Oriented ECS Kernel: Packs UI components into perfectly contiguous dense arrays to guarantee maximum CPU cache hits and zero heap fragmentation.

Hybrid Rendering Pipeline: Seamlessly blends retained-mode caching for static elements with immediate-mode dynamism for volatile widgets.

Hybrid UI Instantiation: Construct interfaces using pure C code, declarative live-parsed YAML, or a hybrid combination of both.

Strict Architectural Decoupling: Absolute isolation between Memory management, OS windowing, and GPU rendering.

Container-Agnostic Layout Engine: A blazing-fast 2-pass (Measure & Arrange) traversal supporting custom mathematical strategies like Flexbox or Grid.

Spatial Culling Input Pipeline: Ultra-efficient hit-testing via Reverse Depth-First Search for pixel-perfect event dispatching.

Architectural Implementation

01The Kernel (Data-Oriented ECS)

The memory backbone is a pure C Entity Component System built on Data-Oriented Design principles. By packing components into perfectly contiguous dense arrays and using swap-and-pop deletion, the Kernel eliminates scattered pointer chasing. This design ensures maximum CPU cache hits during iteration, yielding massive performance gains.

02Hybrid Render Engine

Rather than strictly forcing retained or immediate mode, Tether uses a Hybrid philosophy based on its ECS state. Static elements are cached in command buffers for near-zero CPU cost per frame, while volatile elements can be rebuilt dynamically every frame like an immediate mode GUI. The RHI consumes these standardized command buffers to support WebGPU and OpenGL via Sokol.

03Container-Agnostic Layout Engine

The Engine executes a rigorous two-pass tree traversal algorithm. The first pass is a bottom-up Measure phase where leaf nodes calculate their intrinsic constraints. The second pass is a top-down Arrange phase where parent containers distribute available space using registered mathematical rules, supporting everything from Flexbox to Absolute positioning.

04Widget Factory & Hybrid Instantiation

UI construction in Tether is incredibly flexible. Developers can build interfaces procedurally via pure C code, declaratively through YAML files, or use a powerful hybrid approach where YAML defines the static visual skeleton while C code injects dynamic logic and event callbacks at runtime.

05AST-Based YAML Parser

Tether features a robust internal parser that reads YAML markup and generates an Abstract Syntax Tree (AST). This AST is deeply integrated with the Widget Factory, allowing rapid iteration, styling, and dynamic UI generation without recompiling the core C application.

06Hardware Abstraction Layer (HAL)

Serving as the cross-platform bridge, the HAL completely abstracts OS-level window management, the main application loop, and raw hardware input. It normalizes native OS events into generic Tether Pointer Events, ensuring the core engine remains platform-agnostic.

07Spatial Input Pipeline

The event system handles input by executing a Reverse Depth-First Search over the hierarchy tree. By utilizing immediate spatial culling, it performs hyper-accurate hit testing to perfectly dispatch lifecycle events like hovering, pressing, and clicking to the correct widgets.

Current State & Next Milestones

WORK IN PROGRESS
  • Implemented the pure C ECS Kernel with dense array packing and memory safety.
  • Developed the container-agnostic layout system with a two-pass tree traversal.
  • Integrated modular backends for cross-platform rendering capabilities.
  • Built a live YAML parser with AST support for dynamic UI generation.
  • Next: Implement Ahead-Of-Time binary compilation for UI templates.
  • Next: Finalize native WebGPU backend integration for next-generation rendering.
  • Next: Expand the Layout Strategy Registry to natively support advanced Grid systems.

Yuvi GD

Game Developer & 3D Artist crafting immersive digital experiences. Pushing the boundaries of interactive technology.

Services

  • Game Development
  • Technical Art & Pipeline
  • Full-Stack Web Development
  • Custom Software Solutions
  • Utilities & Network Systems

Get In Touch

Email:
Yuvi_GD@outlook.com

Discord:
yuvi_gd

© 2026 Yuvi GD. All rights reserved.

Built with Next.js, Three.js & Tailwind CSS