An Elixir-to-native compiler built on Beaver and the Slang-defined ex dialect.

Scope

The first milestone wires a minimal closed loop (see tsai/beaver#6 for the plan):

  • frontend: expanded module snapshot → ex IR (boundary only, no macro semantics);
  • lowering: exfunc/arith/scf/cf → LLVM via Beaver.MLIR.Conversion.Plan (the conversion patterns themselves live in Beaver) — Batata.to_llvm/2 runs the plan plus the standard arith-to-llvm / func-to-llvm passes;
  • execution: ExecutionEngine (JIT) — Batata.execute/2 lowers the source and runs main through the MLIR JIT; AOT — Batata.build/3 emits lib<Module>.a plus a C driver that calls the entry function.

Dev setup

Beaver and Kinda are pre-release, so development uses local checkouts:

export BEAVER_PATH=/path/to/beaver
export BEAVER_KINDA_PATH=/path/to/kinda
mix deps.get
mix test