Rython combines Python's readability with Rust's performance via a high-performance LLVM-based compiler.
- AOT & JIT Compilation: Build standalone native binaries or execute code on the fly using LLVM 15.
- Automatic Memory Management: Integrated Boehm-Demers-Weiser conservative garbage collector.
- High Performance: Native machine code generation for arithmetic and logic.
- Python-like Syntax: Clean and familiar syntax with static type hinting (
x: int = 5). - Modern CLI: Professional compiler driver (
ryc.py) with rich visual feedback.
Rython requires LLVM 15 and libgc to be installed on your system (WSL/Linux recommended).
# Install dependencies
sudo apt update && sudo apt install llvm-15-dev libgc-dev build-essential clang python3-rich
# Clone repository
git clone https://github.com/Silletr/Rython.git
cd Rython/rython
# Build the compiler backend
cargo buildTo compile a Rython file into a standalone native binary:
python3 ryc.py hello.ry -o meu_programa
./meu_programaTo run code immediately:
python3 jit_test_runner.pyfunction main() -> int:
# Variables
x: int = 5
y: int = 8
z: int = x + y * 3
# Native Printing (via Runtime)
rython_print_str("Hello World! Rython is running on LLVM.")
return 0- LLVM IR JIT Engine
- Ahead-of-Time (AOT) Binary Generation
- Boehm Garbage Collector Integration
- Professional CLI Driver
- Boolean logic and control flow (
if/else) - Complex data types (Lists, Dicts)
- Standard Library Expansion
- Rust Devs: Optimization, LLVM IR improvements, standard library.
- Python Devs: Tooling, tests, and documentation.
- Designers: Improving the CLI and brand identity.
Credit to Emanuel71836 for the core architecture and development.