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!