Macro build_const::src_file [] [src]

macro_rules! src_file {
    ( $file_name:expr) => { ... };
}

Macro which returns the path to file in your src/ directory.

Example:

This example is not tested
src_file!("constants.rs");

returns /path/to/project/src/constants.rs

If you need a more custom path, the basic implementation is:

This example is not tested
concat!(env!("CARGO_MANIFEST_DIR"), "/src/path/to/file")