> I've always wanted to build a direct-browser integration that could use HTML+CSS for the layout, but avoids needing a JS runtime. Idk how lightweight servo is but one day I hope I will see my idea come to light
Blitz (https://github.com/DioxusLabs/blitz) is exactly that. It's a new custom browser engine supporting standard HTML/CSS with a native Rust API (and optional integration with Dioxus which is a React-like UI framework in Rust). Baseline binary sizes are around 10mb.
We share a few components with Servo (Stylo the CSS engine (also shared with Firefox), and html5ever the HTML parser), but we've built a bunch ourselves too: notably we have our own layout engine, DOM tree and event handling. Servo is unfortunately tightly coupled with SpiderMonkey, and there is little prospect of removing that dependency in the short term.
That's really nice. It would be really good for game GUIs too where the situation is quite poor and would work well with underlays/overlays/worldspace UIs. That said while binary size may be around 10mb, it still baloons to 500mb at runtime for your TODO list example which is more than some electron apps.
Yeah, the RAM usage is quite high atm. The good news is that it's almost all the rendering layer (WGPU+Vello). So if we can make the renderer more efficient then it's likely we can bring that down. There is also some low hanging fruit in the DOM implementation (but I think that's only actually causing a few 10s of MB of usage).
I would also note that native toolkits (SwiftUI, etc) tend to also use at least ~100mb RAM these days. A lot of that is unavoidable if the app is actually visible, due to modern screen resolutions being so high.