Command Guide
The commands you need first, then the full reference.
ckc is the command-line program that reads CK files. For a first program, you only need two commands: check asks whether the file is valid, and run starts it. The quick start shows the exact macOS, Linux, and Windows commands.
Start here#
| Command | What it does |
|---|---|
ckc check file.ck |
Checks the file and explains errors without creating another file |
ckc run file.ck |
Runs the program's main function on your computer |
More commands (for later)#
These commands build a program for another use or display technical information about it.
| Command | Purpose |
|---|---|
ckc build file.ck --kind executable --out app |
Build a Native executable |
ckc emit-c file.ck --out file.c |
Emit C source and header |
ckc emit-wat file.ck |
Emit readable WebAssembly text |
ckc emit-wasm file.ck --out file.wasm |
Emit WebAssembly binary |
ckc emit-mir file.ck |
Inspect a compiler's intermediate view of the program |
ckc emit-kir file.ck --print-facts |
Inspect the optimizer's view and its facts |
emit-llvm prints host-native LLVM IR when the Native toolchain feature is present. ckc --version --verbose reports compiler and backend identities; ckc licenses prints bundled notices.
Important defaults#
runandbuilduse O3 by default; inspection commands default to O0.- Arithmetic overflow and slice bounds are unchecked by default.
builddefaults to a dynamic library if--kindis omitted, and uses the portable baseline CPU policy.- PGO is opt-in through
ckc pgoor--pgo-*. Ordinary builds do not train or read a profile. --targetaccepts only the current host target; cross-compilation is not supported.
ckc emit-kir kernel.ck --consumer native-library --cpu baseline -O3 --explain-optimization
ckc build kernel.ck --kind static --cpu multiversion --out libkernel.a
Offline Auto-Tuning is not currently available. ckc tune and ckc build --tune-use report that the feature is unavailable. Consult the full CLI reference for option combinations, cache behavior, and failure categories.
Repository reference links follow the main branch and may describe features newer than the latest downloadable release.