Do I need to buy a Mac, to compile my Python extensions written in Rust for Mac OS?

105 views Asked by At

My development environment is configured in Windows. I could compile for Linux using WSL. Is there anyway possible, so that I can compile for Mac OS without having to buy a Mac?

I have no idea how to do this any other way.

For context: I am using PyO3 bindings.

1

There are 1 answers

2
tdelaney On

Python is cross platform and you can easily build pure python packages that run on mac. More generally, lots of compilers will cross-compile to multiple platform so you can build on one type and run on another. And many platforms have virtual machines that run under windows. Run the virtual machine and you could use mac tools natively. As long as you aren't writing hardware dependent code, you likely don't need a mac to write for mac.