Skip to content

CLI Commands

Build & Run

CommandDescription
wyn run app.wynCompile and run (TCC, fastest iteration)
wyn build app.wynCompile to binary (clang/gcc)
wyn build --release app.wynOptimized build (clang -O2)
wyn build --wasm app.wynCompile to WebAssembly

Cross-Compilation

bash
wyn cross <target> app.wyn

Targets: linux-x64, linux-arm64, windows-x64, macos-x64, macos-arm64, ios, android, android-x64, wasm32, riscv64

Mobile

CommandDescription
wyn package ios app.wynCreate iOS .app bundle
wyn package android app.wynCreate Android .apk

Options: --name AppName, --id com.example.app

Development

CommandDescription
wyn testRun tests in tests/ directory (cross-platform, no shell)
wyn test tests/expectRun tests in a specific directory
wyn fmt app.wynFormat source code (4-space indent, no semicolons)
wyn fmt src/ --checkCheck formatting without modifying (for CI)
wyn doc app.wynGenerate documentation
wyn lspStart language server
wyn debug app.wynDebug with DWARF + lldb
wyn hot app.wynHot reload (mobile dev)

Packages

CommandDescription
wyn pkg install <name>Install a package
wyn pkg listList installed packages

Syntax Notes

  • No semicolons needed
  • Bare return (no value) works in void functions
  • fn main() -> int { ... } or just fn main() { ... }
  • String interpolation: "hello ${name}"
  • Pipe operator: x |> transform |> format

See Also

MIT License