News for hackers. Stuff that matters.
Re:Calling Rust from Python by singhrac on Sunday October 08, 2023 @03:13PM (#37813521)
Absolutely, I was surprised anyone would recommend ctypes for Python/Rust today. I've written a few Python libraries using Rust to do the slow parts, and PyO3/maturin is a great experience.
Re:Calling Rust from Python by anonacct37 on Sunday October 08, 2023 @04:13PM (#37814012)
Even a decade ago I was seeing projects stop using ctypes and instead use things like cffi. Honestly I couldn't tell you exactly why ctypes is so bad but I do know that cffi integrates a little closer with the c compiler and has better header support.