Documentation

Toolchain

The walnut CLI typechecks and compiles Walnut to native code.

Install: homebrew.md.

Commands

CommandBehavior
walnut new <App>Scaffold an app
walnut check [dir]Parse + static typecheck
walnut run <file>Run a script main on the host — jit.md
walnut replCompiling REPL — jit.md
walnut build [dir]Typecheck → compile → Xcode project
walnut simulatorBuild + install/launch in Simulator (--watch = hot reload)
walnut deviceBuild + install/launch on a phone (device.md)
walnut testflightRelease IPA → TestFlight (testflight.md)
walnut screenshots / store uploadListing capture + App Store Connect metadata
walnut format <file…>Format .walnut sources
walnut test [dir]Run in-language tests — testing.md
walnut docsGenerate API docs — documentation.md
walnut install / add / updatePackages — packages.md
walnut login / publishRegistry — registry.md
walnut licenseLicense status — licensing.md
walnut lspLanguage server — editor-support.md

Build pipeline (apps)

  1. Discover app src/ plus locked packages
  2. Typecheck
  3. Compile to native object code under ios/Generated/
  4. Generate / update the Xcode project and build for Simulator or device

Host LLVM

Host commands (run, repl, some package flows) need Homebrew llvm. The formula installs it for you.

Manifest

walnut.json / walnut.toml hold name, bundleId, sources, and runtime. Optional developmentTeam is used by walnut device.

Editor support

See editor-support.md.