Hacker News new | ask | show | jobs
by pcwalton 3401 days ago
> I would love to see something like the Flutter Engine[1] written in Rust, which is a layer tree that runs in an OpenGL context and includes text rendering, shape drawing, gesture recognition, scroll layers, a layout engine, etc. – all components necessary for modern mobile app development.

WebRender and Servo together contain all of these.

2 comments

It would be genuinely exciting to see some of that tech being used for a Rust GUI library. Nobody seems to be working on that yet though, I don't think.
Right, but those components exist as bindings for HTML/CSS/JS. It would be awesome to see a Rust UI framework built on top of them.

It's certainly no coincidence that the top contributors to the Flutter engine are all Chromium contributors.

WebRender is not coupled in any way to HTML/CSS/JS as far as I know (I've used it in an app).

Fundamentally, it allows you to represent a scene-graph and render it efficiently. How you go about constructing and manipulating your scene graph is up to the application which uses it.

In Servo's case it parses HTML and CSS for structure and style and allows manipulations through JS through the DOM, but none of those are any concern for webrender.

I'd like to see rust bindings to the DOM. HTML and CSS are actually pretty good for representing UIs, the bottleneck is JS. I think it'd be interesting to build a desktop ui based on Servo.
I'd like to do this as well.

One of Servo's 2017 goals is to "Determine product opportunities for a standalone Servo browser or embeddable library." I'm following this very closely. I'd love to use a Rust equivalent of Electron in some projects.

I think Servo has much greater potential to be a viable high-end gaming platform than Firefox[0] (sans Quantum). HTML/CSS/JS UI with WebRender and some 3D rendering API which is not susceptible to bad GC pauses looks like the holy grail of game programming to me.

[0]: https://wiki.mozilla.org/Platform/Games

Oh wow, that's awesome. Will have to try it out.