Scripting language that compiles to x86-64 assembly.
- Lexing & Parsing: Source code is scanned into tokens and structured into an Abstract Syntax Tree (AST).
- Lowering: AST is converted into an Intermediate Representation (IR).
- Standard Library: Written in the language itself and compiled on-demand when referenced.
- Peephole: IR is scanned in multiple passes to simplify instruction sequences and collapse redundant operations.
- Registers: Symbols are assigned registers using liveness analysis, spilling to the stack only when necessary.
- Binary: Optimized IR is converted into x86 assembly and packaged into an executable binary.
- Bootstrap: External imports are resolved at startup before the entry point, ensuring standalone execution.
cargo run --bin compiler -- <filename> [options]
--output <path> path to the output executable
--ip <address> base instruction pointer
--tokens print lexical tokens
--ast print abstract syntax tree
--ir print intermediate representation
--asm print x86 assembly
--function <name> filter output to a specific function
- Fork it
- Create your branch (
git checkout -b my-change) - Commit your changes (
git commit -m "changed something") - Push to the branch (
git push origin my-change) - Create new pull request
