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

A native Mac app in Rust, step by step

Updated 2026-11-11 · Ferrokit 0.15 · Markdown

This page goes from an empty folder to a signed, notarised .app you can send to someone, with Ferrokit. The app’s UI is real AppKit: the same NSWindow, NSTableView and NSTextField a Swift app would use, driven from Rust. No Xcode project, no Swift, no web view.

You need macOS 15 or later and stable Rust.

1. Make the app

cargo install cargo-ferrokit
cargo ferrokit new my-app && cd my-app

That’s a small to-do app: a text field, a table of tasks with checkboxes, a menu command with a shortcut, and self-checks. It also has an AGENTS.md, so Claude Code, Codex or Cursor know how a Ferrokit app is written.

2. Run it as a real app

cargo ferrokit run

run builds a .app bundle, so the app has its name in the menu bar, its icon in the Dock and its own identity, and runs it with its output in the terminal. While you work:

cargo ferrokit preview

rebuilds and restarts it every time you save, with its windows where you left them.

3. Write the UI

A Ferrokit app is views over signals. A view is built once; when a signal it reads changes, that one native view updates in place.

use ferrokit::*;

fn main() {
    let count = Signal::new(0);
    App::new("Counter")
        .window(Window::new("Counter").size(320.0, 140.0).view(
            vstack((
                text(move || format!("Clicked {} times", count.get())),
                button("Click me", move || count.update(|n| *n += 1)),
            ))
            .padding(20.0),
        ))
        .run();
}

The guide goes on from here: state, layout, controls and forms, tables and editors, and menus, toolbars, sheets and documents.

4. Check it

cargo ferrokit check

Clippy (warnings are errors), your tests, a bundle, then the app’s own self-checks: the app runs with CHECK=all, drives its own UI (clicks, typing, menu commands) and reports what AppKit did. See Testing and shipping.

5. Ship it

Settings live in Cargo.toml:

[package.metadata.ferrokit]
name = "My App"
id = "com.example.myapp"
icon = "icon.png"
cargo ferrokit bundle --universal --zip

makes a signed My App.app with the hardened runtime for Apple silicon and Intel. With a Developer ID certificate, cargo ferrokit notarize signs it, sends it to Apple’s notary service, staples the ticket and zips it for sending. For updates, cargo ferrokit appcast and Sparkle; for the store, the Mac App Store page.