<#18688 Use Pants to build our rust code> Issue cr...
# github-notifications
c
#18688 Use Pants to build our rust code Issue created by chrisjrn While Pants's rust code currently uses a custom bootstrapper to build the native Pants code before executing Python, that bootstrapper is somewhat inconvenient to use: it is sensitive to branch changes and small changes in rust source code. Even without dependency inference, Pants' caching approach is well suited to this problem! We should try using
adhoc_tool
to execute the rust toolchain rather than executing it directly. A POC exists at: https://github.com/pantsbuild/pants/compare/main...chrisjrn:pants:chrisjrn/rusty-pants?expand=1 A few issues to reckon with: 1. Chicken-and-egg: how do we execute Pants the first time, when there's no native engine to be had. 2. Handling API changes during development: if the Python API for the native engine changes, the Python code will likely stop working until the rust is built. We may wish to rely on only published versions of pants for building the rust code, however, this would involve maintaining a separate pants.toml in the meantime. Maybe that's OK? pantsbuild/pants