encrust_file_string!() { /* proc-macro */ }
Available on crate feature macros only.
Expand description

Read the contents of a file into a String and encrust it so the actual file contents is encrypted before being included in the binary.

Unless an absolute path is given, the file is read relative to the CARGO_MANIFEST_DIR variable, which is set to the directory containing the crate’s Cargo.toml file. Note that this is not identical to include_str!’s behavior, which reads relative to the file using the macro.

Example

let mut cargo_toml = encrust_file_string!("Cargo.toml");