Skip to content

Quick Start

Install Kirin from PyPI:

Terminal window
pip install kirin-toolchain

Kirin’s basic dialect group turns a Python function into a compiler method. The function can be called as usual, while print() displays its intermediate representation:

from kirin.prelude import basic
@basic
def choose(x):
if x > 0:
return 1
return 2
print(choose(3))
choose.print()

Continue with the Guide to define dialects and statements, or build a small language in the FoodLang tutorials.