Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marc2332/freya
Cross-platform GUI library for π¦ Rust powered by 𧬠Dioxus and π¨ Skia.
https://github.com/marc2332/freya
cross-platform dioxus gui hacktoberfest rust skia
Last synced: 7 days ago
JSON representation
Cross-platform GUI library for π¦ Rust powered by 𧬠Dioxus and π¨ Skia.
- Host: GitHub
- URL: https://github.com/marc2332/freya
- Owner: marc2332
- License: mit
- Created: 2022-07-27T15:28:11.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-26T12:46:10.000Z (3 months ago)
- Last Synced: 2024-10-29T14:57:11.248Z (3 months ago)
- Topics: cross-platform, dioxus, gui, hacktoberfest, rust, skia
- Language: Rust
- Homepage: https://freyaui.dev/
- Size: 8.91 MB
- Stars: 1,491
- Watchers: 12
- Forks: 63
- Open Issues: 91
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-rust-list - marc2332/freya
- awesome-rust-list - marc2332/freya
README
# Freya π¦
[![Discord Server](https://img.shields.io/discord/1015005816094478347.svg?logo=discord&style=flat-square)](https://discord.gg/sYejxCdewG)
[![Github Sponsors](https://img.shields.io/github/sponsors/marc2332?style=social)](https://github.com/sponsors/marc2332)
[![codecov](https://codecov.io/github/marc2332/freya/branch/main/graph/badge.svg?token=APSGEC84B8)](https://codecov.io/github/marc2332/freya)[Website](https://freyaui.dev) | [Nightly Docs](https://docs.freyaui.dev/freya) | [Stable Docs](https://docs.rs/freya/latest/freya) | [Book](https://book.freyaui.dev) | [Discord](https://discord.gg/sYejxCdewG)
**Freya** is a cross-platform GUI library for Rust powered by 𧬠[Dioxus](https://dioxuslabs.com) and π¨ [Skia](https://skia.org/).
**It does not use any web tech**, check the [Differences with Dioxus](https://book.freyaui.dev/differences_with_dioxus.html).
β οΈ It's currently work in progress, but you can already play with it! You can join the [Discord](https://discord.gg/sYejxCdewG) server if you have any question or issue.
```rust
fn app() -> Element {
let mut count = use_signal(|| 0);rsx!(
rect {
height: "50%",
width: "100%",
main_align: "center",
cross_align: "center",
background: "rgb(0, 119, 182)",
color: "white",
shadow: "0 4 20 5 rgb(0, 0, 0, 80)",
label {
font_size: "75",
font_weight: "bold",
"{count}"
}
}
rect {
height: "50%",
width: "100%",
main_align: "center",
cross_align: "center",
direction: "horizontal",
Button {
onclick: move |_| count += 1,
label { "Increase" }
}
Button {
onclick: move |_| count -= 1,
label { "Decrease" }
}
}
)
}
```![Freya Demo](https://github.com/marc2332/freya/assets/38158676/f81a95a2-7add-4dbe-9820-3d3b6b42f6e5)
### Want to try it? π€
π Make sure to check the [Setup guide](https://book.freyaui.dev/setup.html) first.
> β οΈ If you happen to be on Windows using `windows-gnu` and get compile errors, maybe go check this [issue](https://github.com/marc2332/freya/issues/794).
Clone this repo and run:
```shell
cargo run --example counter
```You can also try [`freya-template`](https://github.com/marc2332/freya-template)
### Usage π
Add Freya and Dioxus as dependencies:```toml
freya = "0.2"
dioxus = { version = "0.5", features = ["macro", "hooks"], default-features = false }
```
### Contributing π§ββοΈIf you are interested in contributing please make sure to have read the [Contributing](CONTRIBUTING.md) guide first!
### Features β¨
- βοΈ Built-in **components** (button, scroll views, switch and more)
- π Built-in **hooks** (animations, text editing and more)
- π Built-in **developer tools** (tree inspection, fps overlay)
- π§° Built-in **headless runner** to test UI
- π¨ **Theming** support
- π©οΈ **Cross-platform** (Windows, Linux, MacOS)
- πΌοΈ SKSL **Shaders** support
- π Multi-line **text editing**
- π¦Ύ **Accessibility** support
- 𧩠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 built-in components and hooks### Support π€
If you are interested in supporting the development of this project feel free to donate to my [Github Sponsor](https://github.com/sponsors/marc2332/) page.
Thanks to my sponsors for supporting this project! π
### Special thanks πͺ
- [Jonathan Kelley](https://github.com/jkelleyrtp) and [Evan Almloff](https://github.com/ealmloff) for making [Dioxus](https://dioxuslabs.com/) and all their help, specially when I was still creating Freya.
- [Armin](https://github.com/pragmatrix) for making [rust-skia](https://github.com/rust-skia/rust-skia/) and all his help and making the favor of hosting prebuilt binaries of skia for the combo of features use by Freya.
- [geom3trik](https://github.com/geom3trik) for helping me figure out how to add incremental rendering.
- [Tropical](https://github.com/Tropix126) for this contributions to improving accessibility and rendering.
- And to the rest of contributors and anybody who gave me any kind of feedback!### π€ Projects
[Valin](https://github.com/marc2332/valin) βοΈ is a Work-In-Progress cross-platform code editor, made with Freya π¦ and Rust, by me.
![Valin](https://github.com/marc2332/valin/raw/main/demo.png)
[MIT License](./LICENSE.md)