News for hackers. Stuff that matters.
Re:Rust in 2018: easier to use by vhakulinen on Sunday January 14, 2018 @04:46AM (#16143518)
Writing GUI with rust is totally possible: http://gtk-rs.org/
Re:Rust in 2018: easier to use by pjmlp on Sunday January 14, 2018 @06:34AM (#16143827)
It is possible, but far from productive, which I learned exactly by trying to use Gtk-rs to port an old basic Gtkmm demo, that I used for a C/C++ Users Journal article.
Re:Rust in 2018: easier to use by amelius on Sunday January 14, 2018 @07:25AM (#16143971)
Wasn't Rust invented to write a GUI? A webbrowser can be regarded as a kind of GUI.
Re:Rust in 2018: easier to use by foldr on Sunday January 14, 2018 @07:33AM (#16143998)
There aren't any good GUI libraries available for Rust at the moment. GUI libraries are huge and take an enormous amount of work to get right. It's typically only the most popular three or four languages at any given point in time that have satisfactory GUI libraries. Rust has the additional burden that it is far from trivial to wrap Gtk, Qt or other C/C++ toolkits in a safe manner.
Re:Rust in 2018: easier to use by amelius on Sunday January 14, 2018 @07:43AM (#16144030)
Didn't Mozilla write a GUI library before they wrote Firefox? It would strike me as odd if they didn't.
Re:Rust in 2018: easier to use by foldr on Sunday January 14, 2018 @07:46AM (#16144039)
There is no mature GUI library for Rust that I'm aware of. I believe the servo project is focused on writing a browser rendering engine, not a browser GUI. It certainly has not so far yielded a GUI toolkit that can be straightforwardly used in other projects.
Re:Rust in 2018: easier to use by coldtea on Sunday January 14, 2018 @09:32AM (#16144378)
No, it was invented to write a generic (web) rendering engine.

So, even if we consider a web app as a GUI, Rust wasn't invented for writing that (you still use CSS, HTML, JS etc for that part). It was invented for writing the backend for that UI.

In other words, Rust is not GTK (a UI library), it's C (the language the UI library itself is written in).

Re:Rust in 2018: easier to use by amelius on Sunday January 14, 2018 @11:19AM (#16144850)
Ok what is the GUI of Firefox written in/using?
Re:Rust in 2018: easier to use by coldtea on Sunday January 14, 2018 @11:31AM (#16144888)
Until recently-ish something called XUL, a markup language for UI (similar to HTML, or even better XAML). Not sure if they've moved on since.

https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL

Re:Rust in 2018: easier to use by lima on Sunday January 14, 2018 @07:57AM (#16144067)
Rust was invented for low-level parsing/rendering code. The high level GUI in Firefox is not implemented in Rust for all I know.
Re:Rust in 2018: easier to use by StavrosK on Sunday January 14, 2018 @05:55AM (#16143711)
Yes but "possible" and "pleasant" are very different :(
Re:Rust in 2018: easier to use by v_lisivka on Sunday January 14, 2018 @10:26AM (#16144604)
gtk-rs needs a macro package to parse a HTML or a XML snippet and generate GUI, with embedded rust code in appropriate place. Look at Yew for example: https://users.rust-lang.org/t/yew-a-framework-for-client-sid... .
Re:Rust in 2018: easier to use by coldtea on Sunday January 14, 2018 @09:30AM (#16144366)
Yeah, but the parent point is that "possible" is a very low bar.