Thanks to visit codestin.com
Credit goes to github.com

Skip to content
forked from Silletr/Rython

This is Emanuel work repository related to Rython, all my pull requests to the Rython repository are sent from here.

License

Notifications You must be signed in to change notification settings

Emanuel71836/Rython

 
 

Repository files navigation

Python
Rust LLVM

Rython

Rython combines Python's readability with Rust's performance via a high-performance LLVM-based compiler.


Compiler-Pipeline-with-2025-12-19-234220.png


Key Features

  • 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.

Installation

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 build

Usage

Compilation (AOT)

To compile a Rython file into a standalone native binary:

python3 ryc.py hello.ry -o meu_programa
./meu_programa

JIT Execution

To run code immediately:

python3 jit_test_runner.py

Example Code

function 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

Roadmap

  • 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

How to Contribute

  • 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.


Alt

About

This is Emanuel work repository related to Rython, all my pull requests to the Rython repository are sent from here.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 55.4%
  • Python 44.3%
  • Shell 0.3%