The include_bytes!
and include_str!
macros seem like a mystery to me. I understand that the file is included in the binary, but how does it work at runtime?
- When is the file loaded into memory?
- Is there any reason not to store the result of
include_bytes!
/include_str!
as a top-levelconst
? Will the file then be in memory for the entire duration of the application runtime? - Are there any penalties for including a "big" file, other than the binary size?