- Group Reviewers
- rFBHGXb77a9dc92b31: distutils_rust: add distutils extension to compile Rust extension modules
Cool series! I was curious what your plans are to support Windows. That's the part that has been tripping me up in my quest to integrate Rust into the core Mercurial project. Keep in mind that official distributions of Python 2.7 are compiled with MSVC 2008 and link against its CRT. So there are CRT implications depending on how the Rust code is built.
Also, what about PyPy and other non-CPython distributions? Is it necessary to use Python extensions (as opposed to ctypes or cffi) for performance?
From my experience, it's not only about performance but also code cleanness. I tried the C API + Cython (could replace Cython with cffi) approach. Error handling is much less pleasant (Rust Err -> C special return value -> Python exception) than just implementing Into<PyErr>.
The plan is to support Windows with the caveat that compatibly compiled Python interpreter is used. It's fairly commonplace on the Windows platform to ship programs with their interpreter precompiled alongside the source, so we're expecting that to be acceptable for Windows users. We don't have any details yet, however.