Make it easier to include generated files as module?


Currently, when you have a generated Rust source and you want to include it as a module, you have to do something like

mod generated_mod {
    include!(concat!(env!("OUT_DIR"), "/"));

It would probably be better if it can be simplified to, for example

#[path = "$outdir/"]
mod generated_mod;

or something like this.

What do you think?

1 Like


See also [Pre-RFC] Macros in Attributes


closed #3

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