CLI Commands
Core
| Command | Description |
|---|---|
wyn run <file> | Compile and run |
wyn build <file> -o <name> | Compile to binary |
wyn build <file> --release | Optimized release build |
wyn build <file> --target <t> | Cross-compile for target platform |
wyn test <file> | Run test file |
wyn repl | Interactive REPL |
wyn fmt <file> | Format source code |
wyn fmt <dir> | Format all .wyn files in directory |
wyn fmt <file> --check | Check formatting without modifying |
wyn doc <file> --html | Generate HTML documentation |
wyn bench <file> | Run benchmarks with min/avg/median/p99 |
wyn check <file> | Type-check without compiling |
wyn watch <file> | Recompile on file change |
wyn watch <file> --run | Hot reload: recompile, kill, restart on change |
Packages
| Command | Description |
|---|---|
wyn pkg install <name> | Install package |
wyn pkg publish | Publish package |
wyn pkg search <query> | Search registry |
wyn pkg update | Update to latest compatible versions |
wyn pkg outdated | Show outdated packages |
Cross-Compilation
sh
wyn build app.wyn --target linux-x64
wyn build app.wyn --target linux-arm64
wyn build app.wyn --target macos-x64 # Intel Mac
wyn build app.wyn --target macos-arm64 # Apple Silicon
wyn build app.wyn --target windows-x64
wyn build app.wyn --target ios
wyn build app.wyn --target android
# Or use the cross command directly:
wyn cross linux app.wyn
wyn cross windows app.wynVersion
sh
wyn --version
wyn upgrade # update to latest versionEnvironment Variables
| Variable | Description |
|---|---|
WYN_CC | Override C compiler (default: auto-detect) |
WYN_CORO_STACK | Coroutine stack size in bytes (default: 8388608) |
WYN_DEBUG | Show generated C code on compilation errors |
WYN_STRICT | Enable strict mode (array OOB panics instead of warns) |