Batata
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 →
exIR (boundary only, no macro semantics); - lowering:
ex→func/arith/scf/cf→ LLVM viaBeaver.MLIR.Conversion.Plan(the conversion patterns themselves live in Beaver) —Batata.to_llvm/2runs the plan plus the standardarith-to-llvm/func-to-llvmpasses; - execution: ExecutionEngine (JIT) —
Batata.execute/2lowers the source and runsmainthrough the MLIR JIT; AOT —Batata.build/3emitslib<Module>.aplus 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