Announcing the `windres` crate


#1

Hi everyone! Over the past few days, I’ve been working on windres, a crate for compiling Windows resource (.rc) files and linking them into a binary crate.

On Windows, applications can embed icons, version information, menu strings etc. within the executable, but this requires feeding a .rc file to a resource compiler, which then generates an object file to be passed to the linker. Visual Studio, CMake and others recognise .rc files and handle this automatically, but Rust doesn’t natively support them.

That’s where the windres crate comes into play. It looks for the appropriate resource compiler (rc.exe when targeting MSVC, windres.exe when targeting GNU) and invokes it to generate an output file that is passed to the linker.

I’d be happy to hear any feedback you may have, and of course contributions are always welcome!


#2

Looks like a nice crate to use! Two tiny issues:

  • The linked documentation is empty (probably because it was not built on Windows);
  • It would be nice to have a test in the crate itself, so that cargo test works.