feat(rust): forward exec_compatible_with to proc-macro alias #1202
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When
rust_librarycreates a proc-macro, the macro_wrapper generates arust_proc_macro_aliasthat handles the exec-dep semantics. However, if the caller specifiesexec_compatible_withto constrain which execution platforms can build the proc-macro, this constraint wasn't being forwarded to the alias.This matters when proc-macros need to be built with a specific toolchain. For example, when using nightly rustc for analysis (like dylint), proc-macros must also be built with nightly for ABI compatibility. Without forwarding
exec_compatible_with, the alias could resolve to any execution platform, potentially building the proc-macro with the wrong toolchain.Single line change - forward
exec_compatible_withfrom kwargs torust_proc_macro_alias.