Build

karkain build compiles a .kark file into a native executable without running it.

For the full build documentation — usage, options, incremental builds, engine selection and exit codes — see Build.

Summary

  • karkain build <file.kark> [-o <output>] — compile to a native executable.

  • --target <triple> — cross-compile for a different target (see Cross-Compilation).

  • --incremental — reuse the content-addressed cache in .karkain-cache/ for fast no-op rebuilds.

  • -c / --compile-only — emit C without invoking gcc/clang.

  • --engine go|kcc — select the compiler engine (default kcc).

$ karkain build hello.kark
$ karkain build hello.kark --target x86_64-linux -o hello_linux
$ karkain build main.kark --incremental

Exit codes: 0 success, 3 compilation failure, 6 environment failure (no usable C compiler).

See also

Build — complete build documentation. Run — compile and run in one step. Cross-Compilation — building for a different platform.