https://pantsbuild.org/ logo
#development
Title
# development
a

aloof-angle-91616

09/17/2019, 6:03 PM
for something else completely different, i'm working on a proc macro for another rust project, and it's not the worst thing in the world! i mostly see proc macros right now as useful for a rust library (which other rust code uses) as opposed to a cdylib like pants, but i have been absolutely loving
macro_rules!
macros, which you can just write out right next to your functions!!! if we were to incorporate some complex macro (like a proc macro) in pants, it might be e.g. in our
<http://build.rs|build.rs>
for the
engine_cffi
crate, in which we could do fancy things like maybe writing out a python (
cffi
) definition automatically from a rust enum to solve https://github.com/pantsbuild/pants/issues/7367 ? i'm not sure if macros are necessarily the right way to solve that, but it does seem like one way to solve that, especially if the macro usage is also limited to our build scripts (so we don't end up with the pants codebase scattered with hacky macros).