GNOME+Rust Hackfest #6 in Roma

End of the year, meaning it's time for a new GNOME+Rust hackfest and its feedback!

GNOME+Rust hackfest?

The goal of these hackfests is to improve the interactions between Rust and the GNOME libraries. This sixth edition happened in Rome.

What have we done?

This time, we focused on two things: polishing and cleaning up. If you haven't guess at this point, a new gtk-rs release is coming soon!

We had (and still have) a lot of issues open. I decided it was time to reduce this number a bit. So let's take a quick look to what I worked on:

Correctly generate the glib::Error import in gir: PR

import in gir: PR Regenerate gio with the latest gir version to have the nullable callbacks feature available: PR

Add the missing from_glib conversion into gir (very useful for glib!): PR

conversion into gir (very useful for glib!): PR Fix the missing parenthesis on return types (in a gdk method, it returned Vec<A, B> instead of Vec<(A, B)> , the compiler wasn't very happy...): PR

instead of , the compiler wasn't very happy...): PR Extend the support of gpointer to void* . To provide more details on this: gpointer is an alias to void* but in some cases, the .gir file was using void* instead of gpointer and so gir was unable to interpret it as expected: PR

to . To provide more details on this: is an alias to but in some cases, the file was using instead of and so gir was unable to interpret it as expected: PR Remove uneeded hack for OSX CI. For the ones who didn't know about: for a few months, homebrew (the OSX package manager) badly linked the GLib library with one of its dependency: libffi . It resulted into the impossibility of building glib on OSX until we wrote a small hack to avoid this issue. It's not needed anymore: issue

library with one of its dependency: . It resulted into the impossibility of building glib on OSX until we wrote a small hack to avoid this issue. It's not needed anymore: issue Remove extra GString imports generation. This issue comes from an improvement we added to avoid cloning strings where it wasn't necessary. However, GString cannot be used in every case but we still kept its import because the imports computation and types computation are in two parts of the code: PR

imports generation. This issue comes from an improvement we added to avoid cloning strings where it wasn't necessary. However, cannot be used in every case but we still kept its import because the imports computation and types computation are in two parts of the code: PR Add a table to see the minimum supported version for each bound libraries (you can see it on the website): PR

All these fixed issues will allow to make our users' and contributors life easier!

But that's not all! In the meantime, @antoyo also worked on a few things like:

Improving gir compilation time (and it is awesome!).

The rewrite of the clone! macro. The current version is relying mostly on GLib directly to handle objects' memory. However, we realized that a lot of memory leaks occured and decided to use strong/weak references instead. And to make their use easier, it'll be handled into this macro.

I can only recommend you to take a look at his blog post for more details!

Next release?

I said at the beginning that the next gtk-rs release was coming soon. If you want to follow it more closely, you can take a look at the release issue. A lot of nice things will come in as usual but I prefer to keep the announcement for when it'll actually come out. For now, the biggest blocker to this new release is that we want to wait for the Rust 1.39 release and the stabilization of the async/await feature. More to come later!

Time for thanks!

As usual, many thanks to the GNOME Foundation for sponsoring my travel and accomodation during the hackfest!

But mostly: many thanks to @Enrico and to @apiraino who organized this hackfest and to AssetData for the venue!