hn.today

Show HN: JavaScript web apps with WASM layout and GPU rendering in 280 KB

github.com13 points4 comments
Screenshot of Show HN: JavaScript web apps with WASM layout and GPU rendering in 280 KB

Uniform is a C-based toolkit for building custom user interfaces, with JavaScript and C APIs that share the same core. Its central pitch is that a complete web app can fit in under 280 KB compressed while replacing the browser or native UI stack for text, layout, input, and rendering. On the web, the core compiles to WebAssembly and renders through WebGPU; it supports iOS and macOS through Metal. Windows, Linux, and Android support using Vulkan is planned. The project is in preview, so its API and feature set are still evolving.

The toolkit combines parent-child layout constraints with stack-based auto-layout, pixel-aligned fixed-point calculations, and detailed text layout. Rather than supplying standard controls, it gives developers primitives to create custom visuals and behavior, plus support for gestures, animation, scrolling physics, and low-latency input. Signed-distance-field shapes enable effects such as refraction, blur, shadows, and blending, while smooth curves, high-dynamic-range rendering, and high refresh rates support polished graphics. Immutable interface nodes can be created and laid out repeatedly, and the same C core serves both language APIs. Uniform emphasizes fast iteration, small binaries, and immediate control over visual identity; its JavaScript API needs no build step, while compiling the C library takes less than a second.

Read on github.com4 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.