For when you absolutely, positively have to write Rust code in Python in your phone.
This is pretty much a Python port of @badboy's poor-mans-rust-full.sh script.
The general gist (see what I did there) of the code is to call the Rust playground's /evaluate.json
end point with your code. So yes, you will need internet connectivity.
I've tested this on python 3.5.1 (Pythonista3) and 3.6.2 (MacOS).
The only python module you need is requests.
You can either install this directly (yolo) or within a virtual environment.
./pobad.py rust_file
If you do plan on using this in Pythonista, then I recommend you also install StaSh. StaSh is an incredibly useful shell that will allow you to upload the pobad script onto your iPhone and then execute in a similar manner to example below.
The original copyright should go to Jan-Erik Rediger (@badboy). I guess I could take credit for the python port.
Mark Sta Ana 2017 ©