#skia #dioxus #desktop #ui

freya-renderer

Internal renderer powered by Skia for Freya

7 releases

0.2.1 Apr 27, 2024
0.2.0 Apr 27, 2024
0.1.6 Sep 16, 2023
0.1.5 Aug 27, 2023

#1396 in GUI

Download history 24/week @ 2024-07-22 32/week @ 2024-07-29 24/week @ 2024-08-05 23/week @ 2024-08-12 25/week @ 2024-08-19 47/week @ 2024-08-26 74/week @ 2024-09-02 54/week @ 2024-09-09 45/week @ 2024-09-16 91/week @ 2024-09-23 72/week @ 2024-09-30 39/week @ 2024-10-07 40/week @ 2024-10-14 22/week @ 2024-10-21 29/week @ 2024-10-28 22/week @ 2024-11-04

122 downloads per month
Used in 3 crates (2 directly)

MIT license

665KB
16K SLoC

Freya 🦀

Freya logo

Discord Server Github Sponsors codecov

Website | Nightly Docs | Stable Docs | Book | Discord

Freya is a 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() -> Element {
    let mut count = use_signal(|| 0);

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

Freya Demo

Sponsors 🤗

Thanks to my sponsors for supporting this project! 😄

Alberto Mendezandar1an

Want to try it? 🤔

⚠️ First, see Environment setup.

Clone this repo and run:

cargo run --example counter

You can also try freya-template

Usage 📜

Add Freya and Dioxus as dependencies:

freya = "0.2"
dioxus = { version = "0.4", features = ["macro", "hooks"], default-features = false }

Features ✨

  • ⛏️ Built-in components (button, scroll views, switch and more)
  • 🚇 Built-in hooks library (animations, text editing and more)
  • 🔍 Built-in devtools panel (experimental ⚠️)
  • 🧰 Built-in headless testing runner for components
  • 🎨 Theming support (not extensible yet ⚠️)
  • 🛩️ Cross-platform (Windows, Linux, MacOS)
  • 🖼️ SKSL Shaders support
  • 🔄️ Dioxus Hot-reload support
  • 📒 Multi-line text editing (experimental ⚠️)
  • 🦾 Basic Accessibility Support (experimental ⚠️)
  • 🧩Compatible with dioxus-sdk and other Dioxus renderer-agnostic libraries

Goals 😁

  • Performant and low memory usage
  • Good developer experience
  • Cross-platform support
  • Decent Accessibility support
  • Useful testing APIs
  • Useful and extensible components and hooks

Status ⌚

You can see the tracking issue to know what features are implemented and which ones are not, yet.

MIT License

Dependencies

~21–57MB
~1M SLoC