Uniform UI library claims web apps under 280 KB with WASM and WebGPU

Uniform is a UI library presented in a GitHub README and shared as a Show HN. It replaces the native UI stack with its own text, layout and rendering, and the README says that a complete web application using it is less than 280 KB compressed. The README also says that the README document itself was written by hand, with no part generated or modified by AI.
The architecture is a core written in C, with shaders in the Slang Shading Language. On the web the C core compiles to WASM; on every other platform it runs as native code. There are two interfaces. A JavaScript API is aimed at the fastest iteration: it has no build step, so changes show up immediately, and it calls straight into the C core. A C API is described as simple and gives greater performance, though the README says that for most use cases the choice between the two is a matter of preference, not performance. The library can be statically linked or compiled from source along with the application, and compiling from source, shaders included, takes less than 1 second.
Uniform is currently in Preview, meaning the API may change and not all features are done. It supports iOS and macOS, rendering via Metal, and the web, rendering via WebGPU. Native support for Windows, Linux and Android, where it would render via Vulkan, is planned. On desktop the runtime uses JavaScriptCore to run JIT-compiled code, and on mobile the code is interpreted. For the web no extra runtime is needed because the library code is included directly. For C or languages with a C FFI, the library ships header files and a binary archive per target platform. For web builds, the application and server can be bundled into one executable with no external dependencies, so updating production comes down to copying a file.
The README describes a design built for custom visuals rather than ready-made widgets. Uniform has no visual identity of its own and ships no pre-built components; even a button is defined from scratch, and custom visuals, gestures and behaviours take a few lines of code. For harder pieces such as scrolling lists or text fields, it supplies the core functionality (event handling, gestures, physics, animations), and the developer reads the computed result of what should be drawn where and creates the visuals.
Layout combines constraint-based layout with stack-based auto-layout. Constraints pin an anchor of a child to an anchor of its parent, with an optional offset. Stacks support spacing, padding, alignment and distribution, and each item either fills the available space, fits tightly around its content or has a fixed size. Layout runs in fixed-point arithmetic with edges snapped to pixel boundaries. Text layout exposes character-level information, which makes custom selection and visual effects possible, and custom fonts, sizes, weights and colours can be set for ranges within a string.
Shapes are built on Signed Distance Fields: every pixel carries its distance to the nearest edge and the corresponding normal. That powers effects such as glass with refraction near the edge, a blur radius that varies across the shape, realistic shadows and blending between shapes. The README also claims perfectly smooth continuous curves (continuous position, slope, curvature and curvature slope), used by default for rounded rectangles, which can shrink to pills and circles, and usable for arbitrary polylines or polygons.
Input covers touch, pencil, keyboard and mouse through a platform-independent interface, with raw events hit-tested against the node hierarchy. A gesture system lets components negotiate which action wins; tap, long-press, pan and pinch are built on the public API, so custom gestures have the same control. Display features include extended dynamic range (colour values above 1.0 render brighter on capable displays), high bit depth or dithering, and high refresh rates.
The API is small. Interface elements are created with one function call and are immutable nodes arranged in a hierarchy. Layout and rendering behave like pure functions on those hierarchies, and creating and laying out nodes is described as cheap enough to repeat as often as needed. The README says Uniform does not compete with platform UI frameworks and does not copy native controls; instead it offers tools to build controls that should eventually exceed native or browser quality. Because the library ships inside the application, improvements reach all users immediately, and the README says windows resize without artifacts and render with no extra latency compared to native UI.
The README's example, in both JavaScript and C, opens a window and draws a gradient background; it runs on macOS, iOS and the web. An onUpdate callback fires once per display refresh, commonly 60 or 120 times per second, and each time builds a root frame sized to the target, lays it out, records a GPU command buffer and presents it. On the web, creating the window makes a canvas element in the DOM. The README adds that this code is not optimally energy-efficient, because it lays out and renders identical content on every refresh; an app drawing mostly static content could render only when something changed, and here only the window size affects the result.
Key facts
- The README says a complete web application built with Uniform is less than 280 KB compressed, while Uniform implements its own text, layout and rendering.
- The core is written in C with Slang shaders; it compiles to WASM on the web and to native code elsewhere, and is used through a no-build-step JavaScript API or a C API.
- Uniform is in Preview: it supports iOS and macOS (Metal) and the web (WebGPU), while Windows, Linux and Android (Vulkan) are only planned.
- Layout mixes constraints with stacks in fixed-point arithmetic; shapes use Signed Distance Fields for glass, blur and shadow effects.
- Compiling the library from source, shaders included, takes less than 1 second, and the README says the README text itself was written by hand without AI.
Why it matters
Most web UI work leans on a browser's DOM and a large framework. Uniform takes the opposite route: its own layout, text and GPU rendering in a C core compiled to WASM, with a stated size of under 280 KB compressed for a whole app. If that holds up, it is a small-footprint way to get pixel-exact, consistent visuals across web, macOS and iOS from one codebase. For now it is a claim in a README on a Preview project.
Who it affects
The README targets designers and developers who need full control over visual design and behaviour, from games and professional apps with high performance requirements to simple apps and prototypes. Current targets are web (WebGPU), macOS and iOS (Metal). Developers on Windows, Linux or Android cannot use native builds yet, since those are only planned.
How to use it
There are two routes. In JavaScript, write an app in a single file and run it with no build step; on desktop and mobile the file is bundled with the Uniform runtime executable, and on the web the library code is included directly. In C, or any language with a C FFI, link the supplied headers and per-platform binary archive, or compile the library from source with your app. The README's example creates a window in onStart, then in onUpdate builds a root frame, calls layout, records a GPU command buffer, renders and presents.
How solid is it
The only source seen is the project's own README. The 280 KB figure is an upper bound ('less than'), with no breakdown of WASM, JavaScript or fonts and no statement of which application was measured. No benchmark or comparison against React, Flutter, Skia, CanvasKit or other frameworks is given. The visible README text names no author, maintainer, company or license, and it is cut off mid-sentence at the energy-efficiency note, so later sections were not seen.
Risks and caveats
The project is in Preview: the API may change and not all features are done. Windows, Linux and Android support is planned with no timescale given. No browser compatibility list or WebGPU availability caveats appear in the visible text, and nothing is described about accessibility, screen readers or text input methods. Because Uniform draws everything itself and ships no native controls, those behaviours would have to be built or checked by the developer. The README's own example is not optimally energy-efficient, as it lays out and renders on every display refresh.
“Instead, it provides tools to build controls that should eventually exceed native or browser quality.”
— Uniform README