-
Notifications
You must be signed in to change notification settings - Fork 106
Description
Platform: macOS, in particular M1 systems.
These systems can run both arm64 (native) and x86_64 (in emulation) code, with per process selection using the "arch" command.
For C extensions it is possible to build both architectures on an M1 system (basically a form of cross compiling), including merging code for the two architectures in a fat binary ("Universal 2" in Apple-speak).
setuptools_rust will currently always build arm64 code only, even if python was started in x86_64 mode (e.g. arch -x86_64 python3.9 setup.py build_ext
).
It would be nice if setuptools_rust were able to build "universal2" wheels.
An related to this: for C extensions Python by default builds extension that work on the deployment target used for the python binary. It might be necessary to enhance setuptools_rust to do something similar.
BTW. I hope to have some time to work on a PR in the near future.