Macro build_script_file_gen::include_file [] [src]

macro_rules! include_file {
    ($file:expr) => { ... };
}

Places the content of the specified file in the surrounding code unhygienically. i.e. This can be used to inject Rust code into your module.

The file is located relative to the path denoted by the OUT_DIR environment variable at build time.

Examples

#[macro_use] 
extern crate build_script_file_gen;
 
fn main() {
    //hello.rs contains the text: println!("Hello World!");
    //which will make this function print Hello World! when compiled
    include_file!("hello.rs");
}