<@U04468GC7ED> Does the work you’ve done on Pants ...
# development
w
@gorgeous-winter-99296 Does the work you’ve done on Pants building Rust also support stuff like Pyo3/maturin? Or would those be part of Python lib support?
g
I have a branch for building native exts but mostly using standard tooling. I mentioned it during a meetup but it requires some plumbing from the Pants core side/python backend. At a minimum we can maybe get away with a resolve (for run/pex package) but for distributions we need to know target + py version.
And for the build to succeed we also need the equivalent of python3.x-dev, so linkable libraries + all headers.
I started investigating if we could do that using our existing pyenv tooling but I think it wasn't. Or at least not easy. So would likely need to source the dev-env elsewhere if we don't get it from the host... Which I dislike. :P
Oh maturin I scrapped because it does too much. Venvs, wheels... Nope. Just build the rust code...
I think my path to completion here was something like... • Add zig as a self-contained compiler • Add py-headers somehow • Plumb up a c-based module builder • Implement the same workflow from the Rust repo and ensure it doesn't require any intermediate targets etc • Profit
w
This is interesting, it might overlap with some old C/C++ tooling I added, and I was also looking into adding the Zig compiler at a request (while still having not used Zig itself, but liking the idea of a downloadable toolchain with less than 1GB)