Description
Hi,
I'm a maintainer of PyO3 and have been vaguely aware of the RustPython project for some time. Unfortunately I'm woefully ill-informed as to your current progress and how much work is needed for RustPython to become a drop-in replacement for CPython. At the moment there's no collaboration between our projects (as far as I'm aware), however it feels like there could be. I wanted to reach out to welcome communication from you folks, if it's of interest.
PyO3's primary use case is to create Python extension modules in Rust (currently supporting CPython and PyPy). We also support embedding a Python interpreter in Rust (usually using dynamic linking to libpython, as statically linking the CPython interpreter is very awkward). Also the PyOxidizer project has recently been looking at PyO3 as a way to manage its own building and configuration, which is another place where using RustPython might be interesting (it could potentially help PyOxidizer avoid needing to build its own copy of libpython to link with).
Mostly I just wanted to reach out to see what you think the interaction between RustPython and PyO3 could be. For example, it might be really interesting to build a feature into PyO3 to embed a RustPython interpreter directly as a crate dependency.
We could also add support to build extension modules for a RustPython interpreter, which might range from easy to hard depending on how much of the CPython C API you support (or plan to support).
Finally, I think there's always potentially interesting things to learn from each other about ways to represent the GIL and other Python concepts in Rust - I think we do a reasonable job in PyO3, however there's definitely things we could do better, and IMO it's beneficial to the whole ecosystem if we share what we've learned.
Really, this issue doesn't contain anything concrete other than an invitation to open channels - feel free to ping me if you ever want my opinion on anything, and if you'd like us to add support for RustPython in any of the forms above (or perhaps ways I haven't considered yet) then I'd be interested to hear your opinions on what you think makes sense too.
Feel free to close this issue if it's not of interest right now.
👋