PyCrust
1.0.0
Pie-crust / Py(c)Rust
PyCrust is a command-line tool that transpiles Python code to Rust code, replacing Python libraries with equivalent Rust libraries wherever possible. It uses the OpenAI ChatGPT API to perform the transpilation.
git clone https://github.com/JediRhymeTrix/pycrust.git
cd pycrust
.env
file with your ChatGPT API key: echo "API_KEY=<your-api-key>" > .env
chmod +x scripts/pycrust.sh
./pycrust.sh /path/to/input.py
to transpile the Python code to Rust code. The output will be saved in a file with the same name as the input file, but with the .rs
extension.pycrust/
├── docker-compose.yml
├── Dockerfile
├── scripts/
│ ├── download_dependencies.sh
│ └── pycrust.sh
├── src/
│ ├── __init__.py
│ └── pycrust.py
├── tests/
│ └── test_pycrust.py
└── requirements.txt