libui-ng-sys

crates.io docs MPL 2.0 licensed

Rust bindings to libui-ng.

Features

build

This feature is enabled by default. When build is enabled, the libui-ng-sys build script automatically fetches, compiles, and statically links libui-ng to the final build product. Otherwise, when build is disabled, the system libui-ng is linked dynamically.

This feature may require external dependencies that cannot be automatically fetched by libui-ng-sys. The following sections list requirements for different values of $CARGO_CFG_TARGET_OS.

All

linux

windows

These may be acquired from the Visual Studio Installer.

Other

Other targets are not currently supported.

build-with-ninja

This feature is enabled by default and implies build. When build-with-ninja is enabled, libui-ng is built with Ninja.

windows

Building with Ninja requires that certain compiler components are included in your $PATH. In this case, it may be best to build libui-ng-sys while in a Developer Command Prompt or Developer Powershell. If libui-ng-sys suspects that an error due to missing compiler components has occurred, it will issue a warning to use a developer shell.

build-ninja

This feature is enabled by default and implies build-with-ninja. When build-ninja is enabled, Ninja is automatically fetched, compiled, and used to build libui-ng.

build-with-msvc

This feature implies build. When build-with-msvc is enabled, libui-ng is built with the system MSVC.

windows

The following Visual Studio components are required:

build-with-xcode

This feature implies build. When build-with-xcode is enabled, libui-ng is built with Xcode.

macos

Version Mapping

When the build feature is enabled, libui-ng-sys requires libui-ng, Meson, and possibly Ninja as dependencies, but Rust crates do not exist for them yet. To work around this, these are included as Git submodules. The latest commit hashes of the submodules are documented below for each version of libui-ng-sys.

0.2.0–0.5.0

| Dependency | Commit Hash | | ---------- | ------------------------------------------ | | libui-ng | 42641e3d6bfb2c49ca4cc3b03d8ae277d9841a5d | | Meson | 09ad4e28f1a59ab3d87de6f36540a108e836cfe5 | | Ninja | 25cdbae0ee1270a5c8dd6ba67696e29ad8076919 |

0.1.0

| Dependency | Commit Hash | | ---------- | ------------------------------------------ | | libui-ng | 42641e3d6bfb2c49ca4cc3b03d8ae277d9841a5d |

Acknowledgements

libui-ng-sys, and its sister crate boing, are the -ng analogues to @NoraCodes' libui-rs, which predated these crates by at least two years. Though it shares no common code with libui-ng-sys or boing and was developed separately, libui-rs was nonetheless inspiration for these crates, and I recommend checking out libui-rs as well as Nora's other work.

I should also thank @cody271 and @szanni for their help and contributions to libui-ng.