HI! Haven't used pants much since ~2016 and have w...
# general
HI! Haven't used pants much since ~2016 and have what I hope are easy questions on where things currently stand: ā€¢ If I want to run a python Language Server, I can maybe glue something together with
pants export
, but there isn't any magic 'out of the box'. Is that right? (I saw https://github.com/pantsbuild/pants/issues/13260) ā€¢ Pants itself is bootstrapped as a python app with a rust core (python code calling rust), but there isn't a blessed/official/supported way to have python targets depending on rust targets today?
RE: Python Language Server - correct. Tom is working hard on BSP support as we speak but it's not ready yet. RE: Python -> Rust - correct. We don't dogfood Pants fully yet to build Pants, the Rust bit is behind a bootstrap script. The best you can do today is use a
target that wraps up your Rust build if that ~works (If you use something like https://github.com/PyO3/setuptools-rust).
āž• 2
ā€¢ That is correct. I'm hopeful by end of year we'll see some Python LSP support by Pants šŸ¤ž ā€¢ It's actually Python -> Rust (multiple threads) -> Python šŸŽ‰ . But you're correct Pants itself doesn't support Rust as a language. Of course, contributions are welcome! The community is happy to guide/support
šŸ™Œ 2
šŸ¤ž 2
+1 to John's mention of
. All the pieces should exist to allow you to compile a Rust C Python extension and have your Python code call it. However some of that process requires careful wiring/setup on your machine.
FWIW, on the Python -> Rust bit via
(https://www.pantsbuild.org/docs/python-distributions), that's how some folks get by today for Python -> Cython, although there is work towards a 1st class Cython support plugin.
Thanks for the answers and context!
ā¤ļø 1