Skip to content

Why not .py to .rs #6458

@MominIqbal-1234

Description

@MominIqbal-1234

Summary

Hi RustPython team — thanks for your great work.

I have a question/idea: RustPython runs Python on a Rust-based interpreter. Have you ever considered supporting the reverse workflow — transpiling Python into Rust code, then compiling it with rustc?

Proposed workflow:

Input: Python source code

Step 1: Parse Python → build AST (RustPython already has a parser/AST)

Step 2: Convert Python AST → Rust AST / Rust source code

Step 3: Compile generated Rust with rustc to produce a native binary

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions