# Freya 🦀
[](https://discord.gg/sYejxCdewG)
[](https://github.com/sponsors/marc2332)
[](https://codecov.io/github/marc2332/freya)
[](https://hotpath.rs/app/repos/marc2332/freya)
[Website](https://freyaui.dev) | [Documentation](https://docs.rs/freya/) | [Discord](https://discord.gg/sYejxCdewG) | [Contact](#contact)
**Freya** is a **cross-platform, native, declarative** GUI library for Rust 🦀.
### Usage 📜
Latest stable release:
```toml
freya = "0.4"
```
Next release:
```toml
freya = "0.5.0-rc.13"
```
`main` branch:
```toml
freya = { git = "https://github.com/marc2332/freya", branch = "main" }
```
### Trying it out 🚀
Make sure to have [Development Setup](https://docs.rs/freya/latest/freya/_docs/development_setup/index.html) ready.
> ⚠️ **This repo uses git submodules**, cloning without `--recurse-submodules` will make the examples fail to compile.
```shell
git clone --recurse-submodules https://github.com/marc2332/freya.git
cd freya
```
> **Already cloned without submodules?** Run `git submodule update --init --recursive` to fetch them.
Then run an example:
```shell
cargo run --example counter
```
> ⚠️ 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).
### Components & State
Freya’s component model lets you create reusable UI elements that automatically re-render when the state they depend on changes. Components can hold their own internal state or subscribe to shared state, and they produce UI as their output. Any type that implements the `Component` trait can be a component, while the root (`app`) component can simply be a function. Built-in examples include components like `Button` and `Switch`.






### 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.
- [Aiving](https://github.com/Aiving) for having made heavy contributions to [rust-skia](https://github.com/rust-skia/rust-skia/) for better SVG support, and helped optimizing images rendering in Freya.
- [RobertasJ](https://github.com/RobertasJ) for having added nested parenthesis to the `calc()` function and also pushed for improvements in the animation APIs.
- And to the rest of contributors and anybody who gave me any kind of feedback!
- [SparkyTD](https://github.com/SparkyTD) for contributing support for Android.
### History with Dioxus
Freya 0.1, 0.2 and 0.3 were based on the core crates of Dioxus. Starting 0.4 Freya does no longer use Dioxus, instead it uses its own reactive core, partially inspired by Dioxus but yet with lots of differences.
### Claude Code Skill
A Claude Code skill with Freya best practices and patterns is available. Install it with:
```
/plugin marketplace add marc2332/freya
/plugin install freya@freya-marketplace
```
For other AI coding agents, you can use the skill document directly as context: [plugins/freya/skills/freya/SKILL.md](plugins/freya/skills/freya/SKILL.md)
### License
[MIT License](./LICENSE.md)