#icons #ffi #sys

sys appindicator3-sys

FFI bindings for the AppIndicator and AyatanaAppIndicator library

4 releases

0.0.4 Aug 29, 2023
0.0.3 Mar 19, 2022
0.0.2 Mar 18, 2022
0.0.1 Mar 18, 2022

#411 in #ffi

Download history 10/week @ 2023-10-15 15/week @ 2023-10-22 17/week @ 2023-10-29 12/week @ 2023-11-05 10/week @ 2023-11-12 14/week @ 2023-11-19 26/week @ 2023-11-26 14/week @ 2023-12-03 7/week @ 2023-12-10 12/week @ 2023-12-17 19/week @ 2023-12-24 15/week @ 2023-12-31 7/week @ 2024-01-07 18/week @ 2024-01-14 44/week @ 2024-01-21 28/week @ 2024-01-28

101 downloads per month
Used in appindicator3

MIT license

154 lines


LGPL-2.1 licensed

Rust bindings for the AppIndicator and AyatanaAppIndicator library.

Ayatana Application Indicator Library

Allows applications to export a menu into the an Application Indicators aware menu bar. Based on KSNI it also works in KDE and will fallback to generic Systray support if none of those are available.


Add the following to your Cargo.toml:

appindicator3 = "0.2.0"

By default appindicator3-rs links against the libayatana-appindicator3 library. To link against the original libappindicator3 library enable the original feature:

appindicator3 = { version = "0.2.0", feature = ["original", "v0_5"] }


You will need the development packages for libayatana-appindicator3 to compile against this crate.


sudo apt install libayatana-appindicator3-dev


sudo zypper install libayatana-appindicator3-devel
# or for feature = ["original"]
sudo zypper install libappindicator3-devel 

Example Program

use appindicator3::{prelude::*, IndicatorStatus};
use appindicator3::{Indicator, IndicatorCategory};
use gtk::prelude::*;

fn main() {

    let m = gtk::Menu::new();
    let mi = gtk::MenuItem::with_label("Hello World");
    mi.connect_activate(|_| {

    let _indicator = Indicator::builder("Example")
        .icon("face-smile", "icon")


Additonal examples can be found in examples.


A large portion of the bindings is auto generated by GObject Introspection and gir using this configuration file.

More details on how to use gir can be found here.


appindicator3-rs is available under the MIT License. Please refer to the LICENSE file. This project provides bindings to the Application Indicator library but doesn't distribute any parts of it. Distributing compiled libraries and executable that link to this library may be subject to other licenses.


~70K SLoC