#gtk #gnome #GUI #gtk-rs

gtk

Rust bindings for the GTK+ 3 library

15 unstable releases (4 breaking)

0.4.1 Apr 29, 2018
0.4.0 Mar 17, 2018
0.3.0 Nov 26, 2017
0.1.3 May 6, 2017
0.0.3 Jul 18, 2015

#25 in GUI

Download history 718/week @ 2018-05-27 905/week @ 2018-06-03 844/week @ 2018-06-10 702/week @ 2018-06-17 662/week @ 2018-06-24 676/week @ 2018-07-01 486/week @ 2018-07-08 437/week @ 2018-07-15 577/week @ 2018-07-22 654/week @ 2018-07-29 558/week @ 2018-08-05 675/week @ 2018-08-12 565/week @ 2018-08-19

3,301 downloads per month

gtk Build Status Build status Gitter

Project site | Online documentation

Rust bindings and wrappers for GLib, GDK 3, GTK+ 3 and Cairo.

Building

gtk expects GTK+, GLib and Cairo development files to be installed on your system. See the requirements page.

Using

We recommend using crates from crates.io, as demonstrated here.

If you want to track the bleeding edge, use the git dependency instead:

[dependencies]
gtk = { git = "https://github.com/gtk-rs/gtk.git" }

Avoid mixing versioned and git crates like this:

# This will not compile
[dependencies]
gdk = "0.2"
gtk = { git = "https://github.com/gtk-rs/gtk.git" }

Documentation

The majority of the documentation is kept in a separate repo due to licensing issues. You can pull it in with cargo:

> cargo build --features embed-lgpl-docs

Changes to those doc-comments should be submitted to the lgpl-docs repo. Avoid including those embedded doc-comments in PRs to this repo.

The opposite feature removes all of those docs regardless of edits:

> cargo build --features purge-lgpl-docs

These features rewrite the crate sources so it's sufficient to enable them once. Omitting them in the following cargo invocations will not undo their effects!

Generate the docs:

> cargo doc --features v3_16

(if the installed GTK+ version is lower than 3.16, adjust the feature name accordingly).

Contribute

Contributor you're welcome!

See the general bindings documentation.

Most of the bindings (src/auto) are generated by gir using this configuration file. After editing Gir.toml the sources can be regenerated with

> make gir

When opening a PR please put the changes to the src/auto directory in a separate commit.

License

gtk is available under the MIT License, please refer to it.

MIT license

Dependencies

Reverse deps