Macro build_script_file_gen::include_file_str [] [src]

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

Includes the utf8-encoded content of the specified file as a string.

The file is located relative to the path denoted by the OUT_DIR environment variable at build time. This macro will yield an expression of type &'static str which is the contents of the file.

Examples

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