Part 1 of 10 15 Jan 2026 By Raj Patil 15 min read

Part 1: Getting Started with Freya - Building Native Rust GUIs

Part 1 of the Freya Rust GUI series. Learn to set up your environment, configure Cargo, and build your first high-performance native desktop app with Rust.

Beginner #rust #freya #gui #desktop-app #rust-ui #native-ui #tutorial
Building Native GUIs with Rust & Freya 1 / 10

Getting Started with Freya

Welcome to the first tutorial in my Rust Freya series! In this tutorial, I’ll show you how to set up your development environment and create your first Freya application.

Prerequisites

Before starting, make sure you have:

Setting Up a New Freya Project

Create a new Freya project from scratch.

cargo new my-freya-app
cd my-freya-app

You can add Freya to your Cargo.toml in two ways:

Option 1: Using Crates.io (Standard)

For most users, simply adding the version from Crates.io is sufficient:

[dependencies]
freya = "0.4"

If you want to modify Freya itself or explore the source code easily, I recommend cloning the repo locally. This allows for smooth code navigation (Go to Definition) directly into Freya’s source.

  1. Clone Freya next to your project:

    git clone https://github.com/marc2332/freya.git
  2. Update your Cargo.toml to point to the local workspace:

    [dependencies]
    # Point to the local version
    freya = { path = "../freya", features = ["devtools", "router"] }
    freya-router = { path = "../freya/crates/router" }

[!TIP] Why use a local clone?

Setting up a local path dependency makes it incredibly easy to inspect how specific components work. You can Ctrl+Click (or Cmd+Click) on any Freya function in your IDE to jump straight to its implementation. This is exactly how I established the setup for UtilitiesPro.

Your First Freya App

Here’s a simple “Hello, World!” example:

use freya::prelude::*;

fn main() {
    launch(LaunchConfig::builder()
        .with_window(
            WindowConfig::builder()
                .with_title("My App")
                .with_size(800.0, 600.0)
                .build()
        )
        .build());
}

fn app() -> impl IntoElement {
    rect()
        .width(Size::fill())
        .height(Size::fill())
        .background(Color::from_rgb(30, 30, 30))
        .padding(20.0)
        .child(
            label()
                .font_size(24.0)
                .color(Color::WHITE)
                .text("Hello, Freya!")
        )
}

Run it with:

cargo run

What’s Next

In the next tutorial, I’ll explore Freya’s basic components and how to compose them into more complex UIs.

Summary