Use include_str! for text and include_bytes! for binary data to embed files directly into your Rust binary at compile time.
Use include_str! to embed file contents as a string literal and include_bytes! to embed them as a byte array at compile time.
const TEXT: &str = include_str!("data.txt");
const BYTES: &[u8] = include_bytes!("data.bin");
Both macros read the file relative to the current source file and fail to compile if the file is missing.
These macros let you bake files directly into your program so they travel with the compiled binary. Use include_str! for text files like configuration or templates, and include_bytes! for binary data like images or fonts. It's like packing a suitcase before you leave; the items are inside the program, not waiting on the hard drive.