[][src]Function embed_resource::compile

pub fn compile<T: AsRef<Path>>(resource_file: T)

Compile the Windows resource file and update the cargo search path if we're on Windows.

On non-Windows this does nothing, on non-MSVC Windows, this chains windres with ar, but on MSVC Windows, this will try its hardest to find RC.EXE in Windows Kits and/or SDK directories (because rustc supports VC++ without being in a VC++ dev environment, so we have to as well).

Examples

In your build script, assuming the crate's name is "checksums":

extern crate embed_resource;

fn main() {
    // Compile and link checksums.rc
    embed_resource::compile("checksums.rc");
}