Rust bindings to the minimalist, native, cross-platform UI toolkit `libui`
Rust
939
217 commits
updated Feb 17, 2023
iui is a simple (about 4 kLOC of Rust), small (about 800kb, including libui), easy to distribute (one shared library) GUI library, providing a Rusty user interface library that binds to native APIs via the libui and the ui-sys bindings crate.
iui wraps native retained mode GUI libraries, like Win32API on Windows, Cocoa on Mac OS X, and GTK+ on Linux and elsewhere. Thus all iui apps have a native look and feel and start from a highly performant base which is well integrated with the native ecosystem on each platform. Because it implements only the least common subset of these platform APIs, your apps will work on all platforms and won't have significant behavioral inconsistencies, with no additional effort on your part.
Add iui to your project with:
iui = "0.3"
Then, in your code, all you have to do is:
UI handle, initializing the UI library and guarding against memory unsafetyUI::main, or take control over the event processing with an EventLoop, and voíla! A GUI!Or, you can track the trunk branch, which may be broken and whose API often changes, with:
iui = { git = "https://github.com/rust-native-ui/libui-rs.git" branch="trunk" }
We have documentation on docs.rs for released versions and on github for trunk.

Check out the examples/ directory from the latest release for these examples and more.
This repository contains multiple Rust crates:
iui is the safe Rust wrapper, to be used by most users.ui-sys is the raw unsafe bindings to the libui C code. libui is included as a submodule.Also be sure to look at our changelog and learn how to contribute.
ui-sys includes libui as a sub-module and allows it to be built on-the-fly with the
default features fetch and build. With fetch disabled, it will simply build the
existing sources without updating them, and with build disabled it will build nothing,
assuming either a system or local (in ./lib/) version of libui is available.
Note that most of the time, building libui on the fly is what you want.
Based on work by @pcwalton.
(top 24 of 26)
455 followers · starred Oct 2018
127 followers · starred Oct 2018
58 followers · starred Feb 2020
270 followers · starred Dec 2018
Rust bindings to the minimalist, native, cross-platform UI toolkit `libui`
Rust
939
217 commits
updated Feb 17, 2023
iui is a simple (about 4 kLOC of Rust), small (about 800kb, including libui), easy to distribute (one shared library) GUI library, providing a Rusty user interface library that binds to native APIs via the libui and the ui-sys bindings crate.
iui wraps native retained mode GUI libraries, like Win32API on Windows, Cocoa on Mac OS X, and GTK+ on Linux and elsewhere. Thus all iui apps have a native look and feel and start from a highly performant base which is well integrated with the native ecosystem on each platform. Because it implements only the least common subset of these platform APIs, your apps will work on all platforms and won't have significant behavioral inconsistencies, with no additional effort on your part.
Add iui to your project with:
iui = "0.3"
Then, in your code, all you have to do is:
UI handle, initializing the UI library and guarding against memory unsafetyUI::main, or take control over the event processing with an EventLoop, and voíla! A GUI!Or, you can track the trunk branch, which may be broken and whose API often changes, with:
iui = { git = "https://github.com/rust-native-ui/libui-rs.git" branch="trunk" }
We have documentation on docs.rs for released versions and on github for trunk.

Check out the examples/ directory from the latest release for these examples and more.
This repository contains multiple Rust crates:
iui is the safe Rust wrapper, to be used by most users.ui-sys is the raw unsafe bindings to the libui C code. libui is included as a submodule.Also be sure to look at our changelog and learn how to contribute.
ui-sys includes libui as a sub-module and allows it to be built on-the-fly with the
default features fetch and build. With fetch disabled, it will simply build the
existing sources without updating them, and with build disabled it will build nothing,
assuming either a system or local (in ./lib/) version of libui is available.
Note that most of the time, building libui on the fly is what you want.
Based on work by @pcwalton.
(top 24 of 26)
455 followers · starred Oct 2018
127 followers · starred Oct 2018
58 followers · starred Feb 2020
270 followers · starred Dec 2018