| Crates.io | file-exists-macro |
| lib.rs | file-exists-macro |
| version | 0.1.0 |
| created_at | 2025-05-24 08:34:13.880147+00 |
| updated_at | 2025-05-24 08:34:13.880147+00 |
| description | file exists macro |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1687155 |
| size | 2,991 |
A Rust procedural macro that checks if a file exists at compile time and expands to a boolean (true or false) based on the file's existence.
use file_exists_macro::exists;
const CARGO_EXISTS: bool = exists!("Cargo.toml");
fn main() {
if CARGO_EXISTS {
println!("Cargo.toml file exists!");
} else {
println!("Cargo.toml file does not exist.");
}
}