Language
Advanced
Once the language basics are familiar, explore native compilation, LLVM IR, imports, and low-level memory.
Compiler pipeline
pipeline
Tekst source (.tk)
↓
Lexer
↓
Parser
↓
AST
↓
LLVM IR backend
↓
LLVM / Clang
↓
native executableLLVM IR
Tekst lowers its AST to LLVM IR and then uses LLVM/Clang to produce a native executable.
terminal
tekst main.tk --emit-ir > main.llNative runtime
The runtime provides the generated program with object, collection, conversion, built-in, and memory operations required by the native backend.
Compile-time imports
Imported Tekst source is compiled into the same LLVM module. This keeps module loading out of the runtime execution path.
Error handling
Use try/catch blocks to handle runtime errors in Tekst. See the Error Handling guide for examples.
Manual memory
For direct memory work, see Pointers & Memory.
