5 ms·
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 al
by catdawg 6y 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.
- rapsey 6y agoDepends on how dependent it is on the javascript engine. Servo unfortunately was inseperable from js.
- throwaway894345 6y agoCan you give more information (link?) about why Servo was inseparable from JS?
- chc4 6y agoServo has JavaScript own and collect the DOM nodes. At least, it did in 2014. https://research.mozilla.org/2014/08/26/javascript-servos-only-garbage-collector/ https://research.mozilla.org/2014/08/26/javascript-servos-on...
- throwaway894345 6y agoThat 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?
- untog 6y agoIn theory. The Sciter engine is not far off that, though it uses its own scripting language: https://sciter.com/ 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.
- UnnoTed 6y agoThe 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 https://github.com/sciter-sdk/rust-sciter [2]: https://github.com/sciter-sdk/rust-sciter/blob/master/examples/dom.rs https://github.com/sciter-sdk/rust-sciter/blob/master/exampl...
- c-smile 6y agoWhy "in theory"? Here are real life applications: https://sciter.com/#customers https://sciter.com/#customers
- untog 6y agoMy “in theory” was referring to Kosmonaut. Then I pointed out Sciter as evidence that something similar has already been done.
- hiccuphippo 6y agoMaybe Azul[0]? It uses the Mozilla web renderer but instead of HTML you write DOM in a react-style way. [0] https://azul.rs/ https://azul.rs/
- guerrilla 6y agoIsn't that what GNOME is doing but in C (and whatever Gtk+ binds to)? [1] [1]. https://wiki.gnome.org/Projects/GnomeShell/Development https://wiki.gnome.org/Projects/GnomeShell/Development
- nikki93 6y agoSome UI rendering engines for games do something like this, eg. https://coherent-labs.com https://coherent-labs.com -- talk by one of the devs of that at https://www.youtube.com/watch?v=yy8jQgmhbAU https://www.youtube.com/watch?v=yy8jQgmhbAU