# llimphi > Native UI framework — 2D **and** 3D: HAL · raster · layout · text · theme · ui · 3D voxel engine — plus widgets and modules. `llimphi` is a sovereign, retained-mode UI framework with an Elm-style loop (`input → update → view → layout → raster → present`). Declarative pipeline over `vello` 0.9 + `wgpu` 29 + `taffy` 0.12 + `parley` 0.6, with `Dark/Light/Aurora/Sunset/Tawa` themes, AccessKit accessibility and a multi-platform HAL (Wayland · X11 · Win32 · Android · Wawa bare-metal). It powers a full Rust application suite; this repository is the framework extracted to stand on its own.

Llimphi showreel — real widgets (switch, slider, progress, segmented control, buttons, radial) animating live, then reflowing across layouts
real widgets in motion — rendered headless, frame-by-frame, fully deterministic

Frame from the 15-second Llimphi tour: a voxel island under a snow-capped Andean peak, a character celebrating while a hand writes llimphi in cursive
▶ 15-second tour — a terminal prompt turns into a glass input, nine real widgets unfold, then a 3D sky, a 2.5D corridor and an endless voxel world under a snowy peak. Every frame is painted by llimphi.

counter example — the full Elm loop in ~124 LOC
…and the entire Elm loop in ~124 LOC — cargo run -p llimphi-ui --example counter

## Not just 2D — a 3D voxel engine

Flying over an endless procedural voxel world — rendered by llimphi-3d
flying over an endless voxel world — rendered headless by llimphi-3d, frame-by-frame

`llimphi-3d` is a **3D engine** on the same `wgpu`: it composes voxels (a GPU ray-march) and triangle meshes in one shared depth pass, with a keyframed cinema camera. It mounts into the ordinary 2D `View` tree through the GPU paint node (`set_viewport` + scissor), so a 3D viewport can live in a panel next to regular widgets — no second window, same Elm loop. `llimphi-voxel` adds the *content* layer on top: procedural world-gen (`WorldRecipe`), articulated characters (age + animation clips) and a scripted scene **director**. The GIF above is one such world. (A full voxel **world studio** — edit worlds, cast characters, direct filmed scenes, export to video — is built on these in the wider project.) **Usage manual:** [MANUAL.md](MANUAL.md) — full reference (Elm loop, `View` DSL, the 79 widgets and 11 modules, GPU path, gotchas) for humans and AI. Design rationale and roadmap: [SDD.md](SDD.md). Philosophy: **widgets aren't designed against mockups; they're designed with what `vello` and `taffy` can do.** ## Quick start ```sh git clone https://git.tawasuyu.net/tawasuyu/llimphi.git cd llimphi cargo run -p llimphi-ui --example counter # ~124 LOC: the full Elm loop on screen cargo run -p llimphi-gallery --release # the widget gallery ``` ## Install From git — this repository is the current tree (widgets are one crate each — pull only what you use): ```toml [dependencies] llimphi-ui = { git = "https://git.tawasuyu.net/tawasuyu/llimphi.git" } llimphi-theme = { git = "https://git.tawasuyu.net/tawasuyu/llimphi.git" } llimphi-widget-button = { git = "https://git.tawasuyu.net/tawasuyu/llimphi.git" } ``` crates.io holds an older 0.1 snapshot (June 2026, before the wgpu 29 / vello 0.9 move): `cargo add llimphi` gets the facade that re-exports `llimphi-ui`, `llimphi-theme` and `llimphi-3d`, but newer crates such as `llimphi-test` and `llimphi-anim` are not published there yet. ## Beyond the 2D widget kit Pieces worth naming because they change what an app can be: - **Four paths to pixels, one compositor.** `vello` on GPU compute is the main road; `llimphi-cpu` (`vello_cpu`) paints the bare-metal framebuffer; `llimphi-hybrid` (`vello_hybrid`) is CPU+GPU with no compute shaders, for hardware that lacks it (this is the one that runs on a phone's Mali); and `llimphi-wire-escena` serializes a scene so a sandboxed guest can compose it and a host replay it. The same scene tree goes through all of them and the output is diffed **per pixel** — wire vs direct is bit-identical, hybrid vs CPU never differs by more than 1/255. - **Text.** `parley` shapes; `llimphi-glifos` rasterizes each glyph once into a shelf-packed coverage atlas (4 subpixel positions per axis) so a line of text is quads instead of outlines — 3.6–5× faster on the direct-GPU path. - **Testing.** `llimphi-test` is the headless, deterministic golden-image harness — the reason a UI change can be certified as *text* (pixel-diff counts per threshold) instead of by looking at a screenshot. Where two paths should paint the same thing, the oracle is the other path, not a blessed image. - **Animation.** `llimphi-anim` is a Rive-style, clip-agnostic state machine; `llimphi-lottie` and `llimphi-svg` are thin bridges to `velato` and `vello_svg`; `llimphi-mesh` renders deformable meshes with bones and skinning. - **Surfaces.** `llimphi-layer` runs an `App` as a `wlr-layer-shell` surface (a bar anchored to a screen edge) rather than a window. `llimphi-term-graphics` covers the terminal graphics protocols. ## Compatibility - **Linux/Wayland** — primary backend. - **Linux/X11** — via XWayland. - **macOS / Windows** — `winit` + `wgpu`. - **Android** — HAL via `android` crates (`hybrid` is the renderer that works on Mali). - **Wawa bare-metal** — alternative framebuffer HAL, over `llimphi-cpu`. Full crate index (framework · widgets · modules · android) in [MANUAL.md](MANUAL.md) §19. ## Considerations - **Single API: declarative `View`.** No imperative, no foreign vDOM. - **Same scene tree on Wayland and Wawa**: HAL abstracts the surface. - Widgets are **purely visual**; modules encapsulate state + behavior. ## Read more - [A graphics engine from scratch, entirely in Rust](https://gioser.net/blog/llimphi-motor-grafico-de-cero/) (Spanish) — why llimphi exists, the four paths to pixels and what is still missing. ## License Dual-licensed under [MIT](LICENSE-MIT) or [Apache-2.0](LICENSE-APACHE), at your option.