Skip to content
omniflaPublic

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

meow

A declarative, reactive UI framework for Rust, inspired by Unreal Engine's Slate. Built for tools, apps, and in-game UI. Runs on Windows and Linux.

meow demo

Quick start

[dependencies]
meow = { git = "https://github.com/omnifla/meow", features = ["desktop"] }
use meow::base::Size;
use meow::reactive::Signal;
use meow::style::Color;
use meow::widgets::{Button, ButtonStyle, Flex, Text};

const WHITE: Color = Color::rgba(1.0, 1.0, 1.0, 1.0);

fn main() {
    let count = Signal::new(0u32);

    let style = ButtonStyle {
        normal: Color::rgba(0.35, 0.6, 1.0, 1.0),
        hovered: Color::rgba(0.5, 0.72, 1.0, 1.0),
        pressed: Color::rgba(0.2, 0.4, 0.8, 1.0),
    };
    let button = Button::new(Size { width: 120.0, height: 40.0 }, style)
        .label(Text::new("Add one", 16.0, WHITE))
        .on_click({
            let count = count.clone();
            move || count.update(|n| *n += 1)
        });

    let label = Text::bind(24.0, WHITE, move || format!("Clicked {} times", count.get()));

    meow::platform::run(
        "counter",
        Flex::column().padding(16.0).gap(12.0).child(label).child(button),
    );
}

Try the demo

git clone https://github.com/omnifla/meow.git
cd meow
cargo run --example hello_window --features desktop

On Ubuntu or Debian, install the system libraries first:

sudo apt install build-essential pkg-config libfontconfig1-dev libxkbcommon-dev libwayland-dev libx11-dev libxcursor-dev libxi-dev libxrandr-dev libvulkan1 mesa-vulkan-drivers

Graphics notes

meow picks Vulkan, DX12, or Metal when a real GPU supports them. If the default adapter is a software renderer, it retries with OpenGL. Set WGPU_BACKEND to vulkan, dx12, metal, or gl to choose one yourself. MEOW_PROFILE=1 prints the adapter and per-second frame timings.

Status

Early, pre-1.0, and the API will change. Tested on Windows and on Linux over X11. macOS and native Wayland are untested.

Not built yet: dropdowns, accessibility, shared theming, and a few text input extras (word select, IME).

Contributing

See CONTRIBUTING.md. Please follow the Code of Conduct, and report security problems as described in SECURITY.md.

License

MIT, see LICENSE.

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages