[−][src]Macro embed_plist::embed_info_plist_bytes
Embeds the Info.plist
file in &[u8]
directly in the current binary.
This enables you to have more control over what bytes are embedded into your
program. For example, you may want to do const
-compatible preprocessing
such as converting into a binary property list.
The embed_info_plist!
macro is a convenience wrapper around this and
include_bytes!
.
Examples
After using this macro, you can get its content by calling
get_info_plist
from anywhere in your program:
const PLIST: &[u8] = r#" <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Why</key> <string>To use in doc tests</string> </dict> </plist> "#.as_bytes(); embed_plist::embed_info_plist_bytes!(PLIST); let embedded = embed_plist::get_info_plist(); assert_eq!(embedded, PLIST);