Get started

Quickstart

Install the native libraries, add CrownUI to a project and open your first window.

CrownUI needs Rust 1.97 or newer and runs on Linux under a Wayland compositor.

Install

  1. Install the native libraries

    Arch Linux
    sudo pacman -S base-devel wayland wayland-protocols libxkbcommon \
      vulkan-icd-loader vulkan-headers mesa fontconfig freetype2 dbus
  2. Add the crate

    cargo new hello && cd hello
    cargo add crownui
  3. Write the app

    src/main.rs
    use crownui::prelude::*;
     
    fn main() -> Result<(), crownui::RunError> {
        crownui::run(
            component(|cx| {
                let count = cx.signal(0);
                vstack((
                    text(bind(move |rt| format!("Count: {}", count.get(rt)))),
                    button("+1").on_click(move |cx, _| count.update(cx, |count| *count += 1)),
                ))
                .p(24.0)
                .gap(12.0)
            }),
            AppConfig::new("Counter"),
        )
    }
  4. Run it

    cargo run

Features

FeatureDefaultWhat it adds
waylandyesThe Wayland platform
impelleryesThe Impeller renderer on Vulkan with a GLES fallback
tokioyesAsync tasks through cx.spawn
mcpyesAn in-app MCP server so AI agents can drive the app
accessibilityyesScreen reader support through AT-SPI
staticnoLinks libimpeller statically

Next steps

Learn how signals drive updates, then style your views.