Skip to content

CLI Commands

Core

CommandDescription
wyn run <file>Compile and run
wyn build <file> -o <name>Compile to binary
wyn build <file> --releaseOptimized release build
wyn build <file> --target <t>Cross-compile for target platform
wyn test <file>Run test file
wyn replInteractive REPL
wyn fmt <file>Format source code
wyn fmt <dir>Format all .wyn files in directory
wyn fmt <file> --checkCheck formatting without modifying
wyn doc <file> --htmlGenerate 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> --runHot reload: recompile, kill, restart on change

Packages

CommandDescription
wyn pkg install <name>Install package
wyn pkg publishPublish package
wyn pkg search <query>Search registry
wyn pkg updateUpdate to latest compatible versions
wyn pkg outdatedShow 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.wyn

Version

sh
wyn --version
wyn upgrade       # update to latest version

Environment Variables

VariableDescription
WYN_CCOverride C compiler (default: auto-detect)
WYN_CORO_STACKCoroutine stack size in bytes (default: 8388608)
WYN_DEBUGShow generated C code on compilation errors
WYN_STRICTEnable strict mode (array OOB panics instead of warns)

MIT License