30 releases

Uses new Rust 2024

0.9.1 Feb 21, 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

#55 in GUI

Download history 10485/week @ 2025-11-19 10765/week @ 2025-11-26 10721/week @ 2025-12-03 8978/week @ 2025-12-10 9906/week @ 2025-12-17 9712/week @ 2025-12-24 10925/week @ 2025-12-31 10482/week @ 2026-01-07 11523/week @ 2026-01-14 12071/week @ 2026-01-21 12766/week @ 2026-01-28 13238/week @ 2026-02-04 13104/week @ 2026-02-11 14243/week @ 2026-02-18 14511/week @ 2026-02-25 16130/week @ 2026-03-04

59,371 downloads per month
Used in 62 crates (43 directly)

MIT license

2MB
55K 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
~483K SLoC