Repolode
marc2332

marc2332/freya

A cross-platform, native, declarative GUI library for building desktop and mobile apps in Rust.

Stars
3,307
Forks
152
Open issues
42
Last commit
9 hours ago

What is it?

Freya is a declarative GUI library for Rust that renders native interfaces across desktop and other platforms. Developers describe UI as Rust functions and components, and state set with hooks such as use_state automatically triggers re-rendering of the parts that depend on it. It is built on its own reactive core rather than Dioxus, starting with version 0.4.

The library ships with a set of ready-made components, including Button, Switch, Slider, VirtualScrollView, Calendar and ColorPicker. Optional feature flags add a code editor based on tree-sitter, a Markdown viewer, routing, global state through freya-radio, Fluent-based i18n, Material Design styling, HTML/CSS rendering via Blitz, a terminal emulator with PTY support, and plotting through Plotters.

Freya also offers headless testing through freya-testing, which can simulate clicks and render the UI to an image file, along with a devtools app for inspecting the component tree.

Key features

  • 01Declarative component model with hooks-based state that re-renders dependent UI automatically.
  • 02Built-in components such as Button, Switch, Slider, Calendar and VirtualScrollView.
  • 03Optional code editor using Rope for text and tree-sitter for syntax highlighting.
  • 04Routing, global state management, and Fluent-based internationalization via feature flags.
  • 05Embedded terminal emulator with PTY support and HTML/CSS rendering through Blitz.
  • 06Headless testing with the ability to render the UI to a file.

Use cases

  • Building native desktop tools or utilities in pure Rust.
  • Creating developer tools such as code editors or terminal-based interfaces.
  • Prototyping data visualization dashboards with the plotting feature.
  • Writing UI tests for Rust GUI applications without opening a window.

Quick start

  1. 1

    Add Freya to your Cargo.toml

  2. 2

    Clone the repo with submodules

    git clone --recurse-submodules https://github.com/marc2332/freya.git
  3. 3

    Change into the project directory

    cd freya
  4. 4

    Run an example

    cargo run --example counter

Things to know

  • Requires a Rust development setup and git submodules to run the examples.
  • Windows windows-gnu builds may hit compile errors.

In collections

Topics

FAQ

What is freya?
A cross-platform, native, declarative GUI library for building desktop and mobile apps in Rust. Freya is a declarative GUI library for Rust that renders native interfaces across desktop and other platforms. Developers describe UI as Rust functions and components, and state set with hooks such as use_state automatically triggers re-rendering of the parts that depend on it. It is built on its own reactive core rather than Dioxus, starting with version 0.4.
Is freya free to use? What license does it have?
freya is open source under the MIT license. Check the license terms before using it in commercial products.
Is freya still maintained?
Actively maintained. The last commit to freya was on Nov 6, 2026.
What can I use freya for?
Building native desktop tools or utilities in pure Rust. Creating developer tools such as code editors or terminal-based interfaces. Prototyping data visualization dashboards with the plotting feature. Writing UI tests for Rust GUI applications without opening a window.
How do I install freya?
Add Freya to your Cargo.toml Clone the repo with submodules: git clone --recurse-submodules https://github.com/marc2332/freya.git Change into the project directory: cd freya Run an example: cargo run --example counter
Where can I get freya?
The source code and installation instructions are on GitHub: https://github.com/marc2332/freya

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects