CLI Commands
Build & Run
| Command | Description |
|---|---|
wyn run app.wyn | Compile and run (TCC, fastest iteration) |
wyn build app.wyn | Compile to binary (clang/gcc) |
wyn build --release app.wyn | Optimized build (clang -O2) |
wyn build --wasm app.wyn | Compile to WebAssembly |
Cross-Compilation
bash
wyn cross <target> app.wynTargets: linux-x64, linux-arm64, windows-x64, macos-x64, macos-arm64, ios, android, android-x64, wasm32, riscv64
Mobile
| Command | Description |
|---|---|
wyn package ios app.wyn | Create iOS .app bundle |
wyn package android app.wyn | Create Android .apk |
Options: --name AppName, --id com.example.app
Development
| Command | Description |
|---|---|
wyn test | Run tests in tests/ directory (cross-platform, no shell) |
wyn test tests/expect | Run tests in a specific directory |
wyn fmt app.wyn | Format source code (4-space indent, no semicolons) |
wyn fmt src/ --check | Check formatting without modifying (for CI) |
wyn doc app.wyn | Generate documentation |
wyn lsp | Start language server |
wyn debug app.wyn | Debug with DWARF + lldb |
wyn hot app.wyn | Hot reload (mobile dev) |
Packages
| Command | Description |
|---|---|
wyn pkg install <name> | Install a package |
wyn pkg list | List installed packages |
Syntax Notes
- No semicolons needed
- Bare
return(no value) works in void functions fn main() -> int { ... }or justfn main() { ... }- String interpolation:
"hello ${name}" - Pipe operator:
x |> transform |> format
See Also
- Installation — install Wyn
- Quick Start — common workflows
- Deploying — deploy Wyn applications