Hacker News new | ask | show | jobs
by catdawg 2136 days ago
Could something like this be used as the renderer for desktop applications? Instead of running a full fledged browser like electron, you basically just write all the logic in rust, and render the UI with css+html.
5 comments

In theory. The Sciter engine is not far off that, though it uses its own scripting language:

https://sciter.com/

EDIT: reply to c-smile below (HN won’t let me reply, sigh):

My “in theory” was referring to Kosmonaut. Then I pointed out Sciter as evidence that something similar has already been done.

The logic can be written in Rust with [1], it's exactly like he wants: rust[2] + css + html.

[1]: https://github.com/sciter-sdk/rust-sciter [2]: https://github.com/sciter-sdk/rust-sciter/blob/master/exampl...

Why "in theory"? Here are real life applications: https://sciter.com/#customers
My “in theory” was referring to Kosmonaut. Then I pointed out Sciter as evidence that something similar has already been done.
Maybe Azul[0]? It uses the Mozilla web renderer but instead of HTML you write DOM in a react-style way.

[0] https://azul.rs/

Some UI rendering engines for games do something like this, eg. https://coherent-labs.com -- talk by one of the devs of that at https://www.youtube.com/watch?v=yy8jQgmhbAU
Depends on how dependent it is on the javascript engine. Servo unfortunately was inseperable from js.
Can you give more information (link?) about why Servo was inseparable from JS?
Servo has JavaScript own and collect the DOM nodes. At least, it did in 2014. https://research.mozilla.org/2014/08/26/javascript-servos-on...
That was very early in the project, but moreover, I would expect that simply means that Servo can allow someone else to own DOM nodes; not that it depends on a JS implementation specifically, no?
Isn't that what GNOME is doing but in C (and whatever Gtk+ binds to)? [1]

[1]. https://wiki.gnome.org/Projects/GnomeShell/Development