Skip to content

t3tra-dev/lython

Repository files navigation

Please do not send pull requests to this repository.

Lython - Python compiler toolchain based on LLVM

セットアップ

必要なもの

  • Python 3.12
  • CMake 3.20+
  • Ninja
  • C++17 対応コンパイラ
  • LLVM/MLIR 22 (llvm/llvm@22 または llvm-22-dev / libmlir-22-dev)
  • uv (Python パッケージマネージャ)

ビルド手順

git clone https://github.com/t3tra-dev/lython.git
cd lython
uv sync

# macOS:
brew install llvm

# Ubuntu:
# wget https://apt.llvm.org/llvm.sh
# chmod +x llvm.sh
# sudo ./llvm.sh 22
# sudo apt-get install -y clang-22 lld-22 llvm-22-dev libmlir-22-dev mlir-22-tools

# Lython 本体
cmake -B build -S .
cmake --build build -j$(nproc)

実行

./build/bin/lyc jit examples/hello.py
./build/bin/lyc jit examples/fib.py

ライセンス

本リポジトリのソースコードは、特記がない限り MIT License で配布されています。

About

Experimental Python compiler

Topics

Resources

Stars

170 stars

Watchers

4 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors