Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installation and first run

This page covers the app-author path: install the toolchain, generate an application with flui create, and run it. For the fuller reference (full prerequisites table, every bundled example, troubleshooting) see docs/getting-started.md in the repository.

If you want to work on FLUI itself rather than build an app with it, see Contributing to FLUI instead — the setup is different (a workspace checkout, not a generated application).

Prerequisites

ToolMinimum versionNotes
Rust via rustup1.100The checkout pins 1.100.0 in rust-toolchain.toml; an application outside it needs its own toolchain selection (below).
Gitany recentUsed to clone FLUI and initialize the generated application.
Native toolchainplatform-specificMSVC on Windows, Xcode CLT on macOS, NDK on Android (only if targeting Android).

The flui CLI is published on crates.io as flui-cli (cargo install flui-cli --locked); the framework crates are not. A project generated by a crates.io CLI depends on the FLUI git tag that matches the CLI’s version, and the first cargo build clones it. This page instead builds the CLI from a checkout and generates an application against that checkout’s source (--local), so the CLI and the framework share one source tree.

Install the CLI and create an app

Clone the flui repository, then install its CLI:

git clone https://github.com/vanyastaff/flui
cd flui
cargo install --path crates/flui-cli --locked
flui create my_app --local --path ../apps --no-check
cd ../apps/my_app
rustup override set 1.100.0
cargo check
flui doctor
flui run

--no-check postpones the scaffold’s compile check until you have selected the application’s toolchain. The generated project does not contain a rust-toolchain.toml, and a path dependency on FLUI does not select the checkout’s toolchain for it. rustup override set selects Rust for this application directory; it leaves your global default unchanged. Run the commands one at a time and fix any failed check before proceeding to flui run.

The default template is counter. A desktop window should show a count and an Increment button. Press the button to update the count; close the window to exit. The application lives in src/lib.rs; src/main.rs mounts its root with flui::run_app. The template also generates headless interaction tests: run cargo test from the application directory to exercise them.

The generated application can live outside the FLUI repository. Bare --local uses the current directory as its source checkout; from another directory, use --local=/path/to/flui. The source must remain available afterward — the generated flui dependency points at the checkout root by absolute path. flui is the application’s only framework dependency; UI code starts with use flui::prelude::*;. No design system is on by default: to use flui::material or flui::cupertino, add features = ["material"] (or "cupertino") to the flui dependency in the generated Cargo.toml.

flui run reloads an edit of the generated application’s code on Linux, macOS and Windows, keeping each State whose layout the edit left alone; an edit to its manifest or dependencies restarts it, and neither needs anything in the project (hot reload). See the CLI guide for template and build options.

Run a bundled example instead

To try FLUI without generating a project first, run one of the bundled examples from the repository checkout:

cargo run --locked --example counter

A window opens showing a count and an “Increment” button — the same shape flui create’s counter template generates. See the full example table and web/Android instructions in docs/getting-started.md.

Diagnose a failed first run

Run flui doctor --verbose from the application directory to inspect the selected Rust version and tool paths. Optional Android, iOS, and Web tooling can produce warnings without blocking a desktop app. For a target-specific check, use flui doctor --android, --ios, or --web.

SymptomNext step
flui command not found after installationPut Cargo’s binary directory on PATH (~/.cargo/bin, or %USERPROFILE%\.cargo\bin on Windows), then open a new terminal.
Rust version below 1.100Run rustup override set 1.100.0 in the application directory, then retry cargo check.
Windows cannot find or run link.exeInstall Visual Studio Build Tools with the Desktop development with C++ workload and Windows SDK.
flui::material or flui::cupertino import is unresolvedEnable the corresponding facade feature in the application’s Cargo.toml.
Local FLUI dependency cannot be foundKeep the source checkout at its original location, or update its absolute path in the application’s Cargo.toml.

For application logs, set RUST_LOG=flui_app=debug,flui_engine=debug before flui run (Bash: export RUST_LOG=flui_app=debug,flui_engine=debug; PowerShell: $env:RUST_LOG = "flui_app=debug,flui_engine=debug"). CLI diagnostics use flui -v run; they are separate from application logs. A release build from flui run --release or flui build --release holds application events up to info only, and says so in its log (a flui_log::ceiling warning) when RUST_LOG asks for more. A successful compile does not verify your window system or GPU: consult the platform status before choosing a deployment target.

Next steps