embedinator 0.1.0

A simple windows resource compiler that does not rely on external tools
Documentation
  • Coverage
  • 44.83%
    13 out of 29 items documented1 out of 17 items with examples
  • Size
  • Source code size: 36.87 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.28 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • sidit77/embedinator
    3 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • sidit77

embedinator

A simple utility to embed resources such as icons or manifests into a Windows executable from a cargo build script.

The advantage of crate over others such as windres is that this crate directly outputs a linkable library file instead of relying on, possibly missing, platform tools such as rc.exe and cvtres.exe.

Additionally, this crate has no other dependencies.

Example

#[cfg(windows)]
fn main() {
    embedinator::ResourceBuilder::from_env()
        .add_manifest(std::fs::read_to_string("assets/app.manifest").unwrap())
        .add_icon(32512, Icon::from_png_bytes(std::fs::read("app.png").unwrap()))
        .finish();
    println!("cargo:rerun-if-changed=app.manifest");
    println!("cargo:rerun-if-changed=app.png");
}