Tekst
Source
Documentation/Compiler & CLIsource tree
Reference

Compiler & CLI

The tekst executable turns Tekst source into native programs through LLVM.

Build

terminal
cmake -S . -B build
cmake --build build --config Release

The compiler executables are written to build/release/; on Windows, the output includes tekst.exe and tk.exe.

Compile a file

terminal
tekst main.tk

Choose an output

terminal
tekst main.tk -o hello

Compile and run

terminal
tekst main.tk --run

Emit LLVM IR

terminal
tekst main.tk --emit-ir

Version

terminal
tekst --version

Windows toolchain

The Windows native compiler uses Clang with the MinGW-w64 GNU target. MSYS2 UCRT64 is a supported way to provide the MinGW-w64 toolchain. If clang++ is not on PATH, set TEKST_CXX to its path.

Successful compilation

Successful native compilation is silent unless an option such as --emit-ir produces output. Compiler diagnostics are reported when compilation fails.