Macro include_dir

Source
include_dir!() { /* proc-macro */ }
Expand description

Serves all files in the given directory by directly integrating them in the application binary using the include_str! macro of the standard library. Greatly increases performance but also obviously increases binary file size and memory usage. Addtionally files can’t be changed at compile time. Takes an optional 4th parameter to set the maximum file size in bytes before the file is going to be served dynamically instead of being included in the binary.