SPACE.LA
◀ music select
personal / experiment / archived

egui-vdom

A virtual DOM for egui with a Bun/TypeScript front end and a Rust eframe renderer, so JSX-style trees render natively.

BPM
140
GRADE
B
LEVEL
5
RELEASES
0
YEARS
2025–2025

A DOM That Was Not There

If a callback API was the wrong way to write UI, I'd use a tree instead: build it in TypeScript, diff it, send the changes over to a Rust eframe renderer and let egui paint them.

So it's a virtual DOM for a toolkit that doesn't have a DOM. egui is immediate mode, meaning it rebuilds the whole interface every frame from your code, and putting a vdom on top was a way to figure out which layer should own the tree. May 4 to May 10, 2025, Bun on the front, eframe on the back, JSX-style trees rendering into a native window.

It was one of the egui experiments that month, alongside egui-reactive-js and egui-ffi, which cut the bridge down to a cdylib and Bun's FFI once I decided Neon was more than I needed. They helped me work out what Gouda should be, and they were the last things I built before tumeric turned it into a language project.

led to