Getting started

This guide takes you from an empty directory to a running Day app. You will install the CLI, choose one platform, and edit the app’s first screen. You need a terminal and a text editor; the examples assume you can read basic Rust.

1. Install the CLI

Install Rust through rustup and Git, then install Day’s command-line tool:

cargo install day-cli

Installs the day CLI from crates.io. Requires a stable Rust toolchain (rustup).

Check the installation and available toolchains:

day --version
day doctor

day doctor reports missing tools. You only need to install the tools for your chosen target. See system requirements for supported versions and installation details.

2. Choose a platform and run your app

Select your development computer and the platform you want to run on. Install the listed requirements, then run the commands in a terminal. The first build downloads and compiles dependencies, so allow more time than for later builds.

macOS · AppKit

Build on macOS. Tier 1 · Supported

Full Xcode for the generated app project. Installation instructions.

Check the platform’s capabilities and limitations before choosing it for a release.

day new app hello --toolkit macos-appkit --appid com.example.hello
cd hello
day launch -p macos-appkit

iOS & iPadOS · UIKit

Build on macOS. Tier 1 · Supported

Full Xcode, an iOS Rust target, and a booted iOS Simulator. Physical devices also need signing configured in Xcode. Installation instructions.

Check the platform’s capabilities and limitations before choosing it for a release.

day new app hello --toolkit ios-uikit --appid com.example.hello
cd hello
day launch -p ios-uikit

Android · Material Components

Build on macOS, Linux, Windows. Tier 1 · Supported

Android SDK and NDK, JDK 17 or newer, cargo-ndk, and a Rust target matching your device or emulator. Start the emulator or connect a device before launching. Installation instructions.

Check the platform’s capabilities and limitations before choosing it for a release.

day new app hello --toolkit android-mdc --appid com.example.hello
cd hello
day launch -p android-mdc

Linux · GTK 4

Build on Linux. Tier 2 · Demi-supported

GTK 4.10 or newer, libadwaita 1.5 or newer, and pkg-config, including development packages. Installation instructions.

Check the platform’s capabilities and limitations before choosing it for a release.

day new app hello --toolkit linux-gtk --appid com.example.hello
cd hello
day launch -p linux-gtk

Linux · Qt 6 Widgets

Build on Linux. Tier 2 · Demi-supported

Qt 6 development packages and pkg-config. Installation instructions.

Check the platform’s capabilities and limitations before choosing it for a release.

day new app hello --toolkit linux-qt --appid com.example.hello
cd hello
day launch -p linux-qt

Windows · XAML

Build on Windows. Tier 2 · Demi-supported

Visual Studio C++ Build Tools, the Windows SDK, and the MSVC Rust toolchain. Installation instructions.

Check the platform’s capabilities and limitations before choosing it for a release.

day new app hello --toolkit windows-xaml --appid com.example.hello
cd hello
day launch -p windows-xaml

HarmonyOS · ArkUI

Build on macOS, Linux, Windows. Tier 3 · Experimental

OpenHarmony SDK, Rust targets, hvigor, ohpm, and hdc. Running the app also needs a device or a configured emulator. Installation instructions.

Check the platform’s capabilities and limitations before choosing it for a release.

day new app hello --toolkit harmony-arkui --appid com.example.hello
cd hello
day launch -p harmony-arkui

Web · DOM

Build on macOS, Linux, Windows. Tier 3 · Experimental

The wasm32-unknown-unknown Rust target and a browser. Installation instructions.

Check the platform’s capabilities and limitations before choosing it for a release.

day new app hello --toolkit web-dom --appid com.example.hello
cd hello
day launch -p web-dom

The selector covers the main targets. GTK and Qt also run on macOS and Windows for development; see all platform combinations for those options.

The generated project contains a Day.toml app manifest, Cargo dependencies pinned to a Day release, and platform files for your chosen toolkit. Open src/lib.rs to find root(), the function that defines your app’s interface. Project structure explains the other files.

If the app does not launch, use the troubleshooting guide, run day doctor again and check the target’s setup instructions above. Mobile targets need a running emulator, simulator, or connected device as described there.

3. Make your first change

Open src/lib.rs. The scaffold’s root() returns the whole UI; replace it with:

pub fn root() -> impl Piece {
    column((
        label("Hello from my first edit"),
        button("Tap me").action(|| println!("tapped")),
    ))
    .spacing(12.0)
    .padding(16.0)
}

Run the day launch command for your selected target again to see the change. Pieces explains how column, label, and button compose the interface.

4. Make the screen respond

Replace root() again to give the button something visible to do:

pub fn root() -> impl Piece {
    let count = Signal::new(0i64);

    column((
        label(move || format!("Count: {}", count.get())),
        button("Add one").action(move || count.update(|n| *n += 1)),
    ))
    .spacing(12.0)
    .padding(16.0)
}

Rebuild and launch. Pressing Add one should change the count on screen. The Signal holds the value, and the label’s closure reads it whenever it changes. Keep the read inside the closure: label(count.get().to_string()) would display only the initial value.

Optional: add another target

Once the app works on your first platform, install another target’s tools and add it to the project:

day project add-target web-dom
day launch -p web-dom

This example adds the experimental web target. Use a different target name if you prefer. Your UI code is shared, but platform capabilities differ; test the features your app uses on each target you plan to ship.

Optional: editor integration

The Day VS Code extension adds project creation, build and run controls, and diagnostics to the editor. You can also use AI-assisted development to edit and test your app. Neither is required to follow this guide.

Where to go next

  • Reactivity explains how state changes update the UI.
  • Layout covers arranging and sizing controls.
  • Gallery connects sample app screenshots to source code and related guides.
  • CLI & projects documents build, run, and project commands.