Klar logoklaralpha

Compiler Contributing

Prerequisites

  • Rust + Cargo
  • Node.js (for default JS run/test/bench paths)
  • LLVM toolchain (for native and LLVM IR paths)

Local Build and Test

cd compiler
cargo build
cargo test

Run CLI:

cargo build -p klar-compiler
./target/debug/klar --help
./target/debug/klar check examples/demo.klar

Recommended Change Order

When changing language behavior:

  1. Lexer (if token changes are needed)
  2. AST (if model changes)
  3. Parser
  4. Type checker
  5. Codegen backend(s)
  6. CLI integration
  7. Docs updates

Related Docs