How to define gio features v2.70 for gtk requirement?

I have some crate that require

[dependencies.gtk]
package = "gtk4"
version = "0.9.1"
features = ["v4_10"]

As understand, this package includes default features for glib and gio sub-components.

Now I want activate gio features v2.70, is following method correct?

[dependencies.gio]
package = "gio"
version = "0.20.4"
features = ["v2_70"]

Or I can just append this requirement into the gtk requirement section? Not sure I understand crate dependencies well, to not append new extra crate where it is not really wanted (as gtk one already includes gio)

Thanks

gtk4 would need to expose the gio/v2_70 feature somewhere behind one of its own features. It exposes the gio/v2_76 feature as part of gnome_44, maybe enabling this feature of gtk4 instead of v4_10 does what you need?

1 Like

Thanks for reply,

can I just define gio 2.70 dependency as the part of this gtk construction (not by creating new one for gio below), mean some sub-array for features, because I don't use gio crate directly in the app so additional block looks strange a bit

[dependencies.gtk]
package = "gtk4"
version = "0.9.1"
features = ["v4_10"]

Anyway, tried and gtk::gio namespace work with separated block like in my first example

No. Like I said, gtk4 would need to expose this as their own feature, like they do with their gio_v2_80 feature, for example.

1 Like

Thanks for link to Cargo.toml , just updated gtk dependency with gnome_47 feature that includes valid gio version for set.

1 Like