@@ -15,6 +15,8 @@ default-target = "x86_64-pc-windows-msvc"
1515
1616[features ]
1717x11 = [" x11rb" , " nix" , " cairo-sys-rs" ]
18+ gtk = [" gio" , " gdk" , " gdk-sys" , " glib" , " glib-sys" , " gtk-sys" , " gtk-rs" ]
19+ default = [" gtk" ]
1820
1921[dependencies ]
2022# NOTE: When changing the piet or kurbo versions, ensure that
@@ -30,19 +32,6 @@ instant = { version = "0.1.6", features = ["wasm-bindgen"] }
3032anyhow = " 1.0.32"
3133keyboard-types = { version = " 0.5.0" , default_features = false }
3234
33- # Optional dependencies
34- cairo-rs = { version = " 0.9.1" , default_features = false , optional = true }
35- cairo-sys-rs = { version = " 0.10.0" , default_features = false , optional = true }
36- gio = { version = " 0.9.1" , optional = true }
37- gdk = { version = " 0.13.2" , optional = true }
38- gdk-sys = { version = " 0.10.0" , optional = true }
39- gtk = { version = " 0.9.2" , optional = true }
40- glib = { version = " 0.10.1" , optional = true }
41- glib-sys = { version = " 0.10.0" , optional = true }
42- gtk-sys = { version = " 0.10.0" , optional = true }
43- nix = { version = " 0.18.0" , optional = true }
44- x11rb = { version = " 0.6.0" , features = [" allow-unsafe-code" , " present" , " randr" , " xfixes" ], optional = true }
45-
4635[target .'cfg(target_os="windows")' .dependencies ]
4736wio = " 0.2.2"
4837
@@ -58,17 +47,22 @@ objc = "0.2.7"
5847core-graphics = " 0.22.0"
5948foreign-types = " 0.3.2"
6049bitflags = " 1.2.1"
50+ cairo-rs = { version = " 0.9.1" , default_features = false , optional = true }
6151
62- # TODO(x11/dependencies): only use feature "xcb" if using X11
6352[target .'cfg(target_os="linux")' .dependencies ]
53+ # TODO(x11/dependencies): only use feature "xcb" if using X11
6454cairo-rs = { version = " 0.9.1" , default_features = false , features = [" xcb" ] }
65- gio = " 0.9.1"
66- gdk = " 0.13.2"
67- gdk-sys = " 0.10.0"
68- glib = " 0.10.1"
69- glib-sys = " 0.10.0"
70- gtk-sys = " 0.10.0"
71- gtk = { version = " 0.9.2" , features = [" v3_22" ] }
55+ cairo-sys-rs = { version = " 0.10.0" , default_features = false , optional = true }
56+ gio = { version = " 0.9.1" , optional = true }
57+ gdk = { version = " 0.13.2" , optional = true }
58+ gdk-sys = { version = " 0.10.0" , optional = true }
59+ # `gtk` gets renamed to `gtk-rs` so that we can use `gtk` as the feature name.
60+ gtk-rs = { version = " 0.9.2" , features = [" v3_22" ], package = " gtk" , optional = true }
61+ glib = { version = " 0.10.1" , optional = true }
62+ glib-sys = { version = " 0.10.0" , optional = true }
63+ gtk-sys = { version = " 0.10.0" , optional = true }
64+ nix = { version = " 0.18.0" , optional = true }
65+ x11rb = { version = " 0.6.0" , features = [" allow-unsafe-code" , " present" , " randr" , " xfixes" ], optional = true }
7266
7367[target .'cfg(target_arch="wasm32")' .dependencies ]
7468wasm-bindgen = " 0.2.67"
0 commit comments