Hi everyone!

This release was supposed to be a minor one and to be released a lot sooner. However, as the time passed, gtk-rs developers weren’t happy with what they had. There was always that little (but still wonderful) thing missing that we absolutely wanted to have. Suddenly, huges improvements came in and breaking changes as well. And this, is exactly how you end up from some very little and quicky release to medium and huge one.

So what took us so long to add? A lot of things, the list is quite long. You can check the pull requests below. Let’s just focus on the main ones.

First, a small one: the dox feature: now, when building documentation, whatever platform you’re on or library version you have, you’ll be able to generate documentation for everything and have access to it locally. So to build your documentation locally, you just need to run:

cargo doc --features "dox embed-lgpl-docs" # this second command removes the generated doc comments from the crate's code cargo build --features "purge-lgpl-docs"

Pretty easy, right?

Now, secondly, @antoyo added async support. You’ll now be able to call API functions without blocking the GUI. You’ll also be able to control those with the Cancellable type. He also said that he would add the async functions/methods support in relm as soon as possible, no more details in there haha.

Ok, now take a deep breath, the list for @sdroege’s changes is quite long:

SignalHandlerId and SourceId are now newtype wrappers instead of integers and can’t be copy/clone anymore. It prevents to reuse of them or the usage of arbitrary numbers.

and are now newtype wrappers instead of integers and can’t be copy/clone anymore. It prevents to reuse of them or the usage of arbitrary numbers. Arguments in signal trampolines are borrowed now, which prevents some copy and unneeded refcounting.

GHookList is generated in the -sys bindings.

is generated in the -sys bindings. Enums have been updated in order to avoid unwanted soundless bugs appearing in case of C API update between two versions.

Emitter functions for action signals are now generated.

Panics from signal callbacks print something meaningful now instead of just exiting silently.

Various new impls for the translation traits to make everything more complete.

ObjectExt::set_value() / emit() now take a &ToValue instead of Value, making it easier to use.

/ now take a &ToValue instead of Value, making it easier to use. Closure::invoke() / ObjectExt::emit() don’t allocate anything now if the number of arguments is < 10 (it’s placed on the heap).

/ don’t allocate anything now if the number of arguments is < 10 (it’s placed on the heap). Removed implementation of DerefMut for TypedValue . This allowed to store wrongly typed values inside TypedValue , e.g. an u32 in a TypedValue<String> .

for . This allowed to store wrongly typed values inside , e.g. an in a . Value is not Send + Sync anymore and a SendValue that only allows Send types to be stored was added. Previously Value allowed to store non- Send types but could be sent to another thread due to being Send itself independent of the content.

is not anymore and a that only allows types to be stored was added. Previously allowed to store non- types but could be sent to another thread due to being itself independent of the content. IsA is an unsafe trait now, as otherwise safe code could implement the IsA relationship between incompatible types which would result in memory unsafety.

is an unsafe trait now, as otherwise safe code could implement the relationship between incompatible types which would result in memory unsafety. Added AnyValue / AnySendValue that allows storing any Rust value that is Any + Clone + 'static to be stored in a glib::Value .

/ that allows storing any Rust value that is to be stored in a . Added support for storing/retrieving a (NULL-terminated) array of strings in/from glib::Value .

. Added some new API for working with Type such is_a() , parent() , etc…

such , , etc… ObjectExt::connect() now panics if the callback return value is incompatible with signal’s, and allow return values that are a subtype of the signal’s return value.

@Epashkin’s changes are less visible but just as important. As always, he made of very important fixes, adds and reviews but since they’re very gir specific, I invite you to check them directly into the gir repository.

Lastly, a little change that’ll only impact people using gtk-rs sys crates: all sys types now have a Debug implementation. We hope it’ll make debugging much easier in order to help expanding the gtk-rs crates environment.

That’s it! (Yes, it was quite long.)

Hope you’ll enjoy this new version and see you next time!

Changes

For the interested ones, here is the list of the (major) changes:

cairo:

sourceview:

glib:

gio:

pango:

gdk:

gtk:

Thanks to all of our contributors for their (awesome!) work for this release: