Aster v3 · a UI library in Rust

Every pixel, from one small library.

Aster lays out and draws a whole interface on the CPU: text, layout, gradients, glass, light and motion, the same bytes every time. No browser, no GPU needed, three system libraries underneath. Every moving picture on this page was drawn by it.

Fewer tokens to write the same screen
1.9×–4.7×
An animated 1440×900 frame, median
3.9 ms
Functions in the whole C interface
16

01 · Colour, light and motion

Gradients that look expensive. Each is one line.

Mesh, aurora, liquid metal, holofoil, silk, spiral, domain warp and thin film are built in. Colours mix in OKLab, every ramp is dithered so it never bands, and a still gradient is baked once, then served from cache. Each swatch is one line of Rust, 39 to 55 tokens.

  • Lush mesh, rendered by AsterLush mesh
  • Aurora, rendered by AsterAurora
  • Liquid metal, rendered by AsterLiquid metal
  • Holofoil, rendered by AsterHolofoil
  • Silk, rendered by AsterSilk
  • Spiral, rendered by AsterSpiral
  • Domain warp, rendered by AsterDomain warp
  • Thin film, rendered by AsterThin film
Show the eight lines
  1. Grad::lush([c(0x070a1f), c(0x3b1d8f), c(0x8a5cff), c(0xff6fa8), c(0x2ee6d0)], 7) 54 tokens
  2. Grad::aurora([c(0x03060f), c(0x2bffc6), c(0x2bd4ff), c(0x9b5cff)]).seed(4) 45 tokens
  3. Grad::liquid_metal([c(0x1a0f02), c(0x7a4b0c), c(0xe7b54a), c(0xfff2c6)]).seed(8) 51 tokens
  4. Grad::iridescent(0.25, [c(0xd7c8ff), c(0xbff6ff)]).seed(3).view(0.25, 0.15) 44 tokens
  5. Grad::silk([c(0x2a0614), c(0x8f1d45), c(0xe46b8f), c(0xffd6e0)]).seed(4).angle(62.) 51 tokens
  6. Grad::spiral(2., 2.2, [c(0x12002b), c(0x7b2ff7), c(0xf107a3), c(0xffd166)]).smooth(1.) 51 tokens
  7. Grad::warp([c(0x0b0a1f), c(0x3d2c8d), c(0x916bbf), c(0xc996cc), c(0xf4e4ff)]).seed(3) 55 tokens
  8. Grad::iridescent(0., [c(0xffffff), c(0xffffff)]).seed(9).scale(180.).view(0.7, 0.3) 39 tokens

Scene cuts are values

Cut::dissolve(), Cut::iris(), Cut::pixelate(), Cut::push(), Cut::wipe(20.). Aster keeps the frame that was on screen, builds the new one and blends the two on its own clock: the same script gives the same bytes, and the new screen takes clicks from its first frame.

1.06 ms median, 3.44 ms p95, for a 1280×800 frame while a cut plays (126 frames of this reel, measured today).

02 · Simple, all the way down

A whole app is a page of C.

275
tokens: the whole app below
2,162
tokens: all the notes a model reads before it writes Aster
1.9×–4.7×
fewer tokens for the same screen: nine written both ways, 6,970 against 17,274 (all nine)
hello.c31 lines · 275 tokens
#include "aster.h"
#include <stdio.h>

static int clicks = 0;

/* The screen is JSON: a column with a heading,
   a number, a meter and a button. */
static void show(const AsterApp *app) {
    char v[512];
    snprintf(v, sizeof v,
        "{\"type\":\"col\",\"gap\":4,\"pad\":6,\"children\":["
        "{\"type\":\"heading\",\"title\":\"Hello, Aster\","
        "\"subtitle\":\"a whole app in C\"},"
        "{\"type\":\"stat\",\"label\":\"Clicks\",\"value\":%d},"
        "{\"type\":\"meter\",\"value\":%d,\"role\":\"accent\"},"
        "{\"type\":\"button\",\"text\":\"Add one\","
        "\"action\":\"add\"}]}", clicks, clicks * 25);
    aster_app_set_view(app, v);
}

static void on_event(void *app, const char *event) {
    (void)event;
    clicks++;
    show(app);
}

int main(void) {
    AsterApp *app = aster_app_new(
        "{\"title\":\"Hello\",\"width\":420,\"height\":256,\"scale\":2}");
    aster_app_on_event(app, on_event, app);
    show(app);
    aster_app_click(app, "Add one"); /* or aster_app_run(app): a window */
    aster_app_click(app, "Add one");
    aster_app_shot(app, "hello.png");
    aster_app_free(app);
    return 0;
}

gcc hello.c -laster_runtime && ./hello · hello.c

What hello.c drew: Hello, Aster, a whole app in C, a Clicks card reading 2, a half-full meter and an Add one button, on a dark theme.
What it drew after two clicks, with no window: aster_app_shot. The same PNG bytes in 30 of 30 runs.

The whole interface: aster.h

85 lines, 16 functions. Describe the screen as JSON, answer events, click, type, read the semantic tree, take a picture.

  • aster_abi_version
  • aster_runtime_version
  • aster_last_error
  • aster_free
  • aster_app_new
  • aster_app_free
  • aster_app_set_view
  • aster_app_set_state
  • aster_app_on_event
  • aster_app_run
  • aster_app_click
  • aster_app_shot
  • aster_app_tree
  • aster_app_state
  • aster_app_type
  • aster_app_set_theme

What it needs underneath

ldd libaster_runtime.solibc.so.6libm.so.6libgcc_s.so.1

That is the list: no GPU driver, browser, JavaScript engine or font service. The library is 14.1 MB stripped, built from main today. A GPU accelerator is optional, and the same Rust builds to WebAssembly at 1.9 MB with brotli.

And every Aster picture on this page comes from one Rust file: 310 counted lines, 6,380 tokens, timing code included: asterv3_site.rs.

03 · A real app, recorded today

aster-md: a whole editor, in motion.

aster-md is a Markdown editor built on Aster: you edit the page as it looks, and the parts you don't touch keep their exact bytes. These three loops are its newest build (commit 9e9a61b, 2026-11-10 02:15), driven through its own headless renderer and the app's own input path, on a made-up note. Each frame is 16 ms of the app's clock, so they play at the speed the app moves.

Sorting a table. Two wheel notches glide the page down, then Price sorts up, down, and Paper sorts A to Z: each row lifts as a strip and slides to its place in a staggered cascade.11.1 ms median frame · p95 18.1 ms · 1920×1200
Ticking and moving tasks. Boxes tick with a small overshoot while the progress bar fills, an item climbs the list with Alt+Up as the others step aside, and a new item pops in as it is typed.4.6 ms median frame · p95 12.9 ms · 1920×1200
Flying through a note. A flick of the wheel coasts to the end and settles, a jump to the top glides back, then the command palette opens Find, and each Enter glides to the next match.11.6 ms median frame · p95 18.3 ms · 1920×1200
85.7ms
Process start to the first frame of a 323-word note, built
117ms
The same for a 100 MB file: 1,251,068 lines, 16.5 million words
2.47ms
A keystroke to a ready frame, median (p95 4.33 ms; 7.23 ms in the 100 MB file)
5.82ms
A scrolling frame, median (p95 10.86 ms; 12.14 ms in the 100 MB file)
16.4MB
The whole app, one stripped program (7.2 MB gzipped). It links libc.so.6, libm.so.6, libgcc_s.so.1; the window libraries load only when a window opens
350ktokens
Its source: the editor 14,249 counted lines (165,569 tokens), the document engine 16,944 (184,417)

Headless on wasp today (a shared 96-thread server, load average 40 to 117): the note and the 100 MB file at 1360×900 through the app's own --bench; the loops' frame times are its own per-frame render timer over the same scripts, three runs each. Built here from Chloe's branch codex/md-wheel-zero-paint-20261110 with aster-ui d6b2a3c75.

04 · Speed, size and tokens

Fast, small, and measured.

3.9ms
An animated gradient hero at 1440×900, median frame (p95 5.4 ms), measured today on a busy server.
3.8ms
An idle 1080p cinematic desktop on the CPU, sky, light shafts, bloom and glass. It was 574.2 ms.
1.1–1.3×
Of native time, in a browser: the same Rust as WebAssembly, byte-exact on more than 15,000 frames.
1.02ms
For an agent to click and read the screen back. Headless Chromium: 34.1 ms.
105ms
aster-md in a real window, from launch to the first frame on screen of a 2,361,372-word file (build ecbe5c4).

Tokens for the same screen, written both ways

Nine screens, each built once with Aster and once the browser way, counted with o200k_base. In total 6,970 against 17,274.

Tokens per screen, Aster and the browser way
ScreenAsterBrowser wayRatio
A plain list with a counter HTML + CSS + JS3561,1253.2×
Sunlight through fog three.js9111,7141.9×
A 3D logo that lands on the cards three.js + DOM6021,3302.2×
Confetti that piles up matter.js6951,6812.4×
A click that shakes the page GSAP4931,1592.4×
Frosted glass, raised controls CSS5672,6734.7×
Gradients that flow CSS + WebGL4651,6303.5×
A film finish over the page WebGL1,2672,5022.0×
A dense ops deck ECharts + CSS1,6143,4602.1×

Sizes on disk and in context

Sizes
hello.c, compiled16,336 bytes
The Aster runtime (libaster_runtime.so, stripped)14.1 MB
aster-md, the whole editor (stripped)16.4 MB
aster-md, gzipped7.2 MB
Aster as WebAssembly, brotli1.9 MB
The notes a model reads before writing Aster2,162 tokens (7,615 bytes)
The whole C app above275 tokens
One gradient swatch39 to 55 tokens

Shared libraries under each program: libc.so.6, libm.so.6, libgcc_s.so.1. Nothing else.

Everything at once. Event horizon, from the full Aster page: aster-md pulled apart by a black hole. Aster draws and animates every piece of the editor, runs the physics of the pull and the hand, and puts on the film finish; the bent light is a custom ray tracer in the same file. An offline render, about 11 s a 1080p frame: not real time.
About the numbers and pictures

Measured today for this page, on wasp (AMD EPYC 7K62, 96 threads, shared with other work, load average 121 to 163), aster-ui main 15b5f0d24, release build: the 3.9 ms hero frame (gradient_live's own timing mode), the cut frames, the library's size and its ldd, the C header, and hello.c's runs. From Aster's notes: the dusk desktop (OPT-BUILD.md, line 979), the agent loop (runtime 0.1.0 on the same server, 2026-11-06) and the WebAssembly target (headless Chromium without a GPU, 2026-11-07, merged as d1728c1a7). Token counts use o200k_base and one rule for both sides: non-blank, non-comment lines, indentation removed. The real-window launch time is from aster-md's repository at ecbe5c4; its other numbers and the three loops were measured today from 9e9a61b(load average 40 to 117). Every picture and clip above is Aster's own output (the aster-md loops through the app, cropped and scaled with ffmpeg) except the CSS that fades them into the page; the finale is part custom code, as it says.