News for hackers. Stuff that matters.
Re:Rust's 2017 roadmap, six months in by nicoburns on Wednesday July 05, 2017 @05:02PM (#14706080)
GTK is the best option at the moment. Apparently QT is difficult due to it being heavily based in C++'s view of the world, which doesn't translate particularly well to Rust (notably Rust not supporting OOP in the same way). There is hope of a new rust-native GUI library (possibly in the vain of Flutter[1]) based on the work done for Servo[2], but that looks to be a way off.

[0] https://www.reddit.com/r/rust/comments/6l5c94/can_we_crowdfu... [1] https://flutter.io/ [2] https://github.com/servo/webrender

Re:Rust's 2017 roadmap, six months in by shmerl on Wednesday July 05, 2017 @05:06PM (#14706108)
I think translation problems aren't caused by OOP itself, but by messed up name mangling, and total lack of any sane standard for it in C++.
Re:Rust's 2017 roadmap, six months in by pcwalton on Wednesday July 05, 2017 @05:22PM (#14706216)
Name mangling is almost completely a non-issue. We solved it years ago for the Servo SpiderMonkey bindings, to name one instance.
Re:Rust's 2017 roadmap, six months in by shmerl on Wednesday July 05, 2017 @05:29PM (#14706276)
What is the most difficult part for Qt then? Translating some of its concepts in Rust?
Re:Rust's 2017 roadmap, six months in by civilitty on Wednesday July 05, 2017 @06:20PM (#14706573)
AFAICT, QT has its own implementation of signals and slots (events and event handlers essentially) which is a pain for Rust's ownership model and it also has a code generator that deals with some of C++'s limitations, making it harder to generate usable bindings. If that weren't enough, there is no native (clean) Rust way to do C++ inheritance which is another big pain.
Re:Rust's 2017 roadmap, six months in by dagmx on Thursday July 06, 2017 @12:01AM (#14708043)
Rust doesn't have a concept of inheritance and overriding which is a pretty key part of the qt design.

If you are okay to use qt out of the box, there are a few bindings. But you won't be able to customise it like you would with actual qt.

Re:Rust's 2017 roadmap, six months in by Rusky on Wednesday July 05, 2017 @05:10PM (#14706130)
Name mangling is by far the easiest part. It's already solved via bindgen and clang.
Re:Rust's 2017 roadmap, six months in by vvanders on Wednesday July 05, 2017 @05:53PM (#14706413)
That only works for clang based static/dyn libs though right? If I remember correctly msvc has a different set of mangling.
Re:Rust's 2017 roadmap, six months in by mwu on Wednesday July 05, 2017 @06:22PM (#14706587)
Clang also supports MSVC mangling. I've never tried it with bindgen, but it can be done.
Re:Rust's 2017 roadmap, six months in by vvanders on Wednesday July 05, 2017 @08:02PM (#14707199)
Huh, nifty. Learn something new every day, thanks!
Re:Rust's 2017 roadmap, six months in by Rusky on Wednesday July 05, 2017 @08:03PM (#14707203)
Clang supports MSVC manglings and bindgen correctly exposes them.
Re:Rust's 2017 roadmap, six months in by dom0 on Wednesday July 05, 2017 @06:06PM (#14706484)
When it comes to UI toolkits, there's just one rule -- "anything but GTK".
Re:Rust's 2017 roadmap, six months in by ronjouch on Wednesday July 05, 2017 @06:17PM (#14706555)
Care to elaborate?
Re:Rust's 2017 roadmap, six months in by flukus on Wednesday July 05, 2017 @08:20PM (#14707268)
I like GTK, but it's place is in gnome (which I also like) and no where else, on any other system it looks horrible and out of place, particularly when it comes to things like the file dialog.

Also the devs no longer consider it a cross platform library, everyone using it as one is stuck on GTK2.

Re:Rust's 2017 roadmap, six months in by the_why_of_y on Thursday July 06, 2017 @06:43PM (#14714560)
GTK is a bazaar style project, if it has issues on some platform then that's because no developers have stepped up to fix issues on that platform.

There's support for Windows native file dialogs since 3.20.

https://blogs.gnome.org/alexl/2015/11/05/native-file-chooser...

Re:Rust's 2017 roadmap, six months in by mkl on Thursday July 06, 2017 @04:21AM (#14708891)
(Not OP) Most gtk applications are very difficult for me to use, for a combination of reasons. I have joint problems that mean I rely on mouse and touch for working with text more than most people. The biggest obstacles are:

1. Gtk constantly clobbers the middle-click clipboard on Linux. In non-gtk programs that's one of my most efficient ways of entering and editing text.

2. Gtk completion dropdowns steal clicks, so typing into a field with completions (that I don't want) with an onscreen keyboard takes at least twice as many button presses as it should.

I have no such problems with Qt (or anything else).

Re:Rust's 2017 roadmap, six months in by dom0 on Thursday July 06, 2017 @07:15AM (#14709504)
Not-Gnome was never a priority for the developers, conversely, it doesn't work very well on Not-Gnome. That alone disqualifies it for me. Besides that, the docs are simply bad and glib is such a huge mess that I actively avoid touching anything near it with a ten foot pole.
Re:Rust's 2017 roadmap, six months in by ronjouch on Thursday July 06, 2017 @09:21AM (#14710163)
@dom0 @flukus of course, thanks. Didn't think of that as I am a satisfied GNOME user (for the continued focus on UX refinement, simplicity, stability) and was even forgetting people might consider it for non-GNOME.