Crate Minimum supported version
atk 2.30
cairo 1.14
gdk 3.16
gdk-pixbuf 2.32
gdk-x11 3.14
gio 2.44
glib 2.44
gtk 3.16
pango 1.38
pangocairo 1.0
sourceview 3.0


First, prepare your system by taking a look at the GTK installation page.

Then include gtk and gio in your Cargo.toml and set the minimal GTK version required by your project:

version = "0.9.0"
features = ["v3_16"]

version = ""
features = ["v2_44"]

The code is stable and feature complete, but the APIs might change in the future.

Import the gtk and gio crates and their traits:

extern crate gtk;
extern crate gio;

use gtk::prelude::*;
use gio::prelude::*;

Create an application, etc.

use gtk::{Application, ApplicationWindow, Button};

fn main() {
    let application = Application::new(
    ).expect("failed to initialize GTK application");

    application.connect_activate(|app| {
        let window = ApplicationWindow::new(app);
        window.set_title("First GTK+ Program");
        window.set_default_size(350, 70);

        let button = Button::with_label("Click me!");
        button.connect_clicked(|_| {


Using latest, not published version

Include gtk in your Cargo.toml not as crate but from git:

git = ""
features = ["v3_16"]

Projects using gtk-rs

If you want yours to be added to this list, please create a Pull Request for it!