Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
yuno
A deterministic, declarative UI rendering framework built for bare-metal performance and uncompromised control, powered by Rust and Skia.
The Philosophy
Building complex, animated, and highly interactive graphical interfaces often leads to tangled architectures where state, geometry, and rendering logic leak into one another. yuno establishes strict boundaries inspired by robust system design:
-
Deterministic Spatial Decoupling (The Two-Pass Paradigm) A component should never dictate its absolute position. In
yuno, widgets only express their intent (e.g.,Plan::FillorPlan::Fit). The absolute geometric truth is calculated by an isolatedLayout Planner. This guarantees that rendering logic and layout algorithms never collide, ensuring predictable execution flows. -
Composition over Monoliths Complex widgets are not inherited; they are composed.
yunotreats everything—from a primitive rounded rectangle to a real-time Fast Fourier Transform audio spectrum chart—as equalDrawablecitizens. They are bound together using deterministic containers likeEdgeLayoutorBoxLayout, creating a highly modular visual tree akin to a modern Wayland compositor's scene graph. -
Controlled Mutability & Delta-Based Animations The graphical tree is shared and inherently complex, which traditionally fights against Rust's strict borrow checker.
yunoembraces controlled interior mutability. State transitions happen securely within boundaries, while spatial animations are treated as local delta-transformations (matrix translations) on the canvas, preserving pipeline caches and avoiding expensive global layout recalculations. -
Direct to Metal By leveraging
skia-safealongside Vulkan/EGL backends,yunocuts through the abstraction overhead. You are not writing HTML; you are orchestrating raw pixels and vector primitives with maximum runtime efficiency.
Core Concepts
1. Drawable and Plan
The fundamental trait of the framework. A Drawable only needs to know how to paint itself onto a provided skia_safe::Canvas.
Before drawing, it submits a Plan—a request declaring its preferred sizing constraints on the X and Y axes.
2. The Planner (Layout Management)
Every Drawable internally holds a reference to a Planner. When a component is asked to draw, it queries its Planner to retrieve its planned_drawing_area. The component trusts this bounded absolute area completely, drawing itself precisely within the allocated memory and spatial boundaries.
3. StoryBoard
The temporal layer. Animations in yuno are non-blocking and mathematically precise. Using custom easing functions (like cubic_in_out), the StoryBoard drives state transitions—such as crossfading audio controls or sliding panels—translating time into floating-point progression metrics without mutating the static layout tree.
Quick Look
Here is a conceptual glimpse of how components are composed in yuno:
use ;
use EdgeLayout;
use ;
// Initialize the root layout planner
let root_planner = new;
// Create atomic components
let background = new;
let spectrum_analyzer = new;
// Bind them together declaratively
// The layout engine strictly dictates the final absolute geometry
root_planner.add_child;
root_planner.add_child;
// During the render loop, widgets safely fetch their calculated area and draw
// No layout recalculation occurs during pure matrix translations