News for hackers. Stuff that matters.
Re:Calling Rust from Python by ynik on Sunday October 08, 2023 @04:33PM (#37814180)
Right now FFI + ctypes has one big advantage: it supports true parallelism with GIL-per-subinterpreter in Python 3.12. AFAIK all the higher-level binding libraries/tools (PyO3, pybind11, nanobind, Cython) don't support this yet; and in fact can't really support it without API-breaking fundamental design changes.
Re:Calling Rust from Python by Yoric on Sunday October 08, 2023 @05:04PM (#37814388)
Do you know what kind of design changes would be needed?
Re:Calling Rust from Python by rdedev on Sunday October 08, 2023 @05:24PM (#37814549)
But wasn't the whole point to drop down to a lower language, release the GIL and then do parallel processing? Gil per subinterpretee makes things easy python side but I'm not sure how much of it's relevant if you are using something like pyO3