kui-native
The windowed kui runner: a winit window and a wgpu renderer around kui-core,
with the App trait an application implements.
kui is a Rust UI library whose view is a plain data tree rebuilt every
frame. kui-native is the crate most apps depend on. It re-exports all of
kui-core (the model, the layout, the widgets), draws through kui-wgpu, and
adds the App trait, the app(...) launcher builder, multiple windows, the
clipboard, file dialogs, audio, AccessKit and a headless testing driver
that runs under plain cargo test.
Install
Default features: audio, accesskit, derive (#[derive(Message)]) and
dialogs; each can be turned off with --no-default-features.
On Linux the build needs pkg-config and ALSA's headers (libasound2-dev
on Debian and Ubuntu). A window loads libxkbcommon, the X11 or Wayland
client libraries and Vulkan or EGL at run time. macOS and Windows need only
a Rust toolchain.
Example
use widgets;
use ;
Where it fits
| Crate | What it is |
|---|---|
| kui-native | This crate: the windowed runner most apps use |
| kui-core | The model, layout, widgets and events, no window |
| kui-wgpu | The GPU renderer |
| kui-derive | #[derive(Message)] |
| kui-lua, kui-ffi | Lua and C bindings; kui-node is the Node.js binding, on npm |
Documentation
- API: https://docs.rs/kui-native
- The book, a tutorial from a window to a tested app: https://kui-book.qxuken.dev
- Repository and examples: https://github.com/qxuken/kui
License
MIT