Open tgross35 opened 1 month ago
This idea has been thrown around a lot but there hasn't been any central place for discussion, so opened this issue to create one. This still needs some design work, see the ACP.
Cc @dtolnay, as always when your crates are mentioned.
@joshtriplett pointed out that https://github.com/rust-lang/libs-team/issues/406 exists, I'll just turn this into a tracking issue.
maybe add C-tracking-issue?
We discussed this a bit at the WG-Macros meeting today https://rust-lang.zulipchat.com/#narrow/stream/404510-wg-macros/topic/.E2.9C.94.20Open.20Discussion.20-.2010.2F01.2F2024. One item of note is that it seems like some experimentation will be needed to determine which solutions are feasible.
This is a tracking issue for making
proc_macro
usable in all crates, not just those with crate typeproc-macro
. Advantages:proc_macro
would probably get a bit easier in generalproc_macro2
, which exists to solve these problemsproc_macro2
does this by selecting between the actual bridge implementation and a fallback, https://github.com/dtolnay/proc-macro2/blob/9c1d3eb1b6bddc5b86522bf3af98c2fb3de8e30a/src/lib.rs#L154-L158.Zulip thread: https://rust-lang.zulipchat.com/#narrow/stream/404510-wg-macros/topic/Using.20proc_macro.20outside.20of.20proc.20macro.20crates (also some around https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Future.20macro.20possibilities.20.28e.2Eg.2E.20inline.20procedural.20macros.2E.2E.2E/near/472781328)
About tracking issues
Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label. Discussion comments will get marked as off-topic or deleted. Repeated discussions on the tracking issue may lead to the tracking issue getting locked.
Steps
Unresolved Questions
ACP is not yet complete, design work needed
Implementation history