Warning
The compiler is still under development and is unfinished, please be peaceful if exists some bug.
The Thrush Compiler is tasked with converting Thrush source code (.th
) into native code for each architecture, using either Just In Time (JIT) or Ahead Of Time (AOT) compilation modes, leveraging the LLVM infrastructure (LLVM-C API) during the process.
Currently, the only backend available for the thrush compiler to compile is the current LLVM, using the LLVM-C API. The process consists of three parts:
- Compilation by thrushc to LLVM bitcode (*.bc).
- Optimization by the LLVM optimization tool (opt & llvm-lto).
- Final compilation by clang to the target.
In summary:
Important Rust crates:
- llvm-sys (v170)
- inkwell (v0.50)
Note
The language will contain a pre-optimized toolchain repository for each operating system. This process automates the installation of the language and its entire ecosystem through the Thorium package manager.