llv03/pyinterp
A fully tree-walking Python interpreter built on top of Foundation and ARC. Supports a rich subset of Python 3 — functions, classes, closures, recursion, built-ins, and more — compiled with a single make.

Getting Started

Install the Xcode Command Line Tools if you haven't already, then clone or unzip and build.

Terminal
#Install Xcode CLT (skip if already installed)
$xcode-select --install
#Clone from GitHub
$git clone https://github.com/llv03/pyinterp
$cd pyinterp
#Or unzip the archive
$unzip pyinterp.zip && cd pyinterp
$make
✓ Build succeeded
$./pyinterp tests/fibonacci.py
0 1 1 2 3 5 8 13 21 34 55 89 144

Keyboard Shortcuts

ActionCommand
Buildmake
Run a script./pyinterp <file.py>
Run test suitemake test
Benchmark vs CPythonbash bench.sh

Features


Requirements

OS
macOS 10.13+
Toolchain
Xcode CLT + clang
Runtime
Foundation + ARC
Benchmark
Python 3 (optional)

No CocoaPods, no Swift Package Manager, no Xcode project file. Just the system compiler and Foundation.