/freya

Native GUI library for 🦀 Rust powered by 🧬 Dioxus and 🎨 Skia.

Primary LanguageRustMIT LicenseMIT

Freya 🦀

Freya logo

Discord Server Github Sponsors codecov

Website | Docs | Book | Discord

Freya is native GUI library for Rust powered by 🧬 Dioxus and 🎨 Skia.

⚠️ It's currently work in progress and not usable for production, but you can already play with it! You can join the Discord server if you have any question or issue.



fn app(cx: Scope) -> Element {
    let mut count = use_state(cx, || 0);

    render!(
        container {
            height: "20%",
            width: "100%",
            background: "rgb(233, 196, 106)",
            padding: "12",
            color: "rgb(20, 33, 61)",
            label { 
                font_size: "20", 
                "Number is: {count}"
            }
        }
        container {
            height: "80%",
            width: "100%",
            background: "rgb(168, 218, 220)",
            color: "black",
            padding: "12",
            onclick: move |_| count += 1,
            label { "Click to increase!" }
        }
    )
}

Freya

Want to try it? 🤔

⚠️ See Environment setup first.

Run:

cargo run --example counter

Usage 📜

Add Freya as a dependency via git (it's not published on crates.io yet) in your Cargo.toml:

freya = { git = "https://github.com/marc2332/freya" }
dioxus = { git = "https://github.com/DioxusLabs/dioxus", rev="49c5a5043a16fc82210af146c345793dd448e519", features = ["macro", "hooks"]}

Features ✨

  • Support for Windows, Linux and MacOS
  • Text, containers, images, svg, etc
  • Headless testing
  • Hot reload
  • Optional DevTools panel
  • Components crate (with theming support)
    • Scroll views
    • Virtualized scroll views
    • Button
    • Slider
    • Switch
    • Dropdown
    • and a few more
  • Keyboard and Mouse events
  • Hooks crate for text editing, animating, theming..

Goals 😁

  • Performant
  • Low memory usage
  • Lightweight
  • Good developer experience
  • Cross platform

Status ⌚

You can see the tracking issues labeled with the tracking label to know what features are implemented and which ones are not, yet.

MIT License