title: Rust Compile Time Macros 001 tags: rust This takes the `PATH` variable, as it was when the binary was compiled. This does **not** fetch the `PATH` variable at runtime. This is why it can be a `const fn`. ```rust use std; const fn mac() -> &'static str { let path: &'static str = std::env!("PATH"); path } fn main() { println!("{}",mac()); } ```