Nuit
A declarative, cross-platform UI library for Rust that uses native controls.
| Crate | Description | Version | Docs |
|---|---|---|---|
| nuit | Umbrella crate for the library | ||
| nuit-bridge-adwaita | Adwaita backend (Linux, macOS) | ||
| nuit-bridge-swiftui | SwiftUI backend (macOS, iOS) | ||
| nuit-core | Core structures and traits | ||
| nuit-derive | Derive macros |
Nuit's API takes inspiration from SwiftUI, Xilem, React and a number of other frameworks, while itself using SwiftUI under the hood on macOS.
[!NOTE] Nuit currently requires a nightly Rust toolchain as it uses a number of cutting edge/unstable compiler features, including
- impl Trait in type aliases
- associated type defaults
- macro metavariable expressions
letchains- reentrant locks
With
rustupthis can be configured conveniently on a per-directory basisrustup override set nightlyor, as in this repository, automatically with arust-toolchain.toml.
Example
use ;
Running this example, e.g. with cargo run --example counter, launches:
| SwiftUI | Adwaita (GTK4) |
|---|---|