Export environment OUT_DIR
to proc-macro.
#14035
Labels
A-proc-macro
Area: compiling proc-macros
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
S-needs-info
Status: Needs more info, such as a reproduction or more background for a feature request.
Problem
Currently, crates-io will yield such error:
But since I only have a
proc-macro
and nobuild.rs
, theOUT_DIR
is not set. And since I need some of their output (generating R wrappers for further roxygen2 doc generation and further package loading), the output is necessary.Is there some configuration that could make a
OUT_DIR
visible forproc-macro
s?Proposed Solution
Currently, for build.rs, it could write output to
OUT_DIR
, but forproc-macro
-only crate, such option does not exists.Another solution is that adding a [cache] section in Cargo.toml, tell Cargo what file could be written. With this configure, we may have the ability to debug proc-macros by tell them writting down all the code they generates.
Notes
No response
The text was updated successfully, but these errors were encountered: