#gtk #user-interface #ui #windows #macos

sys libui-ffi

Easy to build low-level bindings to 'libui-ng'

4 releases (breaking)

Uses old Rust 2015

0.3.0 Aug 6, 2023
0.2.0 Apr 28, 2023
0.1.0 Mar 29, 2023
0.0.0 Mar 18, 2023

#226 in #gtk


Used in libui

MIT license

1.5MB
43K SLoC

C 19K SLoC // 0.1% comments C++ 14K SLoC // 0.1% comments Objective-C 10K SLoC // 0.1% comments Rust 313 SLoC // 0.1% comments Go 133 SLoC // 0.0% comments Swift 68 SLoC // 0.0% comments GNU Style Assembly 45 SLoC Python 24 SLoC // 0.1% comments Shell 18 SLoC // 0.1% comments Batch 8 SLoC

Contains (Zip file, 6KB) cmocka_1.1.5-4_patch.zip

libui-ffi

Autogenerated bindings to libui-ng for use in the high-level rust version of libui. It is not meant to be used directly. Compared to other bindings, the goal is to cut down on the buildtool dependencies to ease installation and compilation.

Prerequisits & Building

Required are compiler, linker, git and the UI platform SDK. No CMake, no Python, no Meson.

Linux:

  • libgtk-3-dev (debian package) - UI platform headers
  • libclang (debian package) - for generating the libui-ng bindings.

Windows:

  • MSVC (via Windows SDK or Visual Studio) - Platform headers, compiler and linker.
  • LLVM - for generating the libui-ng bindings.

Why libclang / LLVM?

Bindgen relies on libclang, but doesn't ship it.

Does MinGW work instead of MSVC?

Not sure. MinGW-64 instead of MSVC does compile and link. libui applications compiled with MinGW-64 versions <= 4.X won't start due to MinGW missing TaskDialog(). Later versions should work properly.

Patches

This crate applies some patches to libui-ng to provide a better experience. Please see the patches directory.

  • allow_small_pbar.patch - The progress bar minimum width is reduced for Windows to better match the behaviour of GTK and Cocoa progress bars.

Dependencies

~0–3MB
~46K SLoC