Documentation

Overview

Walnut is a functional language and toolchain for building native iOS apps.

It combines a TEA programming model (init / update / view), a static type checker, and UIKit access compiled to native code.

The core idea

A Walnut app is three pure functions and a value:

init   : Model
update : Msg -> Model -> Model
view   : Model -> View Msg
main   : Program Model Msg

Events carry Msg values; update produces a new model; view produces a view tree; the platform renderer turns that into UIKit.

From source to app

.walnut → typecheck → native object code → Xcode project → Simulator / device

Views are data

Ui.View msg is ordinary data. The iOS host maps it to UIKit (stacks, buttons, Liquid Glass, and more). See views.md and glass.md.

Effects

Need storage, HTTP, timers, or notifications? Use Walnut.element with Cmd / Subeffects.md.

Packages

Share libraries through the registry — packages.md, registry.md.

Where to go next