Repository

affineui/affineui

AffineUI

A highly compliant C++ gpu accelerated html5 rendering engine as a (mostly) single header C++ zero-dependency lib - designed to run real-world web UI frameworks without embedding a browser, using electron. Also bundles a full gradio/dearimgui style C++/python ui api.

11stars

Open github.com

affineui/affineui

AffineUI

A GPU-accelerated HTML5 rendering engine and UI component framework written in C++ as a lightweight alternative to Electron.

Visit project

Show me a random project

First shared
Jul 13, 2026
HN activity
60

Show HN@bc1000003Jul 13, 2026

Show HN: AffineUI a 2 file C++ GPU/HTML5 UI that can replace Electron

I thought this might be useful to C++ engineers working on games, graphics, content in C++ looking for a good lightweight html5 Electron style UI engine. AffineUI is deeply optimized and meant to run as close to 120hz as possible, but supports (most) of html5 and is easy to integrate with your app. It also is highly crash resistant using weakrefs, handles, etc. to avoid footguns. A zero-dep drop in lib that could be a cross between DearIMGUI and Electron. A full featured GPU accelerated html5 rendering engine you can drop into any C++ project with two files (cpp/h) that adds a gpu accellerated html5 Electron style render plus a Gradio style UI component framework. Just main.cpp, affine.cpp and affine.h and you have yourself an app that's about 1/100th the size of the average Electron beast. I built it as a nicer (but somewhat larger) replacement for DearIMGUI that had full CSS/HTML5 compatibility for graphics apps I've been working on. Also available as a python library (pip install affineui), a rust crate (cargo add affineui) and a .net nuget package. Cheers.

Community

Hacker News discussion

Loading the thread…