News for hackers. Stuff that matters.
Re:Kosmonaut: web browser from scratch in Rust by catdawg on Saturday August 15, 2020 @02:44PM (#24171208)
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.
Re:Kosmonaut: web browser from scratch in Rust by untog on Saturday August 15, 2020 @03:16PM (#24171451)
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.

Re:Kosmonaut: web browser from scratch in Rust by UnnoTed on Saturday August 15, 2020 @03:29PM (#24171577)
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...

Re:Kosmonaut: web browser from scratch in Rust by c-smile on Saturday August 15, 2020 @03:36PM (#24171654)
Why "in theory"? Here are real life applications: https://sciter.com/#customers
Re:Kosmonaut: web browser from scratch in Rust by untog on Saturday August 15, 2020 @06:19PM (#24172916)
My “in theory” was referring to Kosmonaut. Then I pointed out Sciter as evidence that something similar has already been done.
Re:Kosmonaut: web browser from scratch in Rust by hiccuphippo on Saturday August 15, 2020 @03:50PM (#24171790)
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/

Re:Kosmonaut: web browser from scratch in Rust by nikki93 on Saturday August 15, 2020 @07:28PM (#24173357)
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
Re:Kosmonaut: web browser from scratch in Rust by rapsey on Saturday August 15, 2020 @02:53PM (#24171270)
Depends on how dependent it is on the javascript engine. Servo unfortunately was inseperable from js.
Re:Kosmonaut: web browser from scratch in Rust by throwaway894345 on Saturday August 15, 2020 @02:58PM (#24171326)
Can you give more information (link?) about why Servo was inseparable from JS?
Re:Kosmonaut: web browser from scratch in Rust by chc4 on Saturday August 15, 2020 @03:21PM (#24171508)
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...
Re:Kosmonaut: web browser from scratch in Rust by throwaway894345 on Saturday August 15, 2020 @06:07PM (#24172844)
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?
Re:Kosmonaut: web browser from scratch in Rust by guerrilla on Saturday August 15, 2020 @04:07PM (#24171939)
Isn't that what GNOME is doing but in C (and whatever Gtk+ binds to)? [1]

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