News ·
Show HN: JavaScript web apps with WASM layout and GPU rendering in 280 KB
Uniform is a preview-stage UI toolkit for JavaScript and C that replaces native UI stacks with its own layout and GPU rendering, keeping a full web app under 280 KB compressed.
A developer shared Uniform, a UI toolkit for JavaScript and C that implements its own text handling, layout, and rendering instead of relying on native UI frameworks. A complete web application built with it weighs under 280 KB compressed. It is currently in preview, meaning the API may change and not all features are complete.
The JavaScript API has no build step and calls directly into the library's C core, which compiles to WASM for the web and native code elsewhere. A plain C API is also available. Rendering uses WebGPU on the web and Metal on iOS and macOS, with Vulkan support for Windows, Linux, and Android planned. Layout combines constraints between parent and child anchors with stack-based auto-layout, done in fixed-point arithmetic with pixel-snapped edges. Shapes are drawn as signed distance fields, enabling effects like edge refraction, variable blur, realistic shadows, and shape blending, and rounded rectangles use continuous-curvature curves by default. Input support covers touch, pencil, keyboard, and mouse with a gesture system whose bundled gestures are built on the public API. It also handles extended dynamic range rendering and high refresh rates.
For developers building with AI or otherwise, Uniform offers a small, dependency-light path to pixel-perfect, cross-platform interfaces with instant iteration since no build step is needed. Its stance of shipping no native control copies means teams fully own their visual identity, though the preview status and shifting API are worth weighing before adopting it in production.
References
- Hacker News · github.com
Read the full story at Hacker News ↗Like, save or discuss on Buzz


