amenui
en·中 github ↗ v0.0.1
01docs 02components 03lab 04works
en·中github ↗
×

docs /docs /

Documentation

Guides, concepts and the reference, and a page for every component with a live specimen.

01Start

  • 01.1Introduction

    amenui is an interface framework that draws every pixel itself, written in Rust on wgpu; the same code runs in a native window and on the web. Everything on screen — glyphs,…

  • 01.2Installation

    Pick the host your interface lives in. All three draw the same pixels: the framework draws everything itself, and the host only gives it a surface, input and time.

  • 01.3Your first view

    A view is a function from state to an element tree; an update is a function from state and a message to a new state. Messages are plain values.

  • 01.4Project structure

    Where things are in the amenui repository. The crate is one library with a few command-line tools; this site, its gallery and the Lab live in a separate repository,…

02Guides

  • 02.1Forms

    A form is state and messages, like everything else: the state holds every value, each widget sends a message for each edit, and update is the only place a value changes. Text…

  • 02.2Theming and dark mode

    A theme is a set of colours and the faces for display, body and monospace ( style::THEMES ). Paints are names, not colours: Paint::INK , TEXT , DIM , FAINT , GROUND , ACCENT…

  • 02.3Languages

    Every string on screen comes from a message catalog, one per language, so an application can ship in any language without touching its views.

  • 02.4Right to left

    A row lays out from the right when its direction is right to left: El::rtl(true) on the row (or any ancestor), or a locale that reads right to left. Taffy's Direction::Rtl does…

  • 02.5Accessibility

    The screen is drawn by the framework, not by the platform's controls, so the runtime keeps a second, invisible copy of the interface for assistive technology: the accessibility…

  • 02.6Testing with render and the tree

    Every recipe can be driven from outside without a window: render opens it offscreen, plays a list of input events on a fixed 60 Hz clock from 0 with fixed seeds, and writes the…

  • 02.7Performance

    Draw only when something changed; draw only what changed (two boxes); scrolling moves, it does not lay out again; a long list builds only the rows that show; the material can…

  • 02.8Development

    The architecture reference maps what each module owns. This guide covers building, testing and the tools in this repository.

Recipes

03Concepts

  • 03.1Overview

    After every message the runtime calls view(&state) once, gets a new El tree, compares it with the last by key and lays out again only what changed. The state is the only…

  • 03.2Text

    Text is set by parley and rasterised by swash; every atlas pixel holds coverage and the signed distance to the stroke, so every material draws a glyph by its true outline. A…

  • 03.3Materials and looseness

    A material is how the second pass draws: plain, dottr, halftonr, charr, smudgr, carvr, glitchr, near, scribblr. At rest they look like plain (but for the few with a look of…

  • 03.4Annotation

    The third pass is the annotation layer: frames, numbers, sizes, leaders and rulers drawn from the real layout, never loosened. El::annotate(text) writes a callout; {xy} becomes…

Design

04Components

05Reference

  • 05.1Command line

    Components are distributed as source, the way shadcn/ui does it: you copy a component's file into your project and change it there. amenui add does the copying.

  • 05.2Registry schema

    registry.json lists every component as source to copy, the way shadcn/ui's registry does. amenui add reads it; the documentation's component pages are made from it.

  • 05.3Registry

    Components are distributed as source: amenui add <name> copies one and the files it depends on into your project.

  • 05.4AGENTS.md

    amenui is a self-drawn interface framework in Rust (wgpu; the same code runs natively and on the web). Everything on screen — glyphs, shapes, pictures — is an instance with a…

  • 05.5llms.txt

    A self-drawn interface framework in Rust (wgpu, native and web). Views are plain trees of values; every glyph, shape and picture has a true outline that can loosen, morph and…

  • 05.6Architecture

    amenui is one Cargo package: a library, the amenui command line and two tools. Everything except render.rs and the shaders runs without a GPU, so the runtime can be driven and…

  • 05.7Fonts

    The fonts in assets/ are all under the SIL Open Font License 1.1. Their licenses are in assets/licenses/ . text::embedded() returns them compiled into the binary (about 14 MB,…

06Release notes

  • 06.1Release notes

    Newest first. The acceptance checks for each part are in DESIGN.md §7 .