Engineering · 9 min read
Inside a 1 MB browser: how litehtml paints your chat bubbles
No WebKit, no web views — just a C++ layout engine, CoreText and a few hundred lines of glue.
SR
Sam Rivera
Staff engineer · October 7, 2026
C++macOS

Every message in this app is a tiny web page. Not a web view — there is no browser process, no web engine and no network stack hiding behind the bubbles. Instead each message is handed to litehtml, a compact C++ library that understands HTML and CSS well enough to lay out documents, and then asks its host application to do the actual drawing. That split — litehtml decides where things go, you decide how they look on screen — is what makes it such a good fit for chat.

Read more ▾
7 sections · 9 min · one message