xi-gtk icon indicating copy to clipboard operation
xi-gtk copied to clipboard

Rewrite in Rust

Open mmstick opened this issue 7 years ago • 4 comments

Would you support the idea of having someone like myself rewrite this in Rust? Would be able to quickly get a lot of the features you want integrated in very little time.

mmstick avatar Nov 29 '17 05:11 mmstick

I still feel that the combination of Rust and GTK is far from ready with things like gnome-class still under heavy development. Gtk-rs applications also tend to use a lot more memory than Vala applications. I do want to rewrite xi-gtk in Rust but only once these issues are addressed. Feel free however to give it a go. It would be nice to have an actual rewrite to compare the performance and memory usage. You might also want to take a look at gxi.

eyelash avatar Nov 29 '17 09:11 eyelash

Please don't do this.

I love both Rust and Vala. It's hard to deny that in terms of overall language design, Rust blows Vala (and most other languages) out of the water.

That being said, for GTK+ development, the competition isn't even close. Vala is a DSL for working with GObject. Signals, GObject inheritance, and DBus interfaces are all first-class citizens of the language itself. Rust would require compiler plugins to approach this level of convenience. Vala GTK+ bindings tend to be better documented than those for any other language. It's hard to imagine gtk-rs ever catching up to them.

The recent rumours of Vala's demise are also greatly exaggerated. The Vala compiler currently averages about one commit per day, and many stability issues have been fixed in the past two years. Vala is used by multiple GNOME core applications, and clearly isn't going anywhere. Moving away from Vala makes no more sense for a GTK+ project than moving away from Swift does for a macOS/iOS application.

p-e-w avatar Feb 03 '18 08:02 p-e-w

That being said, for GTK+ development, the competition isn't even close. Vala is a DSL for working with GObject. Signals, GObject inheritance, and DBus interfaces are all first-class citizens of the language itself. Rust would require compiler plugins to approach this level of convenience.

Have you looked at gnome-class yet? It is essentially the compiler plugin you are describing. I believe once gnome-class is ready it might be a good replacement for Vala but until then Vala is probably the better choice for the reasons you mentioned.

eyelash avatar Apr 16 '18 16:04 eyelash

FWIW, if you do plan on rewriting this in Rust please do hook me up - I'm currently working on gxi which is basically that and would be very interested in collaborating.

Cogitri avatar May 04 '19 00:05 Cogitri