I am writing a tool that produces files. The templates I use to generate those files are fixed (don’t need to be loaded at runtime or changed after compiling).
Rust has many convenient utilities like
include_str!, so I’ve just been using those to load the templates and store them in a
&'static str. This is significantly easier than bundling multiple files with the executable and figuring out where to store them when distributing.
Is there any downside to this approach? Will I run into problems with executable size or something? I don’t mind if the executable is somewhat big, but I don’t know if this can cause other issues. The templates aren’t larger than 2KB.