How to use include_str and include_bytes

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.