Live data from Hacker News

A Simple Rust GUI with QML

vandenoever.info

51–55 of 55 posts

Re: A Simple Rust GUI with QML

#51

Earlier quoted context omitted.

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 a…

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.

Re: A Simple Rust GUI with QML

#52
post #36

Earlier quoted context omitted.

Yeah but I feel like HTML GUIs are the antithesis of Rust. Granted, it may be the best option at the moment.

Why is it an antithesis? HTML UI at the end is just a set of few simple concepts (at least with Sciter): 1. UI is a composition of just two universal components: Element and Node (text, comment, etc). 2. UI is a single rooted tree of such blocks - DOM tree. 3. The tree can be styled by well known CSS means. 4. Events are delivered to particular UI elements using bubbling/sinking event propagation schema. 5. Any DOM E…

Because Rust is all about efficiency and doing things 'the right way'. HTML is one massive hack at this point and one that wasn't even designed for making desktop GUIs. It's also really slow compared to true GUIs. Remember Firefox OS? Yeah.

Re: A Simple Rust GUI with QML

#53

Earlier quoted context omitted.

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 a…

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.

https://crates.io/crates/webplatform

Re: A Simple Rust GUI with QML

#54

Earlier quoted context omitted.

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 a…

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

Re: A Simple Rust GUI with QML

#55

Gist that I've been developing for quick setup guides (PRs welcome!): https://gist.github.com/ErichDonGubler/c802e066de7068241f0e6... We're still trying to get this to work with Windows. I've been reporting on this issue here: https://github.com/White-Oak/qml-rust/issues/31 . Any suggestions to get this going would be appreciated! Developing with Rust/QML on Windows definitely seems possible at this point...that said…

It was a bit of a struggle, but I was able to get this going for Mac w/Homebrew. after `brew install qt5`, I had to `brew linkapps qt5` & `brew link --force qt5`. Then `ln -s /usr/local/opt/qt5/mkspecs /usr/local/mkspecs && ln -s /usr/local/opt/qt5/plugins /usr/local/plugins` which is super not ideal. I had some error and ran `brew install doxygen --with-qt5` which may not be necessary, but after these steps it built…

I also have cmake installed for Mac w/Homebrew and used a binary install of qt-5.8.

After adding the clang_64/bin dir on the $PATH I too am getting 'ld: framework not found QtCore'.

Anyone able to suggest where I'm going wrong?

Post reply on HN