We should add proc_macro target type in Cargo.toml

Right now, proc_macro can only work with binary aimed packages because it must be a lib target, and a package can have only one lib.

So it is not possible to develop a package specific proc_macro that do domain specific staff if the project is a lib. Instead we have to separate the proc_macro to another package, a bit inconvenient.

Normal macros can be defined and used without problems, but their power is limited.

Ideally I would like to see a new proc-macro target being introduced in Cargo.toml.

(maybe there would be other solutions already, for example the lib can be controlled by a proc_macro feature but I can hardly see how this could work)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.