#windowing

tao

Cross-platform window manager library

11 unstable releases (3 breaking)

0.4.0 Jul 14, 2021
0.3.1 Jun 23, 2021
0.2.6 May 17, 2021
0.1.0 Apr 30, 2021

#192 in GUI

Download history 14/week @ 2021-04-28 768/week @ 2021-05-05 1910/week @ 2021-05-12 1206/week @ 2021-05-19 930/week @ 2021-05-26 525/week @ 2021-06-02 629/week @ 2021-06-09 742/week @ 2021-06-16 1642/week @ 2021-06-23 1135/week @ 2021-06-30 1136/week @ 2021-07-07 1792/week @ 2021-07-14 1419/week @ 2021-07-21 1337/week @ 2021-07-28

3,610 downloads per month
Used in 2 crates (via wry)

Apache-2.0 and maybe LGPL-2.1/LGPL-3.0

1MB
25K SLoC

tao

Chat Server devto devto https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg support

Cross-platform application window creation library in Rust that supports all major platforms like Windows, macOS, Linux, iOS and Android. Built for you, maintained for Tauri.

Cargo Features

Tao provides the following features, which can be enabled in your Cargo.toml file:

  • serde: Enables serialization/deserialization of certain types with Serde.
  • tray: Enables system tray and more menu item variants on Linux. This flag is enabled by default. You can still create those types if you disable it. They just don't create the actual objects. We set this flag because some implementations require more installed packages. Disable this if you don't want to install libappindicator, sourceview, clang packages.
  • menu: Enables menu item variants on Linux. If you enable tray, this flag is not required. You can still create those types if you disable it. They just don't create the actual objects. We set this flag because some implementations require more installed packages. Disable this if you don't want to install sourceview package.

Platform-specific notes

Android

This library makes use of the ndk-rs crates, refer to that repo for more documentation.

Running on an Android device needs a dynamic system library, add this to Cargo.toml:

[[example]]
name = "request_redraw_threaded"
crate-type = ["cdylib"]

And add this to the example file to add the native activity glue:

#[cfg_attr(target_os = "android", ndk_glue::main(backtrace = "on"))]
fn main() {
    ...
}

And run the application with cargo apk run --example request_redraw_threaded

Linux

Gtk and its related libraries are used to build the support of Linux. Be sure to install following packages before building:

Arch Linux / Manjaro:

sudo pacman -S gtk3 gtksourceview3 libappindicator-gtk3 clang

Debian / Ubuntu:

sudo apt install libgtk-3-dev libgtksourceview-3.0-dev libappindicator3-dev clang

MacOS

To ensure compatibility with older MacOS systems, tao links to CGDisplayCreateUUIDFromDisplayID through the CoreGraphics framework. However, under certain setups this function is only available to be linked through the newer ColorSync framework. So, tao provides the TAO_LINK_COLORSYNC environment variable which can be set to 1 or true while compiling to enable linking via ColorSync.

Acknowledgement

We would like to thank the authors and contributors to winit for their groundbreaking work upon which this crate is not only based, but also leans heavily upon. Thankyou!!!

Dependencies

~0.1–5MB
~127K SLoC