Replies: 1 comment
-
I know of Termux on android and there might be something similar on iOS, but those are not cross-compilation. I think the Beeware project has some experience compiling Rust/PyO3 too. In theory we support it in setuptools-rust, but that's for extension modules. You might want to compile your own Python distribution to ship with your app, and link to that? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all!
So, I try to write a tauri plugin to call python code from rust using pyo3. A first prototype runs fine on windows and MacOS but I'm struggling a bit with compilation for iOS and Android.
Not sure if my current plan is kind of too complicate or stupid, so I'm just asking here if somebody maybe struggled with the same problem or even already has a good solution.
According to the pyo3 docs, I need to compile cpython / libpython either static or dynamically for the target platform. Do you know if there are already pre compiled libs for android / iOS that I can use? Or projects that try to do the same? I searched a bit but didn't found anything yet. Most projects just try to run python code directly on Android and iOS or build python modules using rust.
It seems that I would have to somehow cross compile libpython first. I'm not experienced in cross compiling, so I would probably use docker or maybe even gh actions. But even this doesn't sound completely straight forward.
i know that iOS and Android aren't officially supported or tested. But maybe someone already succeeded to run python from rust using pyo3 on Android or iOS and has some good input or advice here.
Should I maybe better skip Android and iOS and focus on desktop?
Thx for your input and Happy Xmas :)
Beta Was this translation helpful? Give feedback.
All reactions