Rust bindings and wrappers for GTK 3, part of gtk3-rs.
Currently, the minimum supported Rust version is 1.51.0
.
gtk expects GTK, GLib and Cairo development files to be installed on your system. See the GTK installation page.
We recommend using crates from crates.io, as demonstrated here.
If you want to track the bleeding edge, use the git dependency instead:
toml
[dependencies]
gtk = { git = "https://github.com/gtk-rs/gtk3-rs.git" }
Avoid mixing versioned and git crates like this:
```toml
[dependencies] gtk = "0.13" gtk = { git = "https://github.com/gtk-rs/gtk3-rs.git" } ```
Generate the docs:
```shell
cargo doc --features dox ```
(if the installed GTK+ version is lower than 3.16, adjust the feature name accordingly).
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
```shell
make gir ```
When opening a PR please put the changes to the src/auto
directory in a separate commit.
You may also wish to run cargo clippy -- -D warnings
and check that you're clean because
otherwise you may be surprised when CI fails.
gtk is available under the MIT License, please refer to it.