29 releases

0.9.0-alpha.0 Jan 4, 2026
0.8.1 Nov 26, 2025
0.8.0 Jul 15, 2025
0.7.2 Mar 19, 2025
0.1.0-alpha-2 Jul 12, 2021

#59 in GUI

Download history 10810/week @ 2025-10-26 9525/week @ 2025-11-02 9560/week @ 2025-11-09 10498/week @ 2025-11-16 9867/week @ 2025-11-23 11645/week @ 2025-11-30 9178/week @ 2025-12-07 9469/week @ 2025-12-14 9872/week @ 2025-12-21 10171/week @ 2025-12-28 11452/week @ 2026-01-04 10528/week @ 2026-01-11 11199/week @ 2026-01-18 13020/week @ 2026-01-25 14052/week @ 2026-02-01 12146/week @ 2026-02-08

52,052 downloads per month
Used in 56 crates (38 directly)

MIT license

2MB
53K SLoC

libadwaita-rs

The Rust bindings of libadwaita

Website: https://world.pages.gitlab.gnome.org/Rust/libadwaita-rs

Documentation


lib.rs:

Rust Adwaita bindings

This library contains safe Rust bindings for Adwaita, a library that offers building blocks for modern GNOME applications.

See also

Example

Adwaita needs to be initialized before use. This can be done by either:

The libadwaita crate is usually renamed to adw. You can do this globally in your Cargo.toml file:

[dependencies.adw]
package = "libadwaita"
version = "0.x.y"
use adw::prelude::*;

use adw::{ActionRow, Application, ApplicationWindow, HeaderBar};
use gtk::{Box, ListBox, Orientation, SelectionMode};

fn main() {
    let application = Application::builder()
        .application_id("com.example.FirstAdwaitaApp")
        .build();

    application.connect_activate(|app| {
        // ActionRows are only available in Adwaita
        let row = ActionRow::builder()
            .activatable(true)
            .title("Click me")
            .build();
        row.connect_activated(|_| {
            eprintln!("Clicked!");
        });

        let list = ListBox::builder()
            .margin_top(32)
            .margin_end(32)
            .margin_bottom(32)
            .margin_start(32)
            .selection_mode(SelectionMode::None)
            // makes the list look nicer
            .css_classes(vec![String::from("boxed-list")])
            .build();
        list.append(&row);

        // Combine the content in a box
        let content = Box::new(Orientation::Vertical, 0);
        // Adwaitas' ApplicationWindow does not include a HeaderBar
        content.append(&HeaderBar::new());
        content.append(&list);

        let window = ApplicationWindow::builder()
            .application(app)
            .title("First App")
            .default_width(350)
            // add content to window
            .content(&content)
            .build();
        window.present();
    });

    application.run();
}

Dependencies

~20MB
~480K SLoC