We will be translating the state machine language to LLVM IR.
- Setup
- Install LLVM ( v18 to work with rust bindings)
- Install inkwell
- setup environment variables: export LLVM_SOURCE_DIR=”/Users/mabhay/projects/llvm-project-llvmorg-18.1.8” # For rust bindings export LLVM_SYS_180_PREFIX=${LLVM_SOURCE_DIR}/build # Give priority to tools built from llvm source export PATH=”$LLVM_SOURCE_DIR/build/bin:$PATH”
- Make modifications to the build command to make sure it can find the required libraries. See: https://github.com/TheDan64/inkwell/issues/345#issuecomment-2278650151
- Write basic llvm compiler trait